mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-05-08 00:24:06 +08:00
🎨 代码格式化
This commit is contained in:
@@ -66,20 +66,18 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import TSubLine from "../../components/main/t-subline.vue";
|
||||
import TuaOverview from "../../components/userAbyss/tua-overview.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import TuaDetail from "../../components/userAbyss/tua-detail.vue";
|
||||
// store
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
// utils
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
import TuaOverview from "../../components/userAbyss/tua-overview.vue";
|
||||
import Hutao from "../../plugins/Hutao";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
|
||||
// store
|
||||
const userStore = useUserStore();
|
||||
|
||||
@@ -41,18 +41,16 @@
|
||||
<ToUcDetail v-model="visible" :data-val="dataVal" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import TucRoleBox from "../../components/userCharacter/tuc-role-box.vue";
|
||||
import ToUcDetail from "../../components/userCharacter/tuc-detail-overlay.vue";
|
||||
// store
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
// utils
|
||||
import TucRoleBox from "../../components/userCharacter/tuc-role-box.vue";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
|
||||
// store
|
||||
const userStore = useUserStore();
|
||||
|
||||
@@ -41,22 +41,19 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { dialog, path } from "@tauri-apps/api";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import GroEcharts from "../../components/gachaRecord/gro-echarts.vue";
|
||||
import GroOverview from "../../components/gachaRecord/gro-overview.vue";
|
||||
// tauri
|
||||
import { dialog, path } from "@tauri-apps/api";
|
||||
// store
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
// utils
|
||||
import { backupUigfData, exportUigfData, readUigfData, verifyUigfData } from "../../utils/UIGF";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import { AppCharacterData, AppWeaponData } from "../../data";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import { backupUigfData, exportUigfData, readUigfData, verifyUigfData } from "../../utils/UIGF";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
|
||||
// store
|
||||
const userStore = useUserStore();
|
||||
@@ -75,12 +72,12 @@ const gachaListCur = ref<TGApp.Sqlite.GachaRecords.SingleTable[]>([]);
|
||||
const tab = ref<string>("");
|
||||
|
||||
onMounted(async () => {
|
||||
loadingTitle.value = `正在获取祈愿 UID 列表`;
|
||||
loadingTitle.value = "正在获取祈愿 UID 列表";
|
||||
selectItem.value = await TGSqlite.getUidList();
|
||||
if (selectItem.value.length === 0) {
|
||||
showSnackbar({
|
||||
color: "error",
|
||||
text: `暂无祈愿数据,请先导入祈愿数据`,
|
||||
text: "暂无祈愿数据,请先导入祈愿数据",
|
||||
});
|
||||
loading.value = false;
|
||||
return;
|
||||
@@ -88,7 +85,7 @@ onMounted(async () => {
|
||||
uidCur.value = selectItem.value[0];
|
||||
loadingTitle.value = `正在获取祈愿数据,默认 UID:${uidCur.value}`;
|
||||
gachaListCur.value = await TGSqlite.getGachaRecords(uidCur.value);
|
||||
loadingTitle.value = `正在渲染数据`;
|
||||
loadingTitle.value = "正在渲染数据";
|
||||
tab.value = "echarts";
|
||||
loading.value = false;
|
||||
showSnackbar({
|
||||
@@ -105,7 +102,7 @@ async function confirmRefresh(): Promise<void> {
|
||||
if (!confirmRes) {
|
||||
showSnackbar({
|
||||
color: "grey",
|
||||
text: `已取消刷新祈愿数据`,
|
||||
text: "已取消刷新祈愿数据",
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -122,7 +119,7 @@ async function confirmRefresh(): Promise<void> {
|
||||
} else {
|
||||
showSnackbar({
|
||||
color: "error",
|
||||
text: `获取 authkey 失败`,
|
||||
text: "获取 authkey 失败",
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -222,7 +219,7 @@ async function handleImportBtn(savePath?: string): Promise<void> {
|
||||
if (!check) {
|
||||
showSnackbar({
|
||||
color: "error",
|
||||
text: `读取 UIGF 文件失败,请检查文件是否符合规范`,
|
||||
text: "读取 UIGF 文件失败,请检查文件是否符合规范",
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -234,7 +231,7 @@ async function handleImportBtn(savePath?: string): Promise<void> {
|
||||
if (!res) {
|
||||
showSnackbar({
|
||||
color: "grey",
|
||||
text: `已取消祈愿数据导入`,
|
||||
text: "已取消祈愿数据导入",
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -244,7 +241,7 @@ async function handleImportBtn(savePath?: string): Promise<void> {
|
||||
loading.value = false;
|
||||
showSnackbar({
|
||||
color: "error",
|
||||
text: `导入的祈愿数据为空`,
|
||||
text: "导入的祈愿数据为空",
|
||||
});
|
||||
} else {
|
||||
await TGSqlite.mergeUIGF(remoteData.info.uid, remoteData.list);
|
||||
@@ -259,7 +256,7 @@ async function handleImportBtn(savePath?: string): Promise<void> {
|
||||
} else {
|
||||
showSnackbar({
|
||||
color: "grey",
|
||||
text: `已取消文件选择`,
|
||||
text: "已取消文件选择",
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -275,13 +272,13 @@ async function handleExportBtn(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
const res = await showConfirm({
|
||||
title: `是否导出祈愿数据?`,
|
||||
title: "是否导出祈愿数据?",
|
||||
text: `UID:${uidCur.value},共 ${gachaList.length} 条数据`,
|
||||
});
|
||||
if (!res) {
|
||||
showSnackbar({
|
||||
color: "grey",
|
||||
text: `已取消祈愿数据导出`,
|
||||
text: "已取消祈愿数据导出",
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -289,7 +286,7 @@ async function handleExportBtn(): Promise<void> {
|
||||
defaultPath: `UIGF_${uidCur.value}.json`,
|
||||
filters: [
|
||||
{
|
||||
name: `UIGF`,
|
||||
name: "UIGF",
|
||||
extensions: ["json"],
|
||||
},
|
||||
],
|
||||
@@ -297,7 +294,7 @@ async function handleExportBtn(): Promise<void> {
|
||||
if (!file) {
|
||||
showSnackbar({
|
||||
color: "grey",
|
||||
text: `已取消文件保存`,
|
||||
text: "已取消文件保存",
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -306,7 +303,7 @@ async function handleExportBtn(): Promise<void> {
|
||||
await exportUigfData(uidCur.value, gachaList, file);
|
||||
loading.value = false;
|
||||
showSnackbar({
|
||||
text: `祈愿数据已成功导出`,
|
||||
text: "祈愿数据已成功导出",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -321,18 +318,18 @@ async function backupGacha(): Promise<void> {
|
||||
if (gachaListCur.value.length === 0) {
|
||||
showSnackbar({
|
||||
color: "error",
|
||||
text: `暂无祈愿数据`,
|
||||
text: "暂无祈愿数据",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const res = await showConfirm({
|
||||
title: `是否备份祈愿数据?`,
|
||||
title: "是否备份祈愿数据?",
|
||||
text: `UID:${uidCur.value},共 ${gachaListCur.value.length} 条数据`,
|
||||
});
|
||||
if (!res) {
|
||||
showSnackbar({
|
||||
color: "grey",
|
||||
text: `已取消祈愿数据备份`,
|
||||
text: "已取消祈愿数据备份",
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -350,18 +347,18 @@ async function deleteGacha(): Promise<void> {
|
||||
if (gachaListCur.value.length === 0) {
|
||||
showSnackbar({
|
||||
color: "error",
|
||||
text: `暂无祈愿数据`,
|
||||
text: "暂无祈愿数据",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const firstConfirm = await showConfirm({
|
||||
title: `是否删除祈愿数据?`,
|
||||
title: "是否删除祈愿数据?",
|
||||
text: `UID:${uidCur.value},共 ${gachaListCur.value.length} 条数据`,
|
||||
});
|
||||
if (!firstConfirm) {
|
||||
showSnackbar({
|
||||
color: "grey",
|
||||
text: `已取消祈愿数据删除`,
|
||||
text: "已取消祈愿数据删除",
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -376,7 +373,7 @@ async function deleteGacha(): Promise<void> {
|
||||
if (secondConfirm === false) {
|
||||
showSnackbar({
|
||||
color: "grey",
|
||||
text: `已取消祈愿数据删除`,
|
||||
text: "已取消祈愿数据删除",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -32,21 +32,19 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import TSubLine from "../../components/main/t-subline.vue";
|
||||
import TurOverviewGrid from "../../components/userRecord/tur-overview-grid.vue";
|
||||
import TurAvatarGrid from "../../components/userRecord/tur-avatar-grid.vue";
|
||||
import TurWorldGrid from "../../components/userRecord/tur-world-grid.vue";
|
||||
import TurHomeGrid from "../../components/userRecord/tur-home-grid.vue";
|
||||
// store
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
// utils
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import TSubLine from "../../components/main/t-subline.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import TurAvatarGrid from "../../components/userRecord/tur-avatar-grid.vue";
|
||||
import TurHomeGrid from "../../components/userRecord/tur-home-grid.vue";
|
||||
import TurOverviewGrid from "../../components/userRecord/tur-overview-grid.vue";
|
||||
import TurWorldGrid from "../../components/userRecord/tur-world-grid.vue";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
|
||||
// store
|
||||
const userStore = useUserStore();
|
||||
|
||||
@@ -37,12 +37,13 @@
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
import HtaOverlayOverview from "../../components/hutaoAbyss/hta-overlay-overview.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import HtaTabUse from "../../components/hutaoAbyss/hta-tab-use.vue";
|
||||
import HtaTabUp from "../../components/hutaoAbyss/hta-tab-up.vue";
|
||||
import HtaTabTeam from "../../components/hutaoAbyss/hta-tab-team.vue";
|
||||
import HtaTabHold from "../../components/hutaoAbyss/hta-tab-hold.vue";
|
||||
import HtaTabTeam from "../../components/hutaoAbyss/hta-tab-team.vue";
|
||||
import HtaTabUp from "../../components/hutaoAbyss/hta-tab-up.vue";
|
||||
import HtaTabUse from "../../components/hutaoAbyss/hta-tab-use.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
// plugins
|
||||
import Hutao from "../../plugins/Hutao";
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
|
||||
@@ -8,14 +8,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { ref, computed } from "vue";
|
||||
|
||||
import TibWikiAvatar from "../../components/itembox/tib-wiki-avatar.vue";
|
||||
// utils
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { AppCharacterData } from "../../data";
|
||||
// plugins
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
|
||||
// snackbar
|
||||
const snackbar = ref(false);
|
||||
|
||||
@@ -103,15 +103,13 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
// utils
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { AppGCGData } from "../../data";
|
||||
// plugins
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
|
||||
// loading
|
||||
const loading = ref<boolean>(true);
|
||||
|
||||
@@ -8,14 +8,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { ref, computed } from "vue";
|
||||
|
||||
import TibWikiWeapon from "../../components/itembox/tib-wiki-weapon.vue";
|
||||
// utils
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { AppWeaponData } from "../../data";
|
||||
// plugins
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
|
||||
// snackbar
|
||||
const snackbar = ref<boolean>(false);
|
||||
|
||||
@@ -107,21 +107,18 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { dialog, fs } from "@tauri-apps/api";
|
||||
import { computed, onBeforeMount, onMounted, ref } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
// tauri
|
||||
import { dialog, fs } from "@tauri-apps/api";
|
||||
// Store
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import { AppAchievementSeriesData } from "../../data";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { useAchievementsStore } from "../../store/modules/achievements";
|
||||
// Utils
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { getUiafHeader, readUiafData, verifyUiafData } from "../../utils/UIAF";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { AppAchievementSeriesData } from "../../data";
|
||||
|
||||
// Store
|
||||
const achievementsStore = useAchievementsStore();
|
||||
|
||||
@@ -80,16 +80,14 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
// store
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
// utils
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import TGUtils from "../../web/utils/TGUtils";
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
|
||||
// store
|
||||
const appStore = useAppStore();
|
||||
|
||||
@@ -150,25 +150,22 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import ToGameLogin from "../../components/overlay/to-gameLogin.vue";
|
||||
// tauri
|
||||
import { app, fs, os } from "@tauri-apps/api";
|
||||
// store
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import ToGameLogin from "../../components/overlay/to-gameLogin.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { useAchievementsStore } from "../../store/modules/achievements";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { useHomeStore } from "../../store/modules/home";
|
||||
import { useAchievementsStore } from "../../store/modules/achievements";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
// utils
|
||||
import { backupUiafData, restoreUiafData } from "../../utils/UIAF";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import { backupAbyssData, backupCookieData } from "../../web/utils/backupData";
|
||||
import { restoreAbyssData, restoreCookieData } from "../../web/utils/restoreData";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
|
||||
// Store
|
||||
const appStore = useAppStore();
|
||||
|
||||
@@ -6,18 +6,16 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { markRaw, onMounted, onUnmounted, onUpdated, ref } from "vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
import TCalendar from "../../components/home/t-calendar.vue";
|
||||
import TPool from "../../components/home/t-pool.vue";
|
||||
import TPosition from "../../components/home/t-position.vue";
|
||||
import TCalendar from "../../components/home/t-calendar.vue";
|
||||
// store
|
||||
import { useHomeStore } from "../../store/modules/home";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
// utils
|
||||
import { useHomeStore } from "../../store/modules/home";
|
||||
import { getBuildTime } from "../../utils/TGBuild";
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
|
||||
// store
|
||||
const appStore = useAppStore();
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
import showGeetest from "../../components/func/geetest";
|
||||
|
||||
const visible = ref<boolean>(false);
|
||||
|
||||
Reference in New Issue
Block a user