| | |
| | | import { upgradeLogList } from '@/mock/upgrade/changeLog' |
| | | import { ElNotification } from 'element-plus' |
| | | import { $t } from '@/locales' |
| | | import { useUserStore } from '@/store/modules/user' |
| | | import { StorageConfig } from '@/utils/storage/storage-config' |
| | | class VersionManager { |
| | |
| | | const { title: content } = upgradeLogList.value[0] |
| | | const messageParts = [ |
| | | `<p style="color: var(--art-gray-800) !important; padding-bottom: 5px;">`, |
| | | `系统已升级到 ${StorageConfig.CURRENT_VERSION} 版本,此次更新带来了以下改进:`, |
| | | $t('message.systemUpgradeIntro', { version: StorageConfig.CURRENT_VERSION }), |
| | | `</p>`, |
| | | content |
| | | ] |
| | | if (requireReLogin) { |
| | | messageParts.push( |
| | | `<p style="color: var(--theme-color); padding-top: 5px;">升级完成,请重新登录后继续使用。</p>` |
| | | `<p style="color: var(--theme-color); padding-top: 5px;">${$t('message.systemUpgradeRelogin')}</p>` |
| | | ) |
| | | } |
| | | return messageParts.join('') |
| | |
| | | */ |
| | | showUpgradeNotification(message) { |
| | | ElNotification({ |
| | | title: '系统升级公告', |
| | | title: $t('message.systemUpgradeTitle'), |
| | | message, |
| | | duration: 0, |
| | | type: 'success', |