diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx
index 0ba1f77..04ebe4d 100644
--- a/src/renderer/src/App.tsx
+++ b/src/renderer/src/App.tsx
@@ -139,22 +139,32 @@ function MainContent(): React.JSX.Element {
/>
- {/* 开发中画面水印 */}
-
- 开发中画面,不代表真正品质 ({getArchitecture()})
+ opacity: 0.6,
+ zIndex: 9999
+ }}>
+
+ 开发中画面,不代表最终品质
+
+ SecScore Dev ({getPlatform()}-{getArchitecture()})
+
+
)
}
@@ -166,16 +176,31 @@ function getArchitecture(): string {
if (userAgent.includes('arm64') || userAgent.includes('aarch64')) {
return 'ARM64';
- } else if (userAgent.includes('x86_64') || userAgent.includes('amd64')) {
- return 'x86_64';
+ } else if (userAgent.includes('x64') || userAgent.includes('amd64')) {
+ return 'x64';
} else if (userAgent.includes('i386') || userAgent.includes('i686')) {
return 'x86';
}
// 默认返回未知架构
- return 'Unknown';
+ return userAgent;
}
+function getPlatform(): string {
+
+ // 尝试从 userAgent 中获取平台信息
+ const userAgent = navigator.userAgent.toLowerCase();
+
+ if (userAgent.includes('windows')) {
+ return 'Windows';
+ } else if (userAgent.includes('mac')) {
+ return 'Mac';
+ } else if (userAgent.includes('linux')) {
+ return 'Linux';
+ }
+
+ return 'Unknown';
+}
function App(): React.JSX.Element {
return (
diff --git a/src/renderer/src/components/TagEditorDialog.tsx b/src/renderer/src/components/TagEditorDialog.tsx
index ae7af62..2bf0a2d 100644
--- a/src/renderer/src/components/TagEditorDialog.tsx
+++ b/src/renderer/src/components/TagEditorDialog.tsx
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react'
import { Dialog, Input, Button, Space, Tag, MessagePlugin } from 'tdesign-react'
+import { useTheme } from '../contexts/ThemeContext' // 导入主题上下文
interface Tag {
id: number
@@ -25,6 +26,9 @@ export const TagEditorDialog: React.FC = ({
const [allTags, setAllTags] = useState([])
const [selectedTagIds, setSelectedTagIds] = useState>(new Set(initialTagIds))
const [loading, setLoading] = useState(false)
+ const { currentTheme } = useTheme() // 获取当前主题
+
+ const themeMode = currentTheme?.mode || 'light'; // 默认为 light
useEffect(() => {
if (visible) {
@@ -54,8 +58,8 @@ export const TagEditorDialog: React.FC = ({
const trimmed = inputValue.trim()
if (!trimmed) return
- if (trimmed.length > 50) {
- MessagePlugin.error('标签名称不能超过 50 个字符')
+ if (trimmed.length > 30) {
+ MessagePlugin.error('标签名称不能超过 30 个字符')
return
}
@@ -175,7 +179,7 @@ export const TagEditorDialog: React.FC = ({
handleToggleTag(tag.id)}
style={{ cursor: 'pointer' }}
@@ -202,7 +206,7 @@ export const TagEditorDialog: React.FC = ({
handleDeleteTag(tag.id)}
style={{ cursor: 'pointer' }}