feat:设置页cookie默认不显示明文与资源标题点击复制链接

This commit is contained in:
jiangrui
2025-03-12 12:58:09 +08:00
parent 8fa1ed8fc2
commit ef0de7ad8c
2 changed files with 60 additions and 8 deletions

View File

@@ -48,20 +48,35 @@
<van-cell-group inset>
<van-field
v-model="localUserSettings.cloud115Cookie"
:type="showCloud115Cookie ? 'text' : 'password'"
label="115网盘"
type="textarea"
rows="2"
autosize
placeholder="请输入115网盘Cookie"
/>
>
<template #right-icon>
<van-icon
:name="showCloud115Cookie ? 'eye-o' : 'closed-eye'"
@click="showCloud115Cookie = !showCloud115Cookie"
/>
</template>
</van-field>
<van-field
v-model="localUserSettings.quarkCookie"
:type="showQuarkCookie ? 'text' : 'password'"
label="夸克网盘"
type="textarea"
rows="2"
autosize
placeholder="请输入夸克网盘Cookie"
/>
>
<template #right-icon>
<van-icon
:name="showQuarkCookie ? 'eye-o' : 'closed-eye'"
@click="showQuarkCookie = !showQuarkCookie"
/>
</template>
</van-field>
</van-cell-group>
</div>
@@ -122,6 +137,10 @@ const localUserSettings = ref<UserSettingAttributes>({
quarkCookie: "",
});
// 添加显示/隐藏密码的状态
const showCloud115Cookie = ref(false);
const showQuarkCookie = ref(false);
// 监听 store 变化
watch(
() => settingStore.globalSetting,
@@ -252,4 +271,15 @@ const handleProxyHostChange = (val: string) => {
:deep(.van-cell-group--inset) {
margin: 0;
}
// 添加图标样式
:deep(.van-field__right-icon) {
padding: 0 8px;
cursor: pointer;
color: var(--theme-color);
.van-icon {
font-size: 18px;
}
}
</style>