fix: 更新风险插件警告对话框内容和按钮文本,修正样式 By @Soulter

Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
This commit is contained in:
Raven95676
2025-07-04 11:23:19 +08:00
parent a4e999c47f
commit 210cc58cc3
3 changed files with 11 additions and 17 deletions
@@ -115,8 +115,8 @@
},
"danger_warning": {
"title": "Dangerous Plugin Warning",
"message": "This plugin has been flagged as containing security risks, including unsafe code or functionalities that may cause system malfunctions or data loss. You are solely responsible for any consequences resulting from installing or using this plugin. Do you wish to proceed with the installation?",
"confirm": "I understand the risks and wish to continue",
"message": "This plugin has been flagged as containing security risks, including unsafe code or functionalities that may cause system malfunctions or data loss. Do you wish to proceed with the installation?",
"confirm": "Continue",
"cancel": "Cancel"
}
},
@@ -169,8 +169,5 @@
"errors": {
"confirmNotRegistered": "$confirm not properly registered"
}
},
"tags": {
"danger": "Dangerous Plugin"
}
}
@@ -114,9 +114,9 @@
"fromUrl": "从链接安装"
},
"danger_warning": {
"title": "风险插件警告",
"message": "该插件已被标记为存在安全风险,包含不安全的代码或功能,可能导致系统异常或数据损失等,安装使用此插件所造成的后果自负。请确认是否继续安装?",
"confirm": "我已知晓风险,继续安装",
"title": "警告",
"message": "该插件可能包含不安全的代码或功能,可能导致系统异常或数据损失等。请确认是否继续安装?",
"confirm": "继续",
"cancel": "取消"
}
},
@@ -169,8 +169,5 @@
"errors": {
"confirmNotRegistered": "$confirm 未正确注册"
}
},
"tags": {
"danger": "风险插件"
}
}
+6 -6
View File
@@ -904,8 +904,8 @@ onMounted(async () => {
</template>
<template v-slot:item.tags="{ item }">
<span v-if="item.tags.length === 0">-</span>
<v-chip v-for="tag in item.tags" :key="tag" :color="tag === 'danger' ? 'error' : 'primary'" size="x-small">
{{ tag === 'danger' ? tm('tags.danger') : tag }}</v-chip>
<v-chip v-for="tag in item.tags" :key="tag" :color="tag === 'danger' ? 'error' : 'primary'" size="x-small" v-show="tag !== 'danger'">
{{ tag }}</v-chip>
</template>
<template v-slot:item.actions="{ item }">
<v-btn v-if="!item.installed" class="text-none mr-2" size="x-small" variant="flat"
@@ -1115,18 +1115,18 @@ onMounted(async () => {
<v-dialog v-model="dangerConfirmDialog" width="500" persistent>
<v-card>
<v-card-title class="text-h5 d-flex align-center">
<v-icon color="error" class="mr-2">mdi-alert-circle</v-icon>
<v-icon color="warning" class="mr-2">mdi-alert-circle</v-icon>
{{ tm('dialogs.danger_warning.title') }}
</v-card-title>
<v-card-text>
<div class="font-weight-medium">{{ tm('dialogs.danger_warning.message') }}</div>
<div>{{ tm('dialogs.danger_warning.message') }}</div>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="grey" variant="text" @click="cancelDangerInstall">
<v-btn color="grey" @click="cancelDangerInstall">
{{ tm('dialogs.danger_warning.cancel') }}
</v-btn>
<v-btn color="error" variant="elevated" @click="confirmDangerInstall">
<v-btn color="warning" @click="confirmDangerInstall">
{{ tm('dialogs.danger_warning.confirm') }}
</v-btn>
</v-card-actions>