mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
Merge pull request #332 from Seed680/v2
This commit is contained in:
@@ -38,6 +38,24 @@ async function handleReset() {
|
|||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let loginType = ref('username')
|
||||||
|
if (props.conf.token) {
|
||||||
|
loginType = ref('token')
|
||||||
|
} else if (props.conf.username) {
|
||||||
|
loginType = ref('username')
|
||||||
|
} else {
|
||||||
|
loginType = ref('guest')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据源
|
||||||
|
const sourceItems = [
|
||||||
|
{
|
||||||
|
'title': t('dialog.alistConfig.loginTypeOptions.username'),
|
||||||
|
'value': 'username',
|
||||||
|
},
|
||||||
|
{ 'title': t('dialog.alistConfig.loginTypeOptions.token'), 'value': 'token' },
|
||||||
|
{ 'title': t('dialog.alistConfig.loginTypeOptions.guest'), 'value': 'guest' },
|
||||||
|
]
|
||||||
|
|
||||||
// 保存alist设置
|
// 保存alist设置
|
||||||
async function savaAlistConfig() {
|
async function savaAlistConfig() {
|
||||||
@@ -63,7 +81,16 @@ async function savaAlistConfig() {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="3">
|
||||||
|
<VSelect
|
||||||
|
v-model="loginType"
|
||||||
|
:items="sourceItems"
|
||||||
|
:label="t('dialog.alistConfig.loginType')"
|
||||||
|
:hint="t('dialog.alistConfig.loginType')"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="4" v-if="loginType == 'username'">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="props.conf.username"
|
v-model="props.conf.username"
|
||||||
:hint="t('dialog.alistConfig.username')"
|
:hint="t('dialog.alistConfig.username')"
|
||||||
@@ -71,7 +98,7 @@ async function savaAlistConfig() {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="5" v-if="loginType == 'username'">
|
||||||
<VTextField
|
<VTextField
|
||||||
type="password"
|
type="password"
|
||||||
v-model="props.conf.password"
|
v-model="props.conf.password"
|
||||||
@@ -80,6 +107,14 @@ async function savaAlistConfig() {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
<VCol cols="9" v-if="loginType == 'token'">
|
||||||
|
<VTextField
|
||||||
|
v-model="props.conf.token"
|
||||||
|
:hint="t('dialog.alistConfig.loginTypeOptions.token')"
|
||||||
|
:label="t('dialog.alistConfig.loginTypeOptions.token')"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
<VCardActions>
|
<VCardActions>
|
||||||
|
|||||||
@@ -1494,7 +1494,7 @@ export default {
|
|||||||
loginTypeOptions: {
|
loginTypeOptions: {
|
||||||
guest: '访客',
|
guest: '访客',
|
||||||
username: '用户名密码',
|
username: '用户名密码',
|
||||||
token: 'Token',
|
token: '令牌',
|
||||||
},
|
},
|
||||||
complete: '完成',
|
complete: '完成',
|
||||||
reset: '重置',
|
reset: '重置',
|
||||||
|
|||||||
Reference in New Issue
Block a user