2323 </el-popover >
2424 </template >
2525 <template #body >
26- <el-scrollbar height =" 525px " class =" moz-height" >
26+ <el-scrollbar height =" 545px " class =" moz-height" >
2727 <div class =" h-app-card" v-for =" (app, index) in apps" :key =" index" >
2828 <el-row :gutter =" 5" >
2929 <el-col :span =" 5" >
6464 <div class =" h-app-content" v-else >
6565 <div >
6666 <el-dropdown trigger =" hover" >
67- <el-button plain size =" small" link class =" h-app-dropdown" >
67+ <el-button type = " primary " plain size =" small" link class =" h-app-dropdown" >
6868 {{ app.currentRow.name }}
6969 <el-icon class =" el-icon--right" ><ArrowDown /></el-icon >
7070 </el-button >
7171 <template #dropdown >
72- <el-dropdown-menu
73- v-for =" (detailItem, index2) in app.detail"
74- :key =" index2"
75- >
76- <el-dropdown-item @click =" app.currentRow = detailItem" >
72+ <el-dropdown-menu >
73+ <el-dropdown-item
74+ v-for =" (detailItem, index2) in app.detail"
75+ :key =" index2"
76+ @click =" app.currentRow = detailItem"
77+ >
7778 {{ detailItem.name + ' - ' + detailItem.version }}
7879 </el-dropdown-item >
7980 </el-dropdown-menu >
9091 size =" small"
9192 type =" primary"
9293 link
93- @click =" onOperate('stop', app.currentRow)"
94+ v-if =" app.currentRow.status !== 'Running'"
95+ @click =" onOperate('start', app.currentRow)"
9496 >
9597 {{ $t('commons.button.start') }}
9698 </el-button >
99101 size =" small"
100102 type =" primary"
101103 link
104+ v-else
102105 @click =" onOperate('stop', app.currentRow)"
103106 >
104107 {{ $t('commons.button.stop') }}
105108 </el-button >
109+ <el-button
110+ :style =" mobile ? 'margin-left: -1px' : ''"
111+ size =" small"
112+ type =" primary"
113+ link
114+ @click =" onOperate('restart', app.currentRow)"
115+ >
116+ {{ $t('commons.button.restart') }}
117+ </el-button >
106118 <el-button
107119 :style =" mobile ? 'margin-left: -1px' : ''"
108120 size =" small"
@@ -244,6 +256,7 @@ const onChangeStatus = async (row: any) => {
244256 await changeLauncherStatus (row .key , row .isShow ? ' Enable' : ' Disable' )
245257 .then (() => {
246258 loading .value = false ;
259+ MsgSuccess (i18n .global .t (' commons.msg.operationSuccess' ));
247260 search ();
248261 })
249262 .catch (() => {
@@ -266,8 +279,8 @@ const getConfig = async () => {
266279
267280const onOperate = async (operation : string , row : any ) => {
268281 ElMessageBox .confirm (
269- i18n .global .t (' app.operatorHelper' , [i18n .global .t (' app .' + operation )]),
270- i18n .global .t (' app .' + operation ),
282+ i18n .global .t (' app.operatorHelper' , [i18n .global .t (' commons.button .' + operation )]),
283+ i18n .global .t (' commons.button .' + operation ),
271284 {
272285 confirmButtonText: i18n .global .t (' commons.button.confirm' ),
273286 cancelButtonText: i18n .global .t (' commons.button.cancel' ),
@@ -276,9 +289,9 @@ const onOperate = async (operation: string, row: any) => {
276289 ).then (async () => {
277290 loading .value = true ;
278291 let params = {
279- installId: row .installId ,
292+ installId: row .installID ,
280293 operate: operation ,
281- detailId: row .detailId ,
294+ detailId: row .detailID ,
282295 };
283296 await installedOp (params )
284297 .then (() => {
@@ -353,7 +366,7 @@ defineExpose({
353366.h-app-dropdown {
354367 font-weight : 600 ;
355368 font-size : 16px ;
356- color : #1f2329 ;
369+ color : var ( --panel-text-color ) ;
357370}
358371
359372.h-app-margin {
0 commit comments