Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
memurats committed Nov 28, 2024
1 parent 3728200 commit c94f526
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 168 deletions.
13 changes: 7 additions & 6 deletions src/components/DisplaySettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@
@click.stop="toggleOpen">
{{ t('nmctheme', 'Display settings') }}
</button>
<div id="display-settings-list" class="display-settings__list" :class="{open: isOpened}" aria-labelledby="display-settings-btn">
<div id="display-settings-list"
class="display-settings__list"
:class="{open: isOpened}"
aria-labelledby="display-settings-btn">
<NcCheckboxRadioSwitch v-if="textAvailable"
:checked="userConfig.show_folder_info"
:disabled="isOpened ? false : true"
@update:checked="setConfig('show_folder_info', $event)">
{{ t('nmctheme', 'Show folder info text') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch
:checked="userConfig.show_hidden"
<NcCheckboxRadioSwitch :checked="userConfig.show_hidden"
:disabled="isOpened ? false : true"
@update:checked="setConfig('show_hidden', $event)">
{{ t('files', 'Show hidden files') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch
:checked="userConfig.crop_image_previews"
<NcCheckboxRadioSwitch :checked="userConfig.crop_image_previews"
:disabled="isOpened ? false : true"
@update:checked="setConfig('crop_image_previews', $event)">
{{ t('files', 'Crop image previews') }}
Expand Down Expand Up @@ -92,7 +93,7 @@ export default {
&:hover {
color: var(--color-primary-hover);
cursor: pointer;
cursor: pointer;
}
// arrow
Expand Down
133 changes: 0 additions & 133 deletions src/components/NcIconSvgWrapper.vue

This file was deleted.

54 changes: 26 additions & 28 deletions src/components/SkipActions.vue
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<template>
<div id="content-vue" :class="['content', `app-${appName.toLowerCase()}`]">
<!-- TODO: with vue3 the `selector` attribute needs to be changed to `to="#skip-actions"` -->
<Teleport selector="#skip-actions">
<div class="vue-skip-actions__container">
<div class="vue-skip-actions__headline">
{{ t('core', 'Keyboard navigation help') }}
</div>
<div class="vue-skip-actions__buttons">
<NcButton v-show="hasAppNavigation"
type="tertiary"
href="#app-navigation-vue"
@click.prevent="openAppNavigation"
@focusin="currentFocus = 'navigation'"
@mouseover="currentFocus = 'navigation'">
{{ t('core', 'Skip to app navigation') }}
</NcButton>
<NcButton type="tertiary"
href="#app-content-vue"
@focusin="currentFocus = 'content'"
@mouseover="currentFocus = 'content'">
{{ t('core', 'Skip to main content') }}
</NcButton>
</div>
<!-- TODO: with vue3 the `selector` attribute needs to be changed to `to="#skip-actions"` -->
<Teleport selector="#skip-actions">
<div class="vue-skip-actions__container">
<div class="vue-skip-actions__headline">
{{ t('core', 'Keyboard navigation help') }}
</div>
<div class="vue-skip-actions__buttons">
<NcButton v-show="hasAppNavigation"
type="tertiary"
href="#app-navigation-vue"
@click.prevent="openAppNavigation"
@focusin="currentFocus = 'navigation'"
@mouseover="currentFocus = 'navigation'">
{{ t('core', 'Skip to app navigation') }}
</NcButton>
<NcButton type="tertiary"
href="#app-content-vue"
@focusin="currentFocus = 'content'"
@mouseover="currentFocus = 'content'">
{{ t('core', 'Skip to main content') }}
</NcButton>
</div>
<NcIconSvgWrapper v-show="!isMobile"
class="vue-skip-actions__image"
:svg="currentImage"
size="auto" />
</div>
</div>
&nbsp;<!-- TODO: Remove with vue3! This is a bug of vue-simple-portal that does not allow a single child, ref LinusBorg/vue-simple-portal#20 -->
</Teleport>
<slot />
</div>
</Teleport>
<slot />
</div>
</template>

<script>
Expand Down Expand Up @@ -74,7 +74,6 @@ export default {
},
computed: {
currentImage() {
console.log(this.currentFocus)
if (this.currentFocus === 'navigation') {
return navigationSvg
}
Expand All @@ -101,7 +100,6 @@ export default {
})
},
setAppNavigation(value) {
console.log(value)
this.hasAppNavigation = value
// If app navigation is available and no focus was set yet, set it to navigation as it is the first button
if (this.currentFocus === '') {
Expand Down
1 change: 0 additions & 1 deletion src/js/skipactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ window.addEventListener('DOMContentLoaded', function() {
if (!skipActions) return
const anchor = document.createElement('div')


anchor.id = 'skip-actions-app'
skipActions.appendChild(anchor)

Expand Down

0 comments on commit c94f526

Please sign in to comment.