mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 21:18:54 +03:00
perf(modals): add autofocus (#955)
This commit is contained in:
parent
34e43f6add
commit
5f33d94d88
7 changed files with 35 additions and 34 deletions
|
@ -19,7 +19,7 @@
|
|||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
<v-text-field v-model="newPath" :label="$t('directory')" :prepend-icon="mdiFolder" @keydown.enter="setLocation" />
|
||||
<v-text-field v-model="newPath" :label="$t('directory')" :prepend-icon="mdiFolder" autofocus @keydown.enter="setLocation" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
@ -39,8 +39,8 @@
|
|||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
import { mdiFile, mdiFolder, mdiClose } from '@mdi/js'
|
||||
import { Modal, FullScreenModal } from '@/mixins'
|
||||
import {mdiClose, mdiFile, mdiFolder} from '@mdi/js'
|
||||
import {FullScreenModal, Modal} from '@/mixins'
|
||||
import qbit from '@/services/qbit'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<v-container>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field v-model="name" clearable :label="$t('modals.rename.torrentName')" :prepend-inner-icon="mdiFile" />
|
||||
<v-text-field v-model="name" clearable :label="$t('modals.rename.torrentName')" autofocus :prepend-inner-icon="mdiFile" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<v-card-text>
|
||||
<v-form ref="feedForm" class="px-6 mt-3">
|
||||
<v-container v-if="!hasInitialFeed">
|
||||
<v-text-field v-model="feed.url" :rules="rules" :label="$t('modals.newFeed.url')" required />
|
||||
<v-text-field v-model="feed.url" :rules="rules" :label="$t('modals.newFeed.url')" autofocus required />
|
||||
</v-container>
|
||||
<v-container>
|
||||
<v-text-field v-model="feed.name" :rules="rules" :label="$t('modals.newFeed.feedName')" required />
|
||||
<v-text-field v-model="feed.name" :rules="rules" :label="$t('modals.newFeed.feedName')" autofocus required />
|
||||
</v-container>
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<script lang="ts">
|
||||
import qbit from '@/services/qbit'
|
||||
import {Modal} from '@/mixins'
|
||||
import { mdiCancel, mdiTagPlus, mdiPencil } from '@mdi/js'
|
||||
import {mdiCancel, mdiPencil, mdiTagPlus} from '@mdi/js'
|
||||
import {defineComponent} from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<v-col cols="12" sm="6">
|
||||
<v-form ref="form">
|
||||
<v-container>
|
||||
<v-text-field v-model="rule.name" :label="$t('modals.newRule.name')" required />
|
||||
<v-text-field v-model="rule.name" :label="$t('modals.newRule.name')" autofocus required />
|
||||
|
||||
<v-divider />
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
<v-text-field v-model="installInput" :label="$t('modals.searchPluginManager.install.label')" required />
|
||||
<v-text-field v-model="installInput" :label="$t('modals.searchPluginManager.install.label')" autofocus required />
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-container>
|
||||
<v-text-field v-model="category.name" :rules="nameRules" :label="$t('modals.newCategory.categoryName')" required :disabled="hasInitialCategory" />
|
||||
<v-text-field v-model="category.savePath" :rules="pathRules" :label="$t('path')" required />
|
||||
<v-text-field v-model="category.name" :rules="nameRules" :label="$t('modals.newCategory.categoryName')" required :autofocus="!hasInitialCategory" :disabled="hasInitialCategory" />
|
||||
<v-text-field v-model="category.savePath" :rules="pathRules" :label="$t('path')" required :autofocus="hasInitialCategory" />
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-divider />
|
||||
|
@ -32,7 +32,7 @@
|
|||
import {mapGetters} from 'vuex'
|
||||
import qbit from '@/services/qbit'
|
||||
import {Modal} from '@/mixins'
|
||||
import { mdiCancel, mdiTagPlus, mdiPencil } from '@mdi/js'
|
||||
import {mdiCancel, mdiPencil, mdiTagPlus} from '@mdi/js'
|
||||
import Vue from 'vue'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-container>
|
||||
<v-text-field v-model="tagname" :rules="rules" :label="$t('modals.newTag.tagName')" required />
|
||||
<v-text-field v-model="tagname" :rules="rules" :label="$t('modals.newTag.tagName')" autofocus required />
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-divider />
|
||||
|
@ -27,6 +27,7 @@
|
|||
<script>
|
||||
import qbit from '@/services/qbit'
|
||||
import {Modal} from '@/mixins'
|
||||
|
||||
export default {
|
||||
name: 'CreateTagDialog',
|
||||
mixins: [Modal],
|
||||
|
|
Loading…
Reference in a new issue