11<script setup lang="ts">
22import { useI18n } from ' vue-i18n'
3- import { Logout , Plus , Refresh , Setting , ShareOne } from ' @icon-park/vue-next'
4- import { AppApi , BrowserWindowApi , NotificationApi } from ' @widget-js/core'
3+ import { LoadingOne , Logout , Plus , Refresh , Setting , ShareOne } from ' @icon-park/vue-next'
4+ import { AppApi , BrowserWindowApi , NotificationApi , WidgetApi } from ' @widget-js/core'
55import { ref } from ' vue'
66import SocialLinks from ' @/views/tray/SocialLinks.vue'
77import { useAppRuntimeInfo } from ' @/composition/useAppRuntimeInfo'
@@ -25,6 +25,9 @@ function copyAndReport() {
2525 NotificationApi .success (t (' tray.infoCopied' ))
2626 BrowserWindowApi .openUrl (' https://support.qq.com/product/450189' , { external: true })
2727}
28+ function restartWidgets() {
29+ WidgetApi .restartWidgets ()
30+ }
2831 </script >
2932
3033<template >
@@ -67,6 +70,20 @@ function copyAndReport() {
6770 <ShareOne />
6871 {{ t('tray.shareApp') }}
6972 </div >
73+ <el-popconfirm
74+ width =" 200"
75+ :cancel-button-text =" t('tray.no')"
76+ :confirm-button-text =" t('tray.yes')"
77+ :title =" t('tray.restartWidgetsConfirm')"
78+ @confirm =" restartWidgets"
79+ >
80+ <template #reference >
81+ <div class =" menu-item" >
82+ <LoadingOne />
83+ {{ t('tray.restartWidgets') }}
84+ </div >
85+ </template >
86+ </el-popconfirm >
7087 <div class =" menu-item" @click =" AppApi.exit" >
7188 <Logout />
7289 {{ t('tray.exit') }}
0 commit comments