feat: 云端变量操作菜单添加查看记录入口
- stream 类型变量下拉菜单增加「查看记录」选项 - 添加 List 图标导入 - 添加中英文国际化文本
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import type { ColumnDef } from '@tanstack/vue-table'
|
import type { ColumnDef } from '@tanstack/vue-table'
|
||||||
import type { Composer } from 'vue-i18n'
|
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 { h } from 'vue'
|
||||||
|
|
||||||
import type { CloudVariable } from '@/pages/admin/cloud-variables/data/schema'
|
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') {
|
if (variable.var_type === 'binary') {
|
||||||
items.push(
|
items.push(
|
||||||
h(DropdownMenuItem, { onClick: () => actions.onDownload(variable) }, () => [
|
h(DropdownMenuItem, { onClick: () => actions.onDownload(variable) }, () => [
|
||||||
|
|||||||
@@ -1852,6 +1852,7 @@
|
|||||||
"userScope": "User Scope",
|
"userScope": "User Scope",
|
||||||
"allScopes": "All Scopes",
|
"allScopes": "All Scopes",
|
||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
|
"viewRecords": "View Records",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"enable": "Enable",
|
"enable": "Enable",
|
||||||
"disable": "Disable",
|
"disable": "Disable",
|
||||||
|
|||||||
@@ -1754,6 +1754,7 @@
|
|||||||
"notLinked": "未关联",
|
"notLinked": "未关联",
|
||||||
"unknownApp": "未知应用",
|
"unknownApp": "未知应用",
|
||||||
"edit": "编辑",
|
"edit": "编辑",
|
||||||
|
"viewRecords": "查看记录",
|
||||||
"delete": "删除",
|
"delete": "删除",
|
||||||
"enable": "启用",
|
"enable": "启用",
|
||||||
"disable": "禁用",
|
"disable": "禁用",
|
||||||
|
|||||||
Reference in New Issue
Block a user