feat: add hide dotfiles param (#1148)
This commit is contained in:
@@ -32,7 +32,8 @@
|
||||
"toggleSidebar": "Toggle sidebar",
|
||||
"update": "Update",
|
||||
"upload": "Upload",
|
||||
"permalink": "Get Permanent Link"
|
||||
"permalink": "Get Permanent Link",
|
||||
"hideDotfiles": "Hide dotfiles"
|
||||
},
|
||||
"success": {
|
||||
"linkCopied": "Link copied!"
|
||||
@@ -188,7 +189,8 @@
|
||||
"execute": "Execute commands",
|
||||
"rename": "Rename or move files and directories",
|
||||
"share": "Share files"
|
||||
}
|
||||
},
|
||||
"hideDotfiles": "Hide dotfiles"
|
||||
},
|
||||
"sidebar": {
|
||||
"help": "Help",
|
||||
@@ -244,4 +246,4 @@
|
||||
"downloadFile": "Download File",
|
||||
"downloadFolder": "Download Folder"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<p><input type="checkbox" v-model="hideDotfiles"> {{ $t('settings.hideDotfiles') }}</p>
|
||||
<h3>{{ $t('settings.language') }}</h3>
|
||||
<languages class="input input--block" :locale.sync="locale"></languages>
|
||||
</div>
|
||||
@@ -67,6 +68,7 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.locale = this.user.locale
|
||||
this.hideDotfiles = this.user.hideDotfiles
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([ 'updateUser' ]),
|
||||
@@ -90,8 +92,8 @@ export default {
|
||||
event.preventDefault()
|
||||
|
||||
try {
|
||||
const data = { id: this.user.id, locale: this.locale }
|
||||
await api.update(data, ['locale'])
|
||||
const data = { id: this.user.id, locale: this.locale, hideDotfiles: this.hideDotfiles }
|
||||
await api.update(data, ['locale', 'hideDotfiles'])
|
||||
this.updateUser(data)
|
||||
this.$showSuccess(this.$t('settings.settingsUpdated'))
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user