diff options
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/hats.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/features/hats.js b/src/features/hats.js index 932f908..a00f285 100644 --- a/src/features/hats.js +++ b/src/features/hats.js @@ -481,6 +481,15 @@ export function hatsFeature(ctx) { node, h('span', { class: 'ava-hat', style: posStyle(hat), html: hat.art })); }, + // A wallet just opened: the /hats link lands in the shop. + init() { + if (!ui.hatsAtBoot) return; + ui.hatsAtBoot = false; + ui.screen = 'wallet'; + openShop(); + }, + // ...and the shop's address is /hats for as long as it is on screen + navPath(snap) { return snap && snap.screen === 'wallet' && snap.hatShop ? '/hats' : null; }, // The footer's "Show your support" link: straight into the shop. openHatShop() { openShop(); try { window.scrollTo(0, 0); } catch {} return true; }, // Own-profile editor entry: the door to the shop. |
