Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShishkevich D. <135337715+shishkevichd@users.noreply.github.com>2025-03-17 14:26:07 +0300
committerGitHub <noreply@github.com>2025-03-17 14:26:07 +0300
commitdb62a07fb89e08e974210ccb0f62cc648d799e94 (patch)
tree50af3c5e77ae27c3e5b360eb32b9e95fe795aa25 /web/html/xui/component/aCustomStatistic.html
parente3120c402882e3fccc0112b1c0197126fb613329 (diff)
Code refactoring (#2785)
* chore: pretty theme menu in sidebar * refactor: renaming component templates * refactor: create custom `a-statistic` component * fix: display button text only on large screens * chore: remove loading background in overview page * fix: show `Version` text when xray version is unknown
Diffstat (limited to 'web/html/xui/component/aCustomStatistic.html')
-rw-r--r--web/html/xui/component/aCustomStatistic.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/web/html/xui/component/aCustomStatistic.html b/web/html/xui/component/aCustomStatistic.html
new file mode 100644
index 00000000..41695e90
--- /dev/null
+++ b/web/html/xui/component/aCustomStatistic.html
@@ -0,0 +1,55 @@
+{{define "component/customStatistic"}}
+<template>
+ <a-statistic :title="title" :value="value">
+ <template #prefix>
+ <slot name="prefix"></slot>
+ </template>
+ <template #suffix>
+ <slot name="suffix"></slot>
+ </template>
+ </a-statistic>
+</template>
+{{end}}
+
+{{define "component/aCustomStatistic"}}
+<style>
+ .dark .ant-statistic-title,
+ .dark .ant-statistic-content {
+ color: var(--dark-color-text-primary) !important
+ }
+
+ .dark .ant-statistic-title {
+ user-select: none;
+ opacity: 0.55;
+ }
+
+ .ant-statistic-title {
+ margin-bottom: 0 !important;
+ }
+
+ .ant-statistic-content-prefix {
+ margin-right: 6px !important;
+ }
+
+ .ant-statistic-content-prefix,
+ .ant-statistic-content-value {
+ font-size: 1.05rem;
+ }
+</style>
+
+<script>
+ Vue.component('a-custom-statistic', {
+ props: {
+ 'title': {
+ type: String,
+ required: false,
+ },
+ 'value': {
+ type: String,
+ required: false
+ }
+ },
+ template: `{{template "component/customStatistic"}}`,
+ });
+</script>
+{{end}} \ No newline at end of file