-
Couldn't load subscription status.
- Fork 143
feat: setting to show/hide hidden files #1541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,17 +22,26 @@ | |
| {{ t('notes', 'Organize your notes in categories.') }} | ||
| </div> | ||
| </NcAppSettingsSection> | ||
| <NcAppSettingsSection id="notes-path-section" :name="t('notes', 'Notes path')"> | ||
| <NcAppSettingsSection id="notes-path-section" :name="t('notes', 'Notes folder')"> | ||
jrvidal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <p class="app-settings-section__desc"> | ||
| {{ t('notes', 'Folder to store your notes') }} | ||
| </p> | ||
|
|
||
| <input id="notesPath" | ||
| v-model="settings.notesPath" | ||
| type="text" | ||
| name="notesPath" | ||
| :placeholder="t('notes', 'Root directory')" | ||
| @click="onChangeNotePath" | ||
| > | ||
| <div> | ||
| <NcCheckboxRadioSwitch | ||
| v-model="settings.showHidden" | ||
| @update:checked="onChangeSettings" | ||
| > | ||
| {{ t('notes', 'Show hidden folders') }} | ||
| </NcCheckboxRadioSwitch> | ||
| </div> | ||
| </NcAppSettingsSection> | ||
| <NcAppSettingsSection id="file-suffix-section" :name="t('notes', 'File extension')"> | ||
| <p class="app-settings-section__desc"> | ||
|
|
@@ -87,6 +96,7 @@ | |
| import { | ||
| NcAppSettingsDialog, | ||
| NcAppSettingsSection, | ||
| NcCheckboxRadioSwitch, | ||
| } from '@nextcloud/vue' | ||
|
|
||
| import { getFilePickerBuilder } from '@nextcloud/dialogs' | ||
|
|
@@ -101,6 +111,7 @@ export default { | |
| components: { | ||
| NcAppSettingsDialog, | ||
| NcAppSettingsSection, | ||
| NcCheckboxRadioSwitch, | ||
| HelpMobile, | ||
| }, | ||
|
|
||
|
|
@@ -136,6 +147,7 @@ export default { | |
| { shortcut: t('notes', 'CTRL') + '+' + t('notes', 'ALT') + '+I', action: t('notes', 'Insert image') }, | ||
| { shortcut: t('notes', 'CTRL') + '+/', action: t('notes', 'Switch between editor and viewer') }, | ||
| ], | ||
| initialShowHidden: Boolean(store.state.app.settings.showHidden), | ||
| } | ||
| }, | ||
|
|
||
|
|
@@ -195,6 +207,12 @@ export default { | |
| setSettingsOpen(newValue) { | ||
| this.settingsOpen = newValue | ||
| this.$emit('update:open', newValue) | ||
|
|
||
| if (this.settingsOpen) { | ||
| this.$data.initialShowHidden = Boolean(store.state.app.settings.showHidden) | ||
| } else if (this.$data.initialShowHidden !== store.state.app.settings.showHidden) { | ||
| this.$emit('reload') | ||
| } | ||
|
Comment on lines
+211
to
+215
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm getting fancy here and trying to avoid full in-place reloads until they're absolutely needed, instead of using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems good to me. 👍 |
||
| }, | ||
| }, | ||
| } | ||
|
|
@@ -211,4 +229,8 @@ export default { | |
| .settings-block form { | ||
| display: inline-flex; | ||
| } | ||
|
|
||
| #notesPath { | ||
| margin-bottom: 1rem; | ||
| } | ||
| </style> | ||
Uh oh!
There was an error while loading. Please reload this page.