feat: 云端变量操作菜单添加查看记录入口

- stream 类型变量下拉菜单增加「查看记录」选项
- 添加 List 图标导入
- 添加中英文国际化文本
This commit is contained in:
2026-05-07 19:42:37 +08:00
parent d01e20dfd5
commit f1f2a9dc9d
3 changed files with 12 additions and 1 deletions
@@ -1,7 +1,7 @@
import type { ColumnDef } from '@tanstack/vue-table'
import type { Composer } from 'vue-i18n'
import { Download, File, MoreHorizontal, Pencil, Power, PowerOff, Trash2 } from 'lucide-vue-next'
import { Download, File, List, MoreHorizontal, Pencil, Power, PowerOff, Trash2 } from 'lucide-vue-next'
import { h } from 'vue'
import type { CloudVariable } from '@/pages/admin/cloud-variables/data/schema'
@@ -176,6 +176,15 @@ export function getColumns(actions: {
]),
]
if (variable.var_type === 'stream' && actions.onViewRecords) {
items.push(
h(DropdownMenuItem, { onClick: () => actions.onViewRecords!(variable) }, () => [
h(List, { class: 'mr-2 h-4 w-4' }),
t('admin.cloudVariables.viewRecords'),
]),
)
}
if (variable.var_type === 'binary') {
items.push(
h(DropdownMenuItem, { onClick: () => actions.onDownload(variable) }, () => [
+1
View File
@@ -1852,6 +1852,7 @@
"userScope": "User Scope",
"allScopes": "All Scopes",
"edit": "Edit",
"viewRecords": "View Records",
"delete": "Delete",
"enable": "Enable",
"disable": "Disable",
+1
View File
@@ -1754,6 +1754,7 @@
"notLinked": "未关联",
"unknownApp": "未知应用",
"edit": "编辑",
"viewRecords": "查看记录",
"delete": "删除",
"enable": "启用",
"disable": "禁用",