mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-07 08:42:49 +08:00
🌱 干饭去了
This commit is contained in:
@@ -31,7 +31,8 @@
|
||||
"https://passport-api.mihoyo.com/*",
|
||||
"https://passport-api-v4.mihoyo.com/*",
|
||||
"https://act-webstatic.mihoyo.com/*",
|
||||
"https://sdk-webstatic.mihoyo.com/*"
|
||||
"https://sdk-webstatic.mihoyo.com/*",
|
||||
"https://homa.snapgenshin.com/*"
|
||||
]
|
||||
},
|
||||
"shell": {
|
||||
|
||||
43
src/components/hutaoAbyss/hta-overlay-overview.vue
Normal file
43
src/components/hutaoAbyss/hta-overlay-overview.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<TOverlay v-model="visible" hide :to-click="onCancel" blur-val="0px">
|
||||
<div class="hta-oo-box">
|
||||
<TSubLine>数据收集统计</TSubLine>
|
||||
<TSubLine>深渊数据统计</TSubLine>
|
||||
</div>
|
||||
</TOverlay>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { computed } from "vue";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
import TSubLine from "../main/t-subline.vue";
|
||||
|
||||
interface HtaOverlayOverviewProps {
|
||||
modelValue: boolean;
|
||||
data?: TGApp.Plugins.Hutao.AbyssOverview;
|
||||
}
|
||||
|
||||
interface HtaOverlayOverviewEmits {
|
||||
(e: "update:modelValue", value: TGApp.Plugins.Hutao.AbyssOverview): void;
|
||||
}
|
||||
|
||||
const props = defineProps<HtaOverlayOverviewProps>();
|
||||
const emits = defineEmits<HtaOverlayOverviewEmits>();
|
||||
|
||||
const visible = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value) => emits("update:modelValue", value),
|
||||
});
|
||||
|
||||
function onCancel () {
|
||||
visible.value = false;
|
||||
}
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.hta-oo-box {
|
||||
width: 300px;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
background: rgb(255 255 255/30%);
|
||||
}
|
||||
</style>
|
||||
@@ -1,3 +1,49 @@
|
||||
<template>
|
||||
<div>胡桃数据库</div>
|
||||
<div class="hta-title">
|
||||
<span>胡桃数据库</span>
|
||||
<span @click="showDialog = true">更新于 {{ getUpdated() }}</span>
|
||||
</div>
|
||||
<HtaOverlayOverview v-model="showDialog" :data="overview" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { onMounted, ref } from "vue";
|
||||
// utils
|
||||
import HutaoRequest from "../../plugins/Hutao";
|
||||
import HtaOverlayOverview from "../../components/hutaoAbyss/hta-overlay-overview.vue";
|
||||
|
||||
const showDialog = ref(false);
|
||||
|
||||
// data
|
||||
const overview = ref({} as TGApp.Plugins.Hutao.AbyssOverview);
|
||||
|
||||
onMounted(async () => {
|
||||
overview.value = await HutaoRequest.Abyss.getOverview();
|
||||
});
|
||||
|
||||
function getUpdated () {
|
||||
return new Date(overview.value.timestamp)
|
||||
.toLocaleString("zh-CN", { hour12: false })
|
||||
.replace(/\//g, "-");
|
||||
}
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.hta-title {
|
||||
font-family: var(--font-title);
|
||||
font-size: 20px;
|
||||
display: flex;
|
||||
align-items: end;
|
||||
justify-content: start;
|
||||
}
|
||||
|
||||
.hta-title :nth-child(2) {
|
||||
margin-left: 10px;
|
||||
font-size: 12px;
|
||||
color: #5e7987; /* 淡蓝灰 */
|
||||
}
|
||||
|
||||
.hta-title :nth-child(2):hover {
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user