Skip to content

Commit 7bdc12b

Browse files
Merge pull request #3 from alvin000009238/codex/hide-data-update-time-on-share-page-pitzip
Hide update time in read-only/shared view and add read-only indicator
2 parents e8fd839 + 0a59182 commit 7bdc12b

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

grades_dashboard.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,8 +1662,15 @@ body.read-only-mode #logoutBtn {
16621662
display: none !important;
16631663
}
16641664

1665-
body.read-only-mode .data-time-box .time-info {
1666-
display: none;
1665+
body.read-only-mode .data-time-box .time-info,
1666+
body.read-only-mode .data-time-box .time-label,
1667+
body.read-only-mode .data-time-box .time-value,
1668+
body.read-only-mode #updateTime {
1669+
display: none !important;
1670+
}
1671+
1672+
body.read-only-mode .data-time-box {
1673+
gap: 0;
16671674
}
16681675

16691676
body.read-only-mode .header {

grades_dashboard.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,8 @@ async function checkSharedLink() {
11761176
const timeBox = document.querySelector('.data-time-box');
11771177
header.insertBefore(indicator, timeBox);
11781178

1179-
if (updateTime) updateTime.textContent = '分享存檔';
1179+
const timeInfo = document.querySelector('.data-time-box .time-info');
1180+
if (timeInfo) timeInfo.style.display = 'none';
11801181
} else {
11811182
throw new Error(data.error);
11821183
}

0 commit comments

Comments
 (0)