Skip to content

Commit

Permalink
修复ServerStatus主题Bug (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
nap0o authored Apr 9, 2024
1 parent f3c90bb commit 66b4c88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resource/template/theme-server-status/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/echarts.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts/map/js/world.js" integrity="md5-ZmUzMzZlOGQyYzk2NTgwNGRlMzRlNTliZDgyYTY1OGUgIC0=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts/map/js/world.js"></script>
<script src="/static/theme-server-status/js/mixin.js?v20240302"></script>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions resource/template/theme-server-status/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ <h4 class="modal-title" id="mapChartTitle">{{tr "ServersOnWorldMap"}}</h4>
console.log('init countryMapChartData not complete');
return;
}
const unit = this.language=='zh-CN' ? '台' : 'servers';
const isMobile = this.checkIsMobile();
const width = isMobile ? 338 : 1102;
const height = isMobile ? 200 : 500;
Expand Down Expand Up @@ -153,8 +154,7 @@ <h4 class="modal-title" id="mapChartTitle">{{tr "ServersOnWorldMap"}}</h4>
trigger: 'item',
formatter: function (params) {
if (params.data && params.data.value > 0) {
const unit = this.language=='zh-CN' ? '台' : ' Servers';
return params.name + ' ' + params.data.value + unit;
return params.name + ' ' + params.data.value + ' ' + unit;
} else {
return '';
}
Expand Down

0 comments on commit 66b4c88

Please sign in to comment.