mirror of
https://github.com/gotson/komga.git
synced 2026-04-26 08:53:54 +02: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: {
|
watch: {
|
||||||
value (val) {
|
value (val) {
|
||||||
|
if (val) this.dialogInit()
|
||||||
this.modalFileBrowser = val
|
this.modalFileBrowser = val
|
||||||
},
|
},
|
||||||
modalFileBrowser (val) {
|
modalFileBrowser (val) {
|
||||||
|
|
@ -100,10 +101,15 @@ export default Vue.extend({
|
||||||
default: 'Choose',
|
default: 'Choose',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async mounted () {
|
|
||||||
this.getDirs()
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
|
dialogInit () {
|
||||||
|
try {
|
||||||
|
this.getDirs(this.path)
|
||||||
|
this.selectedPath = this.path
|
||||||
|
} catch (e) {
|
||||||
|
this.getDirs()
|
||||||
|
}
|
||||||
|
},
|
||||||
dialogCancel () {
|
dialogCancel () {
|
||||||
this.$emit('input', false)
|
this.$emit('input', false)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@
|
||||||
|
|
||||||
<v-text-field v-model="form.path"
|
<v-text-field v-model="form.path"
|
||||||
label="Root folder"
|
label="Root folder"
|
||||||
disabled
|
|
||||||
:error-messages="getErrors('path')"
|
:error-messages="getErrors('path')"
|
||||||
@input="$v.form.path.$touch()"
|
@input="$v.form.path.$touch()"
|
||||||
@blur="$v.form.path.$touch()"
|
@blur="$v.form.path.$touch()"
|
||||||
|
|
@ -85,8 +84,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue'
|
|
||||||
import FileBrowserDialog from '@/components/FileBrowserDialog.vue'
|
import FileBrowserDialog from '@/components/FileBrowserDialog.vue'
|
||||||
|
import Vue from 'vue'
|
||||||
import { required } from 'vuelidate/lib/validators'
|
import { required } from 'vuelidate/lib/validators'
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue