diff --git a/src/assets/index.css b/src/assets/index.css
index 00b630f8..821591a2 100644
--- a/src/assets/index.css
+++ b/src/assets/index.css
@@ -1,7 +1,7 @@
/*
* @file assets/index.css
* @description 全局样式文件
- * @since Beta v0.3.5
+ * @since Beta v0.5.3
*/
@import "fonts/index.css";
@@ -37,6 +37,14 @@
--tgc-yellow-2: #f4d8a8; /* Genshin confirm text */
--tgc-yellow-3: #e0c06b; /* Genshin btn border */
+ /* color one-dark */
+ --tgc-od-blue: #61afef; /* one-dark blue */
+ --tgc-od-green: #98c379; /* one-dark green */
+ --tgc-od-orange: #d19a66; /* one-dark orange */
+ --tgc-od-white: #abb2bf; /* one-dark white */
+ --tgc-od-red: #e06c75; /* one-dark red */
+ --tgc-od-purple: #c678dd; /* one-dark purple */
+
/* some css same in dark and default theme */
--tgc-btn-1: var(--tgc-dark-7); /* button bg */
}
diff --git a/src/components/userAvatar/tua-avatar-box.vue b/src/components/userAvatar/tua-avatar-box.vue
new file mode 100644
index 00000000..b530daa6
--- /dev/null
+++ b/src/components/userAvatar/tua-avatar-box.vue
@@ -0,0 +1,414 @@
+
+
+
+
+
+
+
+
+
+
+

+
{{ props.modelValue.base.fetter }}
+
+
+
+ mdi-lock-outline
+
+
+ mdi-tshirt-crew-outline
+
+
+
+
+
+
![nameCard]()
+
+
+
+
![skill]()
+
Lv.{{ skill.level }}
+
+
+
+
+
+
+
+
+
+
+
![relic]()
+
![relic]()
+
+
+
![bg]()
+
+
+ {{ relic.level }}
+
+
+
+
+
+ {{ relic === false ? getRelicName(index) : getPropName(relic) }}
+
+
+ {{ relic !== false ? relic.main_property.value : "" }}
+
+
+
+
+
+
+
+
diff --git a/src/pages/common/Test.vue b/src/pages/common/Test.vue
index 85c1c394..64798c68 100644
--- a/src/pages/common/Test.vue
+++ b/src/pages/common/Test.vue
@@ -18,15 +18,22 @@
获取角色列表
获取角色详情
+
+
+
diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts
index 3a7c8bc1..e6ad2750 100644
--- a/src/store/modules/user.ts
+++ b/src/store/modules/user.ts
@@ -56,12 +56,18 @@ export const useUserStore = defineStore(
return res;
}
+ function getProp(prop: number): TGApp.Game.Avatar.PropMapItem | false {
+ if (!propMap.value) return false;
+ return propMap.value[prop.toString()] || false;
+ }
+
return {
cookie,
briefInfo,
account,
propMap,
getAllCookie,
+ getProp,
};
},
{
diff --git a/src/utils/toolFunc.ts b/src/utils/toolFunc.ts
index eb6a8155..9ba12e15 100644
--- a/src/utils/toolFunc.ts
+++ b/src/utils/toolFunc.ts
@@ -224,3 +224,31 @@ export function parseHtmlText(desc: string): string {
desc = desc.replace(/\\n/g, "
");
return desc;
}
+
+/**
+ * @description 根据英文element获取中文
+ * @since Beta v0.5.3
+ * @param {string} element - 英文element
+ * @returns {string} 中文element
+ */
+export function getZhElement(element: string): string {
+ const elementUpper = element.toUpperCase();
+ switch (elementUpper) {
+ case "ANEMO":
+ return "风";
+ case "CRYO":
+ return "冰";
+ case "DENDRO":
+ return "草";
+ case "ELECTRO":
+ return "雷";
+ case "GEO":
+ return "岩";
+ case "HYDRO":
+ return "水";
+ case "PYRO":
+ return "火";
+ default:
+ return "未知";
+ }
+}