Skip to content

Commit

Permalink
系统状态标题加上阴影,beta版本最终优化
Browse files Browse the repository at this point in the history
  • Loading branch information
hslr-s committed Jan 9, 2024
1 parent fc56328 commit 53d1f38
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 26 deletions.
2 changes: 1 addition & 1 deletion service/assets/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8|1.2.1
9|1.3.0-beta24-01-09
8 changes: 6 additions & 2 deletions src/components/apps/About/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,24 @@ onMounted(() => {
</div>
<NDivider> • </NDivider>
<div class="flex flex-col items-center justify-center text-base">
<div>
<a href="https://github.com/hslr-s/sun-panel/releases" target="_blank" class="link">{{ $t('apps.about.checkUpdate') }}</a>
</div>

<div>
{{ $t('apps.about.issue') }}<a href="https://github.com/hslr-s/sun-panel/issues" target="_blank" class="link">Github Issues</a>
</div>

<div>
{{ $t('apps.about.QQGroup') }}<a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=_I9WIoJn1roIdoaAqelSj9qClLKlXIa1&authKey=GfsQP2GagHnus0jMc7U8Sm6VhWjtsipXUzCHbFwQsGyHMgmYWx6ZbAP%2Bhut%2B4D6N&noverify=0&group_code=276594668" target="_blank" class="link">276594668</a>
{{ $t('apps.about.QQGroup') }}<a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=_I9WIoJn1roIdoaAqelSj9qClLKlXIa1&authKey=GfsQP2GagHnus0jMc7U8Sm6VhWjtsipXUzCHbFwQsGyHMgmYWx6ZbAP%2Bhut%2B4D6N&noverify=0&group_code=276594668" target="_blank" class="link">{{ $t("apps.about.addQQGroupUrl") }}</a>
|
<span class="link cursor-pointer" @click="qqGroupQRShow = !qqGroupQRShow">
{{ $t('apps.about.QR') }}
</span>
</div>

<div>
{{ $t('apps.about.author') }}<a href="https://blog.enianteam.com/u/sun/content/11" target="_blank" class="link">红烧猎人</a> | <a href="https://github.com/hslr-s/sun-panel/blob/master/doc/donate.md" target="_blank" class="text-red-600 hover:text-red-900">{{ $t('apps.about.donate') }}</a>
{{ $t('apps.about.author') }}<a href="https://github.com/hslr-s" target="_blank" class="link">红烧猎人</a> | <a href="https://github.com/hslr-s/sun-panel/blob/master/doc/donate.md" target="_blank" class="text-red-600 hover:text-red-900">{{ $t('apps.about.donate') }}</a>
</div>

<div class="flex mt-[10px]">
Expand Down
2 changes: 1 addition & 1 deletion src/components/apps/ImportExport/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ async function handleStartImport() {
</div>

<div class="flex justify-center">
<a href="https://hslr-s.github.io/sun-panel-tool-page/#/" target="_blank">浏览器书签转换工具</a>
<a href="https://hslr-s.github.io/sun-panel-tool-page/#/" target="_blank">{{ $t('apps.exportImport.transmuteStandard') }}</a>
</div>

<!-- 调试模式 -->
Expand Down
10 changes: 10 additions & 0 deletions src/components/apps/Style/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { t } from '@/locales'
const authStore = useAuthStore()
const panelState = usePanelState()
const ms = useMessage()
const showWallpaperInput = ref(false)
const isSaveing = ref(false)
Expand Down Expand Up @@ -211,6 +212,14 @@ function resetPanelConfig() {
</NUploadDragger>
</NUpload>

<div class="flex items-center mt-[5px]">
<span class="mr-[10px]">{{ $t('apps.baseSettings.customImageAddress') }}</span>
<NSwitch v-model:value="showWallpaperInput" />
</div>
<div v-if="showWallpaperInput" class="mt-1">
<NInput v-model:value="panelState.panelConfig.backgroundImageSrc" type="text" size="small" clearable />
</div>

<div class="flex items-center mt-[10px]">
<span class="mr-[10px]">{{ $t('apps.baseSettings.vague') }}</span>
<NSlider v-model:value="panelState.panelConfig.backgroundBlur" class="max-w-[200px]" :step="2" :max="20" />
Expand Down Expand Up @@ -268,6 +277,7 @@ function resetPanelConfig() {
<NInput
v-model:value="panelState.panelConfig.footerHtml"
type="textarea"
clearable
/>
</NCard>

Expand Down
28 changes: 14 additions & 14 deletions src/components/apps/UserInfo/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NButton, NCard, NDivider, NForm, NFormItem, NInput, NSelect, useDialog,
import { ref } from 'vue'
import { useAppStore, useAuthStore, usePanelState, useUserStore } from '@/store'
import { languageOptions } from '@/utils/defaultData'
import type { Language, Theme } from '@/store/modules/app/helper'
import type { Language } from '@/store/modules/app/helper'
import { logout } from '@/api'
import { RoundCardModal, SvgIcon } from '@/components/common/'
import { updateInfo, updatePassword } from '@/api/system/user'
Expand All @@ -19,15 +19,15 @@ const ms = useMessage()
const dialog = useDialog()
const languageValue = ref(appStore.language)
const themeValue = ref(appStore.theme)
// const themeValue = ref(appStore.theme)
const nickName = ref(authStore.userInfo?.name || '')
const isEditNickNameStatus = ref(false)
const formRef = ref<FormInst | null>(null)
const themeOptions: { label: string; key: string; value: Theme }[] = [
{ label: t('apps.userInfo.themeStyle.dark'), key: 'dark', value: 'dark' },
{ label: t('apps.userInfo.themeStyle.light'), key: 'light', value: 'light' },
{ label: t('apps.userInfo.themeStyle.auto'), key: 'Auto', value: 'auto' },
]
// const themeOptions: { label: string; key: string; value: Theme }[] = [
// { label: t('apps.userInfo.themeStyle.dark'), key: 'dark', value: 'dark' },
// { label: t('apps.userInfo.themeStyle.light'), key: 'light', value: 'light' },
// { label: t('apps.userInfo.themeStyle.auto'), key: 'Auto', value: 'auto' },
// ]
const updatePasswordModalState = ref({
show: false,
loading: false,
Expand Down Expand Up @@ -138,11 +138,11 @@ function handleChangeLanuage(value: Language) {
location.reload()
}
function handleChangeTheme(value: Theme) {
themeValue.value = value
appStore.setTheme(value)
// location.reload()
}
// function handleChangeTheme(value: Theme) {
// themeValue.value = value
// appStore.setTheme(value)
// // location.reload()
// }
</script>

<template>
Expand Down Expand Up @@ -187,14 +187,14 @@ function handleChangeTheme(value: Theme) {
</div>
</div>

<div class="mt-[10px]">
<!-- <div class="mt-[10px]">
<div class="text-slate-500 font-bold">
{{ $t('apps.userInfo.theme') }}
</div>
<div class="max-w-[200px]">
<NSelect v-model:value="themeValue" :options="themeOptions" @update-value="handleChangeTheme" />
</div>
</div>
</div> -->

<NDivider style="margin: 10px 0;" dashed />
<div>
Expand Down
10 changes: 9 additions & 1 deletion src/components/deskModule/SystemMonitor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,15 @@ function handleRightMenuSelect(key: string | number) {
</div>
</template>

<style>
<style scoped>
.text-shadow {
text-shadow: 2px 2px 50px rgb(0, 0, 0);
}
.app-icon-text-shadow {
text-shadow: 2px 2px 5px rgb(0, 0, 0);
}
.icon-info-box {
width: 100%;
display: grid;
Expand Down
8 changes: 6 additions & 2 deletions src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
"about": {
"QQGroup": "QQ Group:",
"QR": "QR Code (Recommended)",
"addQQGroupUrl": "Click to add",
"appName": "About",
"author": "Author:",
"checkUpdate": "Check for new version",
"donate": "🧧 Donate",
"issue": "Feedback:",
"viewUpdateLog": "Click here to view update log"
Expand All @@ -42,6 +44,7 @@
"configSaved": "Configuration saved",
"contentArea": "Content area",
"customFooter": "Custom footer",
"customImageAddress": "Custom image address",
"detailIcon": "Detail icon",
"hideDescription": "Hide description information",
"hideTitle": "Hide title",
Expand Down Expand Up @@ -76,6 +79,7 @@
"selectImportData": "Select the configuration data to import",
"softwareVersionLow": "The current software version may be too old and may not be compatible with this configuration file. It is recommended to update the software to the latest version before importing again.",
"tip": "Importing icon configuration data will not clear existing icon data",
"transmuteStandard": "Transmute Standard",
"warnConfigFileLow": "The configuration file version is too low but compatible"
},
"itemGroupManage": {
Expand Down Expand Up @@ -216,8 +220,8 @@
},
"login": {
"loginButton": "Login",
"passwordPlaceholder": "Enter password",
"usernamePlaceholder": "Enter username",
"passwordPlaceholder": "Password",
"usernamePlaceholder": "Username",
"welcomeMessage": "Welcome back!"
},
"panelHome": {
Expand Down
10 changes: 7 additions & 3 deletions src/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
"about": {
"QQGroup": "QQ交流群:",
"QR": "二维码(推荐)",
"addQQGroupUrl": "点击添加",
"appName": "关于",
"author": "作者:",
"checkUpdate": "检查新版本",
"donate": "🧧打赏",
"issue": "建议反馈:",
"viewUpdateLog": "点此查看更新说明"
Expand All @@ -41,6 +43,7 @@
"configSaved": "配置已保存",
"contentArea": "内容区域",
"customFooter": "自定义footer",
"customImageAddress": "自定义图片地址",
"detailIcon": "详情图标",
"hideDescription": "隐藏描述信息",
"hideTitle": "隐藏标题",
Expand Down Expand Up @@ -75,6 +78,7 @@
"selectImportData": "请选择要导入的配置数据",
"softwareVersionLow": "当前软件版本可能过旧,很有可能无法兼容该配置文件,请谨慎导入。推荐将软件更新到新版后再次导入",
"tip": "导入图标配置数据不会清空现有图标数据",
"transmuteStandard": "浏览器书签转换工具",
"warnConfigFileLow": "配置文件版本过低,但是兼容"
},
"itemGroupManage": {
Expand Down Expand Up @@ -154,7 +158,7 @@
"serverError": "服务器错误",
"show": "显示",
"sort": "排序",
"style": "样式",
"style": "风格",
"success": "操作成功",
"text": "文字",
"textColor": "文字颜色",
Expand Down Expand Up @@ -215,8 +219,8 @@
},
"login": {
"loginButton": "登录",
"passwordPlaceholder": "请输入密码",
"usernamePlaceholder": "请输入账号",
"passwordPlaceholder": "密码",
"usernamePlaceholder": "账号",
"welcomeMessage": "欢迎回来!"
},
"panelHome": {
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/panel/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PanelPanelConfigStyleEnum, PanelStateNetworkModeEnum } from '@/enums'
import defaultBackground from '@/assets/defaultBackground.webp'
const LOCAL_NAME = 'panelStorage'

const defaultFooterHtml = '<div class="flex justify-center text-slate-300">Powered By <a href="https://github.com/hslr-s/sun-panel" target="_blank" class="ml-[5px]">Sun-Panel</a></div>'
const defaultFooterHtml = '<div class="flex justify-center text-slate-300" style="margin-top:100px">Powered By <a href="https://github.com/hslr-s/sun-panel" target="_blank" class="ml-[5px]">Sun-Panel</a></div>'

export function defaultStatePanelConfig(): Panel.panelConfig {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/views/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ function handleAddItem(itemIconGroupId?: number) {
</template>
</NButton>
<NButton v-if="authStore.visitMode === VisitMode.VISIT_MODE_PUBLIC" color="#2a2a2a6b" :title="t('panelHome.goToLogin')" @click="router.push('/login')">
<NButton v-if="authStore.visitMode === VisitMode.VISIT_MODE_PUBLIC" color="#2a2a2a6b" :title="$t('panelHome.goToLogin')" @click="router.push('/login')">
<template #icon>
<SvgIcon class="text-white font-xl" icon="material-symbols:account-circle" />
</template>
Expand Down

0 comments on commit 53d1f38

Please sign in to comment.