forked from bot/app
📝 [docs]: 新增在线展示
This commit is contained in:
parent
8b77ced05e
commit
83a2d36209
@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import getText from "../scripts/i18nData";
|
||||
import getText from "../components/scripts/i18nData.ts";
|
||||
import {ref} from "vue";
|
||||
|
||||
const onlineText = getText('online');
|
||||
@ -38,14 +38,14 @@ setInterval(updateData, 10000);
|
||||
<span class=dot style="background-color: #00a6ff"></span>
|
||||
<span class="text">{{ totalText }}</span>
|
||||
</div>
|
||||
<div class="number">{{total.valueOf() < 0 ? getText('fetching') : total.valueOf()}}</div>
|
||||
<div class="number">{{ total }}</div>
|
||||
</div>
|
||||
<div id="online" class="section">
|
||||
<div class="line">
|
||||
<span class=dot style="background-color: #00ff00"></span>
|
||||
<span class="text">{{ onlineText }}</span>
|
||||
</div>
|
||||
<div class="number">{{ online.valueOf() < 0 ? getText('fetching') : online.valueOf()}}</div>
|
||||
<div class="number">{{ online }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -21,6 +21,7 @@ export default function getText(key: string): string {
|
||||
// en-US -> en
|
||||
if (useData().site.value.lang.includes('-')) {
|
||||
return i18nData[useData().site.value.lang.split('-')[0]][key];
|
||||
}
|
||||
} else {
|
||||
return i18nData[useData().site.value.lang][key];
|
||||
}
|
||||
}
|
@ -59,7 +59,9 @@ features:
|
||||
details: The project follows the LSO LICENSE and is open to contributions
|
||||
link: https://github.com/LiteyukiStudio/LiteyukiStudioOpensourceLICENSE
|
||||
---
|
||||
|
||||
|
||||
<script setup>
|
||||
import StatsBar from '../components/StatsBar.vue'
|
||||
</script>
|
||||
<StatsBar></Statsbar>
|
||||
<StatsBar />
|
15
docs/tsconfig.json
Normal file
15
docs/tsconfig.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": [
|
||||
"components/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
@ -60,7 +60,8 @@ features:
|
||||
link: https://github.com/LiteyukiStudio/LiteyukiStudioOpensourceLICENSE
|
||||
---
|
||||
|
||||
|
||||
<script setup>
|
||||
import StatsBar from '../components/StatsBar.vue'
|
||||
</script>
|
||||
<StatsBar></Statsbar>
|
||||
<StatsBar />
|
||||
|
Loading…
Reference in New Issue
Block a user