mirror of
https://github.com/gotson/komga.git
synced 2025-12-22 00:13:30 +01:00
feat(webui): allow direct input of library path in add dialog
closes #88
This commit is contained in:
parent
0297210dc2
commit
6ece7b12be
2 changed files with 10 additions and 5 deletions
|
|
@ -79,6 +79,7 @@ export default Vue.extend({
|
|||
},
|
||||
watch: {
|
||||
value (val) {
|
||||
if (val) this.dialogInit()
|
||||
this.modalFileBrowser = val
|
||||
},
|
||||
modalFileBrowser (val) {
|
||||
|
|
@ -100,10 +101,15 @@ export default Vue.extend({
|
|||
default: 'Choose',
|
||||
},
|
||||
},
|
||||
async mounted () {
|
||||
this.getDirs()
|
||||
},
|
||||
methods: {
|
||||
dialogInit () {
|
||||
try {
|
||||
this.getDirs(this.path)
|
||||
this.selectedPath = this.path
|
||||
} catch (e) {
|
||||
this.getDirs()
|
||||
}
|
||||
},
|
||||
dialogCancel () {
|
||||
this.$emit('input', false)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
|
||||
<v-text-field v-model="form.path"
|
||||
label="Root folder"
|
||||
disabled
|
||||
:error-messages="getErrors('path')"
|
||||
@input="$v.form.path.$touch()"
|
||||
@blur="$v.form.path.$touch()"
|
||||
|
|
@ -85,8 +84,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue'
|
||||
import FileBrowserDialog from '@/components/FileBrowserDialog.vue'
|
||||
import Vue from 'vue'
|
||||
import { required } from 'vuelidate/lib/validators'
|
||||
|
||||
export default Vue.extend({
|
||||
|
|
|
|||
Loading…
Reference in a new issue