Skip to content

Commit a954a18

Browse files
committed
Update.
1 parent ee95da5 commit a954a18

File tree

4 files changed

+49
-23
lines changed

4 files changed

+49
-23
lines changed

resource/static/main.css

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222

2323
.custom-tabs-container {
2424
overflow-x: auto;
25-
width: 100%;
25+
width: fit-content;
26+
max-width: 100%;
2627
white-space: nowrap;
2728
position: relative;
2829
background-color: #fbfbfb26;
2930
border-radius: 50px;
3031
padding: 5px;
31-
display: inline-flex;
3232
margin-bottom: 20px;
3333
box-shadow: 0 2px 4px rgba(0,0,0,0.10);
3434
-webkit-overflow-scrolling: touch;
@@ -39,8 +39,19 @@
3939
display: none;
4040
}
4141

42+
.tabs-wrapper {
43+
display: flex;
44+
justify-content: center;
45+
}
46+
47+
.tabs-content-area {
48+
display: inline-flex;
49+
/*gap: 0.5em;*/
50+
/*padding: 0.2em 0;*/
51+
}
52+
4253
.custom-tab {
43-
padding: 8px 20px;
54+
padding: 8px 15px;
4455
margin: 0 3px;
4556
cursor: pointer;
4657
color: #777;
@@ -791,7 +802,7 @@ i.note.icon {
791802
}
792803

793804
#app .ui.fluid.accordion {
794-
border-radius: 10px;
805+
border-radius: 20px;
795806
margin-bottom: 1rem;
796807
background-color: #fbfbfb26;
797808
-webkit-transition: all .3s ease;

resource/template/common/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<link rel="stylesheet" type="text/css" href="/static/semantic-ui-alerts.min.css?v20220423">
2121
<link href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-logos/0.17/font-logos.min.css" rel="stylesheet">
2222
<link href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/flag-icon-css/4.1.5/css/flag-icons.min.css" rel="stylesheet">
23-
<link rel="stylesheet" type="text/css" href="/static/main.css?v20250512">
23+
<link rel="stylesheet" type="text/css" href="/static/main.css?v202505121">
2424
<link rel="shortcut icon" type="image/png" href="/static/logo.svg?v20220602"/>
2525
</head>
2626
{{if ts .CustomCodeDashboard}} {{.CustomCodeDashboard|safe}} {{end}}

resource/template/theme-default/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<link rel="stylesheet" type="text/css" href="/static/fontawesome.min.css?v2025032723">
2222
<link href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-logos/0.17/font-logos.min.css" rel="stylesheet">
2323
<link href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/flag-icon-css/4.1.5/css/flag-icons.min.css" rel="stylesheet">
24-
<link rel="stylesheet" type="text/css" href="/static/main.css?v20250512">
24+
<link rel="stylesheet" type="text/css" href="/static/main.css?v202505121">
2525
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js"></script>
2626
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/semantic-ui/2.4.1/semantic.min.js"></script>
2727
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.min.js"></script>

resource/template/theme-default/home.html

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,36 @@
55

66
<div class="nb-container">
77
<div class="ui container">
8-
<div v-if="servers && servers.length > 0" class="custom-tabs-container" ref="tabsContainer">
9-
<div class="custom-tab"
10-
:class="{ active: activeTag === '' }"
11-
@click="handleTabClick('', $event)"
12-
ref="allTab"> {{tr "All"}}
13-
</div>
14-
<div v-for="(tag, index) in uniqueTags.slice().reverse()"
15-
:key="tag"
16-
class="custom-tab"
17-
:class="{ active: activeTag === tag }"
18-
@click="handleTabClick(tag, $event)"
19-
:ref="'tagTab' + index"> @#tag#@ <!-- index here is from the reversed array -->
20-
</div>
21-
<div class="tab-slider" ref="tabSlider"></div>
22-
</div>
8+
<div style="display: flex; justify-content: center;">
9+
<div v-if="servers && servers.length > 0"
10+
class="custom-tabs-container"
11+
ref="tabsContainer"
12+
style="width: fit-content;
13+
max-width: 100%;
14+
overflow-x: auto;
15+
position: relative;
16+
white-space: nowrap;
17+
">
18+
<div style="display: inline-flex;
19+
gap: 0.5em;
20+
padding: 0.2em 0;
21+
">
22+
<div class="custom-tab"
23+
:class="{ active: activeTag === '' }"
24+
@click="handleTabClick('', $event)"
25+
ref="allTab"> {{tr "All"}}
26+
</div>
27+
<div v-for="(tag, index) in uniqueTags.slice().reverse()"
28+
:key="tag"
29+
class="custom-tab"
30+
:class="{ active: activeTag === tag }"
31+
@click="handleTabClick(tag, $event)"
32+
:ref="'tagTab' + index"> @#tag#@
33+
</div>
34+
</div>
35+
<div class="tab-slider" ref="tabSlider"></div>
36+
</div>
37+
</div>
2338

2439
<template v-if="filteredServers && filteredServers.length > 0">
2540
<div class="ui four stackable status cards">
@@ -532,7 +547,7 @@
532547
return '0B'
533548
}
534549
const i = Math.floor(Math.log(bytes) / Math.log(1024));
535-
const sizes = ["B", "K", "M", "G", "T", "P", "E", "Z", "Y"];
550+
const sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
536551
return parseFloat((bytes / Math.pow(1024, i)).toFixed(2)) + sizes[i];
537552
},
538553
getCoreAndGHz(arr) {
@@ -559,7 +574,7 @@
559574
return Math.ceil(bs.toFixed(2)) + 'G';
560575
} else {
561576
bs = bs * 1024;
562-
return Math.ceil(bs.toFixed(2)) + 'M';
577+
return Math.ceil(bs.toFixed(2)) + 'MB';
563578
}
564579
},
565580
listTipsMouseenter(obj, strs, tipsNum = 1){

0 commit comments

Comments
 (0)