Skip to content

适配 widgets 在 Vector 2022 夜间模式下的显示#311

Open
FireflySentinel wants to merge 1 commit into
MooncellWiki:mainfrom
FireflySentinel:vector2022-night-mode
Open

适配 widgets 在 Vector 2022 夜间模式下的显示#311
FireflySentinel wants to merge 1 commit into
MooncellWiki:mainfrom
FireflySentinel:vector2022-night-mode

Conversation

@FireflySentinel

Copy link
Copy Markdown
Contributor

变更内容

适配多个 widget 在 Vector 2022 夜间模式下的显示。

主要改动

  • 为 widget 接入 wiki 主题检测与 Naive UI 深色主题。
  • 统一处理背景、文字、边框、表格、筛选区、卡片和控件状态。
  • 修复自绘筛选按钮在深色背景下阴影过重的问题。
  • 保留 ISEvent 原有的事件卡片、图标底色和事件导航配色。

验证

  • pnpm build
  • 本地预览检查 ArkSign、CVList、VoiceTable、GachaSimulatorV2、HrCalculator、ISEvent、MedalShowcase、ArkSign、XbMapViewer 等页面的深色显示。

Comment thread src/entries/ArkSign.ts
@@ -1,6 +1,6 @@
import { createApp } from "vue";

import "virtual:uno.css";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没必要拆文件,打包会自动去重,warning不用管

Comment thread src/utils/vueuse.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用vueuse会tree shaking,为啥要自己写?

Comment thread templates/VoiceTable.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

格式化问题

Comment thread pnpm-workspace.yaml Outdated
@@ -1,3 +1,6 @@
packages:
- "."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是干啥的?

Comment thread src/widgets/dark-mode.css

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

分拆成公用的和各个widget的,各个widget的写到各个widget目录下面去,在scoped style里import进去

Comment thread src/widgets/EquipList/index.vue Outdated
import { getWikiTheme, isWikiDarkMode } from "@/utils/theme";
import { isMobile } from "@/utils/utils";

import "../dark-mode.css";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

走css @import吧,不过要确认下scss的写法vite支持没

@FireflySentinel FireflySentinel force-pushed the vector2022-night-mode branch from 163158d to 7760849 Compare June 22, 2026 06:57
@FireflySentinel

FireflySentinel commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

已按 review 调整,pnpm build 通过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants