Skip to content

Commit 0b3ad66

Browse files
author
web3blind
committed
Refine PWA icon plus and HP heart
1 parent cfa47da commit 0b3ad66

9 files changed

Lines changed: 21 additions & 14 deletions

File tree

app/assets/icons/icon-192.png

-15.3 KB
Loading

app/assets/icons/icon-512.png

-63.2 KB
Loading

app/assets/icons/viz-magic-192.png

2.61 KB
Loading

app/assets/icons/viz-magic-512.png

16.3 KB
Loading

app/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<meta name="apple-mobile-web-app-capable" content="yes">
99
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
1010
<title>Viz Magic</title>
11-
<link rel="manifest" href="manifest.json?v=20260712c">
11+
<link rel="manifest" href="manifest.json?v=20260713a">
1212
<link rel="icon" href="favicon.ico?v=20260712c">
13-
<link rel="icon" type="image/png" sizes="192x192" href="assets/icons/viz-magic-192.png?v=20260712c">
14-
<link rel="icon" type="image/png" sizes="512x512" href="assets/icons/viz-magic-512.png?v=20260712c">
15-
<link rel="apple-touch-icon" href="assets/icons/viz-magic-192.png?v=20260712c">
13+
<link rel="icon" type="image/png" sizes="192x192" href="assets/icons/viz-magic-192.png?v=20260713a">
14+
<link rel="icon" type="image/png" sizes="512x512" href="assets/icons/viz-magic-512.png?v=20260713a">
15+
<link rel="apple-touch-icon" href="assets/icons/viz-magic-192.png?v=20260713a">
1616
<link rel="stylesheet" href="css/main.css?v=20260712k">
1717
<link rel="stylesheet" href="css/themes.css">
1818
<link rel="stylesheet" href="css/accessibility.css">
@@ -186,7 +186,7 @@
186186
<script src="js/ui/screens/landing.js"></script>
187187
<script src="js/ui/screens/login.js?v=20260711a"></script>
188188
<script src="js/ui/screens/onboarding.js"></script>
189-
<script src="js/ui/screens/home.js?v=20260712h"></script>
189+
<script src="js/ui/screens/home.js?v=20260713a"></script>
190190
<script src="js/ui/screens/character.js?v=20260621l"></script>
191191
<script src="js/ui/screens/hunt.js"></script>
192192
<script src="js/ui/screens/inventory.js?v=20260621l"></script>

app/js/ui/screens/home.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var HomeScreen = (function() {
4242
'<h1>' + t('home_welcome') + ', ' + Helpers.escapeHtml(character.name) + '</h1>' +
4343
'<p>' + Helpers.classIcon(character.className) + ' ' + t('class_' + character.className) +
4444
' \u2022 ' + t('home_level') + ' ' + character.level + '</p>' +
45-
ProgressBar.create({id:'hp-bar', label:'❤ HP', value:character.hp, max:character.maxHp, displayValue:hpShown, displayMax:HOME_HP_DISPLAY_MAX, color:'#e53935'}) +
45+
ProgressBar.create({id:'hp-bar', label:'❤ HP', value:character.hp, max:character.maxHp, displayValue:hpShown, displayMax:HOME_HP_DISPLAY_MAX, color:'#e53935'}) +
4646
ProgressBar.create({id:'xp-bar', label:'⭐ XP', value:xpCurrent, max:xpNeeded, displayValue:xpShown, displayMax:HOME_XP_DISPLAY_MAX, color:'#ffc107'}) +
4747
ProgressBar.create({id:'mana-bar', label:'⚡ ' + t('home_mana'), value:0, max:100, color:'#2196f3'}) +
4848
'<button class="help-tip-btn" aria-label="' + t('help_tip_mana') + '" ' +

app/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"short_name": "VizMagic",
44
"description": "Viz Magic — accessible browser RPG on the VIZ blockchain",
55
"id": "https://vizmagic.web3blind.xyz/",
6-
"start_url": "/?pwa=viz-magic-v36",
6+
"start_url": "/?pwa=viz-magic-v47",
77
"scope": "/",
88
"display": "standalone",
99
"display_override": ["standalone", "minimal-ui"],

app/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Viz Magic — Service Worker
2-
var CACHE_NAME = 'viz-magic-v46';
2+
var CACHE_NAME = 'viz-magic-v47';
33
var ASSETS = [
44
'/',
55
'/index.html',

tests/player-bug-regressions.test.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ test('high-traffic UI narration, screen announcements, and inventory stat labels
343343

344344
test('service worker updates quickly and keeps navigations network-first', function () {
345345
const swJs = read('app/sw.js');
346-
assert.ok(/viz-magic-v46/.test(swJs), 'service worker cache version should be bumped');
346+
assert.ok(/viz-magic-v47/.test(swJs), 'service worker cache version should be bumped');
347347
assert.ok(/self\.skipWaiting\(\)/.test(swJs), 'service worker should activate new cache without waiting for all tabs to close');
348348
assert.ok(/self\.clients\.claim\(\)/.test(swJs), 'service worker should claim clients after activation');
349349
assert.ok(/event\.request\.mode === 'navigate'[\s\S]*fetch\(event\.request\)/.test(swJs), 'navigation requests should prefer network to avoid stale cached index');
@@ -392,7 +392,7 @@ test('mobile entry helpers cover keyboard paste, home-screen shortcut, nav parit
392392
assert.ok(/SoundManager\.setVolume\(sfxVolume \/ 100\)/.test(read('app/js/ui/screens/settings.js')), 'settings should apply stored SFX volume on render');
393393
assert.ok(/localStorage\.setItem\(STORAGE_PREFIX \+ 'sfx_volume'/.test(read('app/js/ui/sound.js')), 'sound manager should persist SFX volume');
394394
assert.ok(/var volume = _getStoredNumber\('sfx_volume', 0\.5\)/.test(read('app/js/ui/sound.js')), 'sound manager should restore persisted SFX volume');
395-
assert.ok(/viz-magic-v46/.test(read('app/sw.js')), 'service worker cache should be bumped for UI changes');
395+
assert.ok(/viz-magic-v47/.test(read('app/sw.js')), 'service worker cache should be bumped for UI changes');
396396
});
397397

398398

@@ -456,7 +456,7 @@ test('magical weather is labelled and affects hunts', function () {
456456
assert.ok(/festival_today_prefix/.test(homeJs + ruJs + enJs), 'forecast holidays should have localized copy');
457457
assert.ok(/i18n\/ru.js\?v=20260712k/.test(indexHtml), 'Russian weather copy must be cache-busted');
458458
assert.ok(/i18n\/en.js\?v=20260712k/.test(indexHtml), 'English weather copy must be cache-busted');
459-
assert.ok(/home.js\?v=20260712h/.test(indexHtml), 'home forecast layout must be cache-busted');
459+
assert.ok(/home.js\?v=20260713a/.test(indexHtml), 'home forecast layout must be cache-busted');
460460
assert.ok(/quests.js\?v=20260712a/.test(indexHtml), 'quest-limit UX must be cache-busted');
461461
assert.ok(/nav.js\?v=20260712b/.test(indexHtml), 'bottom tray nav must be cache-busted');
462462
assert.ok(/leaderboard.js\?v=20260712c/.test(indexHtml), 'leaderboard narrator fix must be cache-busted');
@@ -477,9 +477,9 @@ test('music volume, narrator speech, and PWA icons are durable', function () {
477477
assert.ok(/_setStoredNumber\('music_volume', this\.value \/ 100\)/.test(settingsJs), 'music slider should persist changes');
478478
assert.ok(/SpeechSynthesisUtterance/.test(narratorJs), 'battle narrator should speak audibly through Web Speech when available');
479479
assert.ok(/textContent = ''[\s\S]*textContent = message/.test(narratorJs), 'battle narrator should force live-region text replacement');
480-
assert.ok(/manifest\.json\?v=20260712c/.test(indexHtml), 'manifest should be cache-busted for updated icon');
480+
assert.ok(/manifest\.json\?v=20260713a/.test(indexHtml), 'manifest should be cache-busted for updated icon');
481481
assert.ok(/favicon\.ico\?v=20260712c/.test(indexHtml), 'favicon should be explicit for browser shortcut fallback');
482-
assert.ok(/viz-magic-192\.png\?v=20260712c/.test(indexHtml), 'launcher icon link should be cache-busted');
482+
assert.ok(/viz-magic-192\.png\?v=20260713a/.test(indexHtml), 'launcher icon link should be cache-busted');
483483
assert.ok(/assets\/icons\/viz-magic-512\.png/.test(swJs), 'service worker should cache PWA launcher icons');
484484
assert.ok(/viz-magic-512\.png/.test(read('app/manifest.json')), 'manifest should reference new icon URLs to bypass OS icon cache');
485485
});
@@ -516,7 +516,14 @@ test('reported mobile UX issues have explicit fixes', function () {
516516
assert.ok(/MAX_ACTIVE_QUESTS/.test(questScreenJs), 'quest screen should use the five-quest limit');
517517
assert.ok(!/BattleNarrator\.announce/.test(leaderboardScreenJs), 'leaderboard should not wake Battle Narrator speech synthesis');
518518
assert.ok(!/id: 'help'/.test(navJs), 'Help should be removed from bottom tray');
519-
assert.ok(/label:' HP'/.test(homeJs) && /label:' XP'/.test(homeJs), 'home HP and XP should have their own icons');
519+
assert.ok(/label:' HP'/.test(homeJs) && /label:' XP'/.test(homeJs), 'home HP and XP should have their own icons');
520+
});
521+
522+
523+
test('PWA icon and HP heart use expressive color accents', function () {
524+
assert.ok(/viz-magic-192\.png\?v=20260713a/.test(indexHtml), 'PWA icon link should be cache-busted after plus placement/color update');
525+
assert.ok(/viz-magic-v47/.test(read('app/manifest.json')), 'manifest start URL should change so launchers can refresh icons');
526+
assert.ok(/label:' HP'/.test(homeJs), 'HP label should use a red heart emoji variant');
520527
});
521528

522529
if (process.exitCode) {

0 commit comments

Comments
 (0)