Skip to content

Commit a19292e

Browse files
committed
v4.0.9 - Added storage monitoring/warning
1 parent 76f1010 commit a19292e

File tree

6 files changed

+480
-3
lines changed

6 files changed

+480
-3
lines changed

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
1+
# 2025-11-03
2+
3+
## **v4.0.9** - localStorage Storage Indicator & Demo Banner Update
4+
5+
### Features
6+
- **Added visible localStorage storage utilization indicator**
7+
- **Storage link in Recent Tournaments header**: Right-aligned "Storage: X%" link with color-coded thresholds
8+
- **Color coding**:
9+
- Green (<75%): Healthy storage usage
10+
- Yellow (75-90%): Running low on space
11+
- Amber (>90%): Almost full, action needed
12+
- **Interactive modal with usage details**:
13+
- Horizontal progress bar matching color threshold
14+
- Current usage (X MB of Y MB available)
15+
- Status message (Good/Running low/Almost full)
16+
- Breakdown: Tournaments, Tournament History, Settings & Players
17+
- Non-technical instructions for freeing space (export then delete old tournaments)
18+
- Optional advanced section when history exceeds 1MB (suggests Developer Console cleanup)
19+
- **ESC key support**: Integrates with existing modal stack system
20+
- **Automatic updates**: Storage indicator refreshes after tournament save/delete/import and on page load
21+
- **Reuses existing code**: Leverages `getLocalStorageStats()` from analytics.js and modal stack system
22+
- **Impact**:
23+
- ✅ Prevents localStorage-full situations during tournaments
24+
- ✅ User-friendly visibility of storage usage (no need to open Developer Console)
25+
- ✅ Clear, non-technical guidance for operators
26+
- ✅ Proactive warning system before storage becomes critical
27+
- **Files modified**: `tournament.html` (line 106), `css/styles.css` (lines 3071-3262), `js/tournament-management.js` (lines 329-331, 823-826, 990-993, 1463-1669), `js/main.js` (lines 189-194)
28+
29+
### UI Improvements
30+
- **Updated demo-mode header banner text**
31+
- **Previous text**: "Demo Site. Everything you do is stored locally in your browser. Your data never leaves your device."
32+
- **New text**: "Darts double elimination tournament software. Free, open-source, secure, offline first, self-hostable. 📍 Demo Site: Everything you do is stored locally in your browser. Your data never leaves your device."
33+
- **Rationale**: Provides more context about the software itself for first-time visitors to demo site
34+
- **Impact**:
35+
- ✅ More informative for new users discovering the project
36+
- ✅ Highlights key features (free, open-source, secure, offline-first, self-hostable)
37+
- ✅ Maintains privacy transparency with location pin emoji separator
38+
- **Files modified**: `tournament.html` (line 37)
39+
40+
---
41+
142
# 2025-11-01
243

344
## **v4.0.8** - Docker Documentation & Match Controls Fix

