mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 15:36:49 +08:00
Merge pull request #48 from thsrite/customization
This commit is contained in:
@@ -11,6 +11,9 @@ const customIdentifiers = ref('')
|
|||||||
// 自定义制作组
|
// 自定义制作组
|
||||||
const customReleaseGroups = ref('')
|
const customReleaseGroups = ref('')
|
||||||
|
|
||||||
|
// 自定义占位符
|
||||||
|
const customization = ref('')
|
||||||
|
|
||||||
// 文件整理屏蔽词
|
// 文件整理屏蔽词
|
||||||
const transferExcludeWords = ref('')
|
const transferExcludeWords = ref('')
|
||||||
|
|
||||||
@@ -42,6 +45,20 @@ async function queryCustomReleaseGroups() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询已设置的自定义占位符
|
||||||
|
async function queryCustomization() {
|
||||||
|
try {
|
||||||
|
const result: { [key: string]: any } = await api.get(
|
||||||
|
'system/setting/Customization',
|
||||||
|
)
|
||||||
|
|
||||||
|
customization.value = result.data?.value.join('\n')
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 查询已设置的屏蔽词
|
// 查询已设置的屏蔽词
|
||||||
async function queryTransferExcludeWords() {
|
async function queryTransferExcludeWords() {
|
||||||
try {
|
try {
|
||||||
@@ -94,6 +111,25 @@ async function saveCustomReleaseGroups() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 保存自定义占位符
|
||||||
|
async function saveCustomization() {
|
||||||
|
try {
|
||||||
|
// 用户名密码
|
||||||
|
const result: { [key: string]: any } = await api.post(
|
||||||
|
'system/setting/Customization',
|
||||||
|
customization.value.split('\n'),
|
||||||
|
)
|
||||||
|
|
||||||
|
if (result.success)
|
||||||
|
$toast.success('自定义占位符保存成功')
|
||||||
|
else
|
||||||
|
$toast.error('自定义占位符保存失败!')
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 保存文件整理屏蔽词
|
// 保存文件整理屏蔽词
|
||||||
async function saveTransferExcludeWords() {
|
async function saveTransferExcludeWords() {
|
||||||
try {
|
try {
|
||||||
@@ -116,6 +152,7 @@ async function saveTransferExcludeWords() {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
queryCustomIdentifiers()
|
queryCustomIdentifiers()
|
||||||
queryCustomReleaseGroups()
|
queryCustomReleaseGroups()
|
||||||
|
queryCustomization()
|
||||||
queryTransferExcludeWords()
|
queryTransferExcludeWords()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -166,6 +203,26 @@ onMounted(() => {
|
|||||||
</VCardItem>
|
</VCardItem>
|
||||||
</VCard>
|
</VCard>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
<VCol cols="12">
|
||||||
|
<VCard title="自定义占位符">
|
||||||
|
<VCardSubtitle> 添加自定义占位符识别正则,重命名格式中添加{{customization}}使用。 </VCardSubtitle>
|
||||||
|
<VCardItem>
|
||||||
|
<VTextarea
|
||||||
|
v-model="customization"
|
||||||
|
auto-grow
|
||||||
|
placeholder="多个匹配对象请换行分隔,支持正则表达式,特殊字符注意转义"
|
||||||
|
/>
|
||||||
|
</VCardItem>
|
||||||
|
<VCardItem>
|
||||||
|
<VBtn
|
||||||
|
type="submit"
|
||||||
|
@click="saveCustomization"
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</VBtn>
|
||||||
|
</VCardItem>
|
||||||
|
</VCard>
|
||||||
|
</VCol>
|
||||||
<VCol cols="12">
|
<VCol cols="12">
|
||||||
<VCard title="文件整理屏蔽词">
|
<VCard title="文件整理屏蔽词">
|
||||||
<VCardSubtitle> 目录名或文件名中包含屏蔽词时不进行整理。 </VCardSubtitle>
|
<VCardSubtitle> 目录名或文件名中包含屏蔽词时不进行整理。 </VCardSubtitle>
|
||||||
|
|||||||
Reference in New Issue
Block a user