From 9e72458ad0226caa9279f0430594442529d9a709 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 10 Sep 2020 15:14:22 +0300 Subject: Add simple settings section. Fixes #15 --- web/index.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'web/index.js') diff --git a/web/index.js b/web/index.js index 348277a..c116130 100644 --- a/web/index.js +++ b/web/index.js @@ -54,8 +54,8 @@ class App extends Component { frequentlyUsed: { ...this.state.frequentlyUsed, stickerIDs, - stickers - } + stickers, + }, }) localStorage.mauFrequentlyUsedStickerCache = JSON.stringify(stickers.map(sticker => [sticker.id, sticker])) } @@ -158,15 +158,28 @@ class App extends Component {
this.packListRef = elem}> <${Pack} pack=${this.state.frequentlyUsed} send=${this.sendSticker} /> ${this.state.packs.map(pack => html`<${Pack} id=${pack.id} pack=${pack} send=${this.sendSticker} />`)} + <${Settings} />
` } } +const reload = () => window.location.reload() + +const Settings = () => html` +
+

Settings

+
+ +
+
+` + // By default we just let the browser handle scrolling to sections, but webviews on Element iOS // open the link in the browser instead of just scrolling there, so we need to scroll manually: const scrollToSection = (evt, id) => { -- cgit v1.2.3