Docs/RELEASE-NOTES-v4.0.9.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
## NewTon DC Tournament Manager v4.0.9 Release Notes
2+
3+
**Release Date:** November 3, 2025
4+
**Incremental Release**
5+
6+
---
7+
8+
## Overview
9+
10+
**NewTon DC Tournament Manager Version 4.0.9** adds a localStorage storage indicator to prevent critical storage situations and updates the demo site banner with more descriptive text.
11+
12+
This release contains no breaking changes and is a drop-in replacement for v4.0.8.
13+
14+
**Key Highlights:**
15+
- Visible localStorage storage indicator prevents storage-full situations during tournaments
16+
- Updated demo banner provides better project context for first-time visitors
17+
18+
---
19+
20+
## ✨ New Features
21+
22+
**localStorage Storage Indicator:**
23+
24+
A color-coded storage utilization indicator now appears in the Recent Tournaments header, preventing critical situations where localStorage fills up during tournaments.
25+
26+
**What's New:**
27+
- Right-aligned "Storage: X%" link with click-to-view modal
28+
- Color-coded thresholds:
29+
- **Green (<75%)**: Healthy storage usage
30+
- **Yellow (75-90%)**: Running low on space
31+
- **Amber (>90%)**: Almost full, action needed
32+
- Interactive modal shows:
33+
- Horizontal progress bar matching color threshold
34+
- Current usage breakdown (Tournaments, History, Settings)
35+
- Non-technical instructions for freeing space
36+
- Optional advanced section for cleaning up history (when >1MB)
37+
- Automatically updates after save/delete/import operations
38+
- ESC key support via modal stack system
39+
40+
**Why It Matters:**
41+
Proactive visibility prevents localStorage-full situations during tournaments. Clear, non-technical guidance helps operators manage storage without needing Developer Console access.
42+
43+
---
44+
45+
## 🎨 UI Improvements
46+
47+
**Updated Demo Site Banner:**
48+
49+
The demo-mode header banner now provides better context about the software itself, helping first-time visitors understand what NewTon is.
50+
51+
**What Changed:**
52+
- **Before**: "Demo Site. Everything you do is stored locally in your browser. Your data never leaves your device."
53+
- **After**: "Darts double elimination tournament software. Free, open-source, secure, offline first, self-hostable. 📍 Demo Site: Everything you do is stored locally in your browser. Your data never leaves your device."
54+
55+
**Why It Matters:**
56+
First-time visitors immediately understand NewTon's purpose and key features (free, open-source, secure, offline-first, self-hostable) while maintaining privacy transparency.
57+
58+
---
59+
60+
## 🚀 Migration from v4.0.8
61+
62+
### Automatic
63+
- Fully compatible with all v4.0.x tournaments
64+
- No data migration required
65+
- No functional changes to existing tournament behavior
66+
67+
### What's New
68+
After upgrading to v4.0.9:
69+
1. **Storage indicator appears automatically** in Recent Tournaments header
70+
2. **Monitor storage usage** by clicking the "Storage: X%" link
71+
3. **Follow clear instructions** in the modal to free up space when needed
72+
4. **Demo site banner updated** (if using `NEWTON_DEMO_MODE=true`)
73+
74+
### Compatibility
75+
- All v4.0.x tournaments work in v4.0.9
76+
- Storage indicator works immediately (no configuration needed)
77+
- Modal integrates with existing ESC key handling
78+
79+
---
80+
81+
## 📖 Additional Resources
82+
83+
- **CHANGELOG.md**: Detailed version history with technical implementation details
84+
- **Docs/RELEASE-NOTES-v4.0.8.md**: Docker documentation updates and Match Controls fix
85+
- **Docs/RELEASE-NOTES-v4.0.7.md**: Security headers documentation and Docker Hub publishing
86+
- **Docs/RELEASE-NOTES-v4.0.6.md**: Dynamic navigation menu enhancement
87+
- **Docs/RELEASE-NOTES-v4.0.0.md**: Per-tournament history architecture overview
88+
89+
---
90+
91+
## 🐛 Known Issues
92+
93+
None at time of release. Please report issues through GitHub repository.
94+
95+
---
96+
97+
**NewTon DC Tournament Manager v4.0.9** - Proactive storage monitoring and improved first-time user experience.

