@@ -21,12 +21,12 @@ async function handleDeleteApp() {
21
21
loading .value = true
22
22
try {
23
23
await appStore .deleteApp (props .app .id )
24
- toast .success (t (' appDetailDialog. deleteSuccess' ))
24
+ toast .success (t (' deleteSuccess' ))
25
25
open .value = false
26
26
}
27
27
catch (error ) {
28
28
console .error (' Delete Failed:' , error )
29
- toast .error (t (' appDetailDialog. deleteFailed' ))
29
+ toast .error (t (' deleteFailed' ))
30
30
}
31
31
finally {
32
32
loading .value = false
@@ -35,12 +35,12 @@ async function handleDeleteApp() {
35
35
36
36
function formatDate(dateString : string ) {
37
37
if (! dateString )
38
- return t (' appDetailDialog. unknown' )
38
+ return t (' unknown' )
39
39
try {
40
40
return new Date (dateString ).toLocaleString ()
41
41
}
42
42
catch {
43
- return t (' appDetailDialog. invalidDate' )
43
+ return t (' invalidDate' )
44
44
}
45
45
}
46
46
</script >
@@ -49,7 +49,7 @@ function formatDate(dateString: string) {
49
49
<Dialog v-model:open =" open" >
50
50
<DialogContent class =" max-w-md" >
51
51
<DialogHeader >
52
- <DialogTitle >{{ t('appDetailDialog. title') }}</DialogTitle >
52
+ <DialogTitle >{{ t('title') }}</DialogTitle >
53
53
</DialogHeader >
54
54
55
55
<div class =" space-y-4" >
@@ -61,14 +61,14 @@ function formatDate(dateString: string) {
61
61
</div >
62
62
63
63
<p class =" text-muted-foreground text-sm" >
64
- {{ app.description || t('appDetailDialog. noDescription') }}
64
+ {{ app.description || t('noDescription') }}
65
65
</p >
66
66
</div >
67
67
68
68
<div class =" space-y-3 border-t pt-4" >
69
69
<div class =" text-sm" >
70
70
<div >
71
- <span class =" text-gray-500 dark:text-gray-200" >{{ t('appDetailDialog. appId') }}:</span >
71
+ <span class =" text-gray-500 dark:text-gray-200" >{{ t('appId') }}:</span >
72
72
<p class =" font-mono text-xs bg-gray-100 dark:bg-white/10 p-1 rounded mt-1 break-all" >
73
73
{{ app.id }}
74
74
</p >
@@ -77,13 +77,13 @@ function formatDate(dateString: string) {
77
77
78
78
<div class =" grid grid-cols-2 gap-4 text-sm" >
79
79
<div >
80
- <span class =" text-gray-500" >{{ t('appDetailDialog. createdAt') }}:</span >
80
+ <span class =" text-gray-500" >{{ t('createdAt') }}:</span >
81
81
<p class =" mt-1" >
82
82
{{ formatDate(app.createdAt) }}
83
83
</p >
84
84
</div >
85
85
<div v-if =" app.lastActiveAt" >
86
- <span class =" text-gray-500" >{{ t('appDetailDialog. lastActiveAt') }}:</span >
86
+ <span class =" text-gray-500" >{{ t('lastActiveAt') }}:</span >
87
87
<p class =" mt-1" >
88
88
{{ formatDate(app.lastActiveAt) }}
89
89
</p >
@@ -93,25 +93,25 @@ function formatDate(dateString: string) {
93
93
94
94
<div class =" border-t border-red-200 dark:border-red-800 pt-4" >
95
95
<h4 class =" text-sm font-medium text-red-800 dark:text-red-500 mb-2" >
96
- {{ t('appDetailDialog. dangerZone') }}
96
+ {{ t('dangerZone') }}
97
97
</h4 >
98
98
<AlertDialog >
99
99
<AlertDialogTrigger as-child >
100
100
<Button variant =" destructive" size =" sm" class =" w-full bg-red-600/70! hover:bg-red-600/60!" :disabled =" loading" >
101
- {{ t('appDetailDialog. deleteApp') }}
101
+ {{ t('deleteApp') }}
102
102
</Button >
103
103
</AlertDialogTrigger >
104
104
<AlertDialogContent >
105
105
<AlertDialogHeader >
106
- <AlertDialogTitle >{{ t('appDetailDialog. confirmDeleteTitle') }}</AlertDialogTitle >
106
+ <AlertDialogTitle >{{ t('confirmDeleteTitle') }}</AlertDialogTitle >
107
107
<AlertDialogDescription >
108
- {{ t('appDetailDialog. confirmDeleteDescription', { appName: app.name }) }}
108
+ {{ t('confirmDeleteDescription', { appName: app.name }) }}
109
109
</AlertDialogDescription >
110
110
</AlertDialogHeader >
111
111
<AlertDialogFooter >
112
- <AlertDialogCancel >{{ t('common. cancel') }}</AlertDialogCancel >
112
+ <AlertDialogCancel >{{ t('cancel') }}</AlertDialogCancel >
113
113
<AlertDialogAction @click =" handleDeleteApp" >
114
- {{ t('common. delete') }}
114
+ {{ t('delete') }}
115
115
</AlertDialogAction >
116
116
</AlertDialogFooter >
117
117
</AlertDialogContent >
@@ -121,3 +121,40 @@ function formatDate(dateString: string) {
121
121
</DialogContent >
122
122
</Dialog >
123
123
</template >
124
+
125
+ <i18n lang="yaml">
126
+ en-US :
127
+ title : Application Details
128
+ noDescription : No description
129
+ appId : Application ID
130
+ createdAt : Created At
131
+ lastActiveAt : Last Active
132
+ unknown : Unknown
133
+ invalidDate : Invalid Date
134
+ dangerZone : Danger Zone
135
+ deleteApp : Delete Application
136
+ confirmDeleteTitle : Confirm Delete Application
137
+ confirmDeleteDescription : |
138
+ Are you sure you want to delete application "{appName}"? This action cannot
139
+ be undone and all application data will be permanently deleted.
140
+ deleteSuccess : Application deleted successfully
141
+ deleteFailed : Failed to delete application
142
+ delete : Delete
143
+ cancel : Cancel
144
+ zh-CN :
145
+ title : 应用详细信息
146
+ noDescription : 暂无描述
147
+ appId : 应用ID
148
+ createdAt : 创建时间
149
+ lastActiveAt : 最后活跃
150
+ unknown : 未知
151
+ invalidDate : 无效日期
152
+ dangerZone : 危险操作
153
+ deleteApp : 删除应用
154
+ confirmDeleteTitle : 确认删除应用
155
+ confirmDeleteDescription : ' 您确定要删除应用 "{appName}" 吗?此操作不可撤销,应用的所有数据将被永久删除。'
156
+ deleteSuccess : 应用删除成功
157
+ deleteFailed : 删除应用失败
158
+ delete : 删除
159
+ cancel : 取消
160
+ </i18n >
0 commit comments