mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-22 22:37:37 +08:00
📝 [docs]: 新增在线展示
This commit is contained in:
parent
8b77ced05e
commit
83a2d36209
@ -1,5 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import getText from "../scripts/i18nData";
|
import getText from "../components/scripts/i18nData.ts";
|
||||||
import {ref} from "vue";
|
import {ref} from "vue";
|
||||||
|
|
||||||
const onlineText = getText('online');
|
const onlineText = getText('online');
|
||||||
@ -38,14 +38,14 @@ setInterval(updateData, 10000);
|
|||||||
<span class=dot style="background-color: #00a6ff"></span>
|
<span class=dot style="background-color: #00a6ff"></span>
|
||||||
<span class="text">{{ totalText }}</span>
|
<span class="text">{{ totalText }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">{{total.valueOf() < 0 ? getText('fetching') : total.valueOf()}}</div>
|
<div class="number">{{ total }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="online" class="section">
|
<div id="online" class="section">
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<span class=dot style="background-color: #00ff00"></span>
|
<span class=dot style="background-color: #00ff00"></span>
|
||||||
<span class="text">{{ onlineText }}</span>
|
<span class="text">{{ onlineText }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">{{ online.valueOf() < 0 ? getText('fetching') : online.valueOf()}}</div>
|
<div class="number">{{ online }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -21,6 +21,7 @@ export default function getText(key: string): string {
|
|||||||
// en-US -> en
|
// en-US -> en
|
||||||
if (useData().site.value.lang.includes('-')) {
|
if (useData().site.value.lang.includes('-')) {
|
||||||
return i18nData[useData().site.value.lang.split('-')[0]][key];
|
return i18nData[useData().site.value.lang.split('-')[0]][key];
|
||||||
|
} else {
|
||||||
|
return i18nData[useData().site.value.lang][key];
|
||||||
}
|
}
|
||||||
return i18nData[useData().site.value.lang][key];
|
|
||||||
}
|
}
|
@ -59,7 +59,9 @@ features:
|
|||||||
details: The project follows the LSO LICENSE and is open to contributions
|
details: The project follows the LSO LICENSE and is open to contributions
|
||||||
link: https://github.com/LiteyukiStudio/LiteyukiStudioOpensourceLICENSE
|
link: https://github.com/LiteyukiStudio/LiteyukiStudioOpensourceLICENSE
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import StatsBar from '../components/StatsBar.vue'
|
import StatsBar from '../components/StatsBar.vue'
|
||||||
</script>
|
</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
|
link: https://github.com/LiteyukiStudio/LiteyukiStudioOpensourceLICENSE
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import StatsBar from '../components/StatsBar.vue'
|
import StatsBar from '../components/StatsBar.vue'
|
||||||
</script>
|
</script>
|
||||||
<StatsBar></Statsbar>
|
<StatsBar />
|
||||||
|
Loading…
Reference in New Issue
Block a user