css/styles.css

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3067,3 +3067,130 @@ a:hover { color: #1e40af; }
30673067
transform: scale(1.15);
30683068
color: #e55a2b;
30693069
}
3070+
3071+
/* Storage Indicator */
3072+
.storage-link {
3073+
float: right;
3074+
font-size: 0.9rem;
3075+
font-weight: normal;
3076+
text-decoration: none;
3077+
margin-left: 10px;
3078+
transition: text-decoration 0.2s ease;
3079+
}
3080+
3081+
.storage-link:hover {
3082+
text-decoration: underline;
3083+
}
3084+
3085+
.storage-link.storage-green {
3086+
color: #166534;
3087+
}
3088+
3089+
.storage-link.storage-yellow {
3090+
color: #ca8a04;
3091+
}
3092+
3093+
.storage-link.storage-amber {
3094+
color: #dc2626;
3095+
}
3096+
3097+
/* Storage Modal Content Styles */
3098+
.storage-status {
3099+
margin-bottom: 25px;
3100+
margin-top: 15px;
3101+
}
3102+
3103+
.storage-progress-bar {
3104+
width: 100%;
3105+
height: 24px;
3106+
background: #e5e7eb;
3107+
border-radius: 4px;
3108+
overflow: hidden;
3109+
margin: 10px 0;
3110+
}
3111+
3112+
.storage-progress-fill {
3113+
height: 100%;
3114+
transition: width 0.3s ease, background-color 0.3s ease;
3115+
}
3116+
3117+
.storage-progress-fill.storage-green {
3118+
background-color: #166534;
3119+
}
3120+
3121+
.storage-progress-fill.storage-yellow {
3122+
background-color: #ca8a04;
3123+
}
3124+
3125+
.storage-progress-fill.storage-amber {
3126+
background-color: #dc2626;
3127+
}
3128+
3129+
.storage-details {
3130+
font-size: 0.95rem;
3131+
color: #374151;
3132+
margin-top: 8px;
3133+
}
3134+
3135+
.storage-breakdown {
3136+
margin: 20px 0;
3137+
padding: 15px;
3138+
background: #f9fafb;
3139+
border-radius: 6px;
3140+
border: 1px solid #e5e7eb;
3141+
}
3142+
3143+
.storage-breakdown h4 {
3144+
margin: 0 0 12px 0;
3145+
font-size: 1rem;
3146+
color: #111827;
3147+
}
3148+
3149+
.storage-breakdown-item {
3150+
display: flex;
3151+
justify-content: space-between;
3152+
padding: 6px 0;
3153+
border-bottom: 1px solid #e5e7eb;
3154+
}
3155+
3156+
.storage-breakdown-item:last-child {
3157+
border-bottom: none;
3158+
}
3159+
3160+
.storage-instructions {
3161+
margin-top: 20px;
3162+
padding: 15px;
3163+
background: #eff6ff;
3164+
border-left: 4px solid #3b82f6;
3165+
border-radius: 4px;
3166+
}
3167+
3168+
.storage-instructions h4 {
3169+
margin: 0 0 12px 0;
3170+
font-size: 1rem;
3171+
color: #1e40af;
3172+
}
3173+
3174+
.storage-instructions ol {
3175+
margin: 8px 0;
3176+
padding-left: 20px;
3177+
}
3178+
3179+
.storage-instructions li {
3180+
margin-bottom: 12px;
3181+
}
3182+
3183+
.storage-instructions ul {
3184+
margin: 4px 0;
3185+
padding-left: 20px;
3186+
list-style-type: disc;
3187+
}
3188+
3189+
.storage-advanced {
3190+
margin-top: 20px;
3191+
padding: 12px;
3192+
background: #fef3c7;
3193+
border-left: 4px solid #f59e0b;
3194+
border-radius: 4px;
3195+
font-size: 0.9rem;
3196+
}

js/main.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let matches = [];
77
let currentStatsPlayer = null;
88

99
// Application version
10-
const APP_VERSION = '4.0.8';
10+
const APP_VERSION = '4.0.9';
1111

1212
// Application identity (encoded)
1313
const _0x4e = [78,101,119,84,111,110,32,68,67,32,84,111,117,114];
@@ -186,6 +186,13 @@ document.addEventListener('DOMContentLoaded', function () {
186186
updateMatchHistory();
187187
}, 200);
188188

189+
// Step 8: Update storage indicator
190+
setTimeout(() => {
191+
if (typeof updateStorageIndicator === 'function') {
192+
updateStorageIndicator();
193+
}
194+
}, 200);
195+
189196
// Update footer with version
190197
const footerContent = document.getElementById('footerContent');
191198
if (footerContent) {

0 commit comments

Comments
 (0)