Skip to content

Commit a84cf42

Browse files
committed
feat(popupviews): 增加 Leaderboard 点数显示并优化样式和缓存逻辑
- 在 LDC 组件中添加 Leaderboard 点数显示区域 - 调整 ldc-balance 样式间距,使界面更紧凑 - 为头像图片添加边框、过渡及悬停放大效果 - 将缓存时间阈值从 10 分钟降至 5 分钟,提升数据刷新频率 - 更新 package 版本号至 1.5.22
1 parent cbd5839 commit a84cf42

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

entrypoints/PopupViews/components/LDC.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
<span class="balance-label">今日剩余额度:</span>
1919
<span>{{ userInfo.remain_quota || '加载中...' }}</span>
2020
</div>
21+
<div class="ldc-balance">
22+
<span class="balance-label">Leaderboard 点数:</span>
23+
<span>{{ userInfo.community_balance || '加载中...' }}</span>
24+
</div>
2125
</div>
2226
<div class="ldc-box">
2327
<div class="ldc-header">

entrypoints/PopupViews/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ export default {
311311
const Timestamp = localStorage.getItem('Timestamp', Date.now());
312312
if (Timestamp) {
313313
const timeDiff = new Date() - Timestamp;
314-
if (timeDiff > 600000) {
315-
// 超过 10 分钟
314+
if (timeDiff > 5 * 60* 1000) {
315+
// 超过 5分钟
316316
localStorage.removeItem('hotlist');
317317
localStorage.removeItem('newslist');
318318
localStorage.removeItem('ldcUserInfo');

entrypoints/PopupViews/style.less

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,13 @@ a {
273273
img {
274274
height: 40px;
275275
border-radius: 50%;
276+
border: 1px solid #eee;
277+
transition: all 0.1s linear;
278+
279+
&:hover {
280+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
281+
transform: scale(1.02);
282+
}
276283
}
277284
}
278285

@@ -281,7 +288,7 @@ a {
281288
.ldc-balance {
282289
display: flex;
283290
align-items: center;
284-
gap: 8px;
291+
gap: 5px;
285292

286293
.balance-label {
287294
font-size: 13px;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "linuxdo-scripts",
33
"description": "manifest.json description",
44
"private": true,
5-
"version": "1.5.21",
5+
"version": "1.5.22",
66
"type": "module",
77
"scripts": {
88
"dev": "wxt",

0 commit comments

Comments
 (0)