mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-25 02:45:48 +03:00
fix: Remove savePath rule when creating category (#970)
This commit is contained in:
parent
10ada6ed23
commit
9f59632d91
13 changed files with 19 additions and 31 deletions
|
@ -16,15 +16,15 @@
|
|||
:autofocus="!hasInitialCategory"
|
||||
:disabled="hasInitialCategory"
|
||||
/>
|
||||
<v-text-field v-model="category.savePath" :rules="pathRules" :label="$t('path')" required :autofocus="hasInitialCategory" />
|
||||
<v-text-field v-model="category.savePath" :label="$t('path')" :autofocus="hasInitialCategory" />
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-divider />
|
||||
<v-card-actions class="justify-end">
|
||||
<v-btn v-if="!hasInitialCategory" class="accent white--text elevation-0 px-4" @click="create" :disabled="!isValid">
|
||||
<v-btn v-if="!hasInitialCategory" class="accent white--text elevation-0 px-4" :disabled="!isValid" @click="create">
|
||||
{{ $t('create') }}
|
||||
</v-btn>
|
||||
<v-btn v-else class="accent white--text elevation-0 px-4" @click="edit" :disabled="!isValid">
|
||||
<v-btn v-else class="accent white--text elevation-0 px-4" :disabled="!isValid" @click="edit">
|
||||
{{ $t('edit') }}
|
||||
</v-btn>
|
||||
<v-btn class="error white--text elevation-0 px-4" @click="cancel">
|
||||
|
@ -62,11 +62,8 @@ export default {
|
|||
nameRules() {
|
||||
return [v => !!v || this.$t('modals.newCategory.tipOnNoName')]
|
||||
},
|
||||
pathRules() {
|
||||
return [v => !!v || this.$t('modals.newCategory.tipOnNoPath')]
|
||||
},
|
||||
isValid() {
|
||||
return !!this.category.name && !!this.category.savePath
|
||||
return !!this.category.name
|
||||
}
|
||||
},
|
||||
created() {
|
|
@ -31,7 +31,7 @@ import qbit from '@/services/qbit'
|
|||
import { Modal } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CreateTagDialog',
|
||||
name: 'CreateNewTagDialog',
|
||||
mixins: [Modal],
|
||||
data() {
|
||||
return {
|
|
@ -1,4 +1,4 @@
|
|||
import CreateNewTagDialog from './CreateTagDialog.vue'
|
||||
import CreateNewCategoryDialog from './CreateCategoryDialog.vue'
|
||||
import CreateNewTagDialog from './CreateNewTagDialog.vue'
|
||||
import CreateNewCategoryDialog from './CreateNewCategoryDialog.vue'
|
||||
|
||||
export { CreateNewTagDialog, CreateNewCategoryDialog }
|
||||
|
|
|
@ -90,10 +90,10 @@ export default {
|
|||
this.$store.commit('FETCH_TAGS')
|
||||
},
|
||||
createTag() {
|
||||
this.createModal('CreateTagDialog')
|
||||
this.createModal('CreateNewTagDialog')
|
||||
},
|
||||
createCategory() {
|
||||
this.createModal('CreateCategoryDialog')
|
||||
this.createModal('CreateNewCategoryDialog')
|
||||
},
|
||||
async deleteCategory(category) {
|
||||
await qbit.deleteCategory([category.name])
|
||||
|
@ -104,7 +104,7 @@ export default {
|
|||
this.$store.commit('FETCH_TAGS')
|
||||
},
|
||||
editCategory(cat) {
|
||||
this.createModal('CreateCategoryDialog', { initialCategory: cat })
|
||||
this.createModal('CreateNewCategoryDialog', { initialCategory: cat })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -643,8 +643,7 @@
|
|||
"newCategory": {
|
||||
"categoryName": "Category name",
|
||||
"Path": "Path",
|
||||
"tipOnNoName": "Category name is required",
|
||||
"tipOnNoPath": "Path is required"
|
||||
"tipOnNoName": "Category name is required"
|
||||
},
|
||||
"newTag": {
|
||||
"createNewTag": "Create New Tag",
|
||||
|
|
|
@ -351,8 +351,7 @@
|
|||
"newCategory": {
|
||||
"categoryName": "Nom de la catégorie",
|
||||
"Path": "Chemin d'accès",
|
||||
"tipOnNoName": "Le nom de la catégorie est obligatoire",
|
||||
"tipOnNoPath": "Le chemin d'accès est obligatoire"
|
||||
"tipOnNoName": "Le nom de la catégorie est obligatoire"
|
||||
},
|
||||
"newTag": {
|
||||
"createNewTag": "Créer un nouveau tag",
|
||||
|
|
|
@ -271,8 +271,7 @@
|
|||
"newCategory": {
|
||||
"categoryName": "Nama kategori",
|
||||
"Path": "Path",
|
||||
"tipOnNoName": "Nama kategori diperlukan",
|
||||
"tipOnNoPath": "Path is required"
|
||||
"tipOnNoName": "Nama kategori diperlukan"
|
||||
},
|
||||
"newTag": {
|
||||
"createNewTag": "Buat Tag Baru",
|
||||
|
|
|
@ -266,8 +266,7 @@
|
|||
"newCategory": {
|
||||
"categoryName": "カテゴリ名",
|
||||
"Path": "パス",
|
||||
"tipOnNoName": "カテゴリ名が必要です",
|
||||
"tipOnNoPath": "パスが必要です"
|
||||
"tipOnNoName": "カテゴリ名が必要です"
|
||||
},
|
||||
"newTag": {
|
||||
"createNewTag": "タグを作成",
|
||||
|
|
|
@ -608,8 +608,7 @@
|
|||
"newCategory": {
|
||||
"categoryName": "Название категории",
|
||||
"Path": "Путь",
|
||||
"tipOnNoName": "Требуется название категории",
|
||||
"tipOnNoPath": "Нужный путь"
|
||||
"tipOnNoName": "Требуется название категории"
|
||||
},
|
||||
"newTag": {
|
||||
"createNewTag": "Создать новый тэг",
|
||||
|
|
|
@ -608,8 +608,7 @@
|
|||
"newCategory": {
|
||||
"categoryName": "Назва категорії",
|
||||
"Path": "Шлях",
|
||||
"tipOnNoName": "Вкажіть назву категорії",
|
||||
"tipOnNoPath": "Вкажіть шлях до теки"
|
||||
"tipOnNoName": "Вкажіть назву категорії"
|
||||
},
|
||||
"newTag": {
|
||||
"createNewTag": "Створити нову мітку",
|
||||
|
|
|
@ -334,8 +334,7 @@
|
|||
"newCategory": {
|
||||
"categoryName": "Tên danh mục",
|
||||
"Path": "Nơi lưu",
|
||||
"tipOnNoName": "Tên danh mục là bắt buộc",
|
||||
"tipOnNoPath": "Nơi lưu là bắt buộc"
|
||||
"tipOnNoName": "Tên danh mục là bắt buộc"
|
||||
},
|
||||
"newTag": {
|
||||
"createNewTag": "Tạo thẻ mới",
|
||||
|
|
|
@ -637,8 +637,7 @@
|
|||
"newCategory": {
|
||||
"categoryName": "分类名称",
|
||||
"Path": "路径",
|
||||
"tipOnNoName": "分类名称是必须的",
|
||||
"tipOnNoPath": "路径是必须的"
|
||||
"tipOnNoName": "分类名称是必须的"
|
||||
},
|
||||
"newTag": {
|
||||
"createNewTag": "新建标签",
|
||||
|
|
|
@ -643,8 +643,7 @@
|
|||
"newCategory": {
|
||||
"categoryName": "分類名稱",
|
||||
"Path": "路徑",
|
||||
"tipOnNoName": "必須填寫分類名稱",
|
||||
"tipOnNoPath": "必須填寫路徑"
|
||||
"tipOnNoName": "必須填寫分類名稱"
|
||||
},
|
||||
"newTag": {
|
||||
"createNewTag": "新增標籤",
|
||||
|
|
Loading…
Reference in a new issue