schoolbox web extension :)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: reset local storage the hacky way on v4.0.5

* migration is behaving really weirdly
* i will just watch the analytics to determine when everyone has had the
reset, hopefully won't need to do this again
* close #265

willow baa8dc16 bef19107

+10 -9
+1 -1
package.json
··· 1 1 { 2 2 "name": "schooltape", 3 - "version": "4.0.4", 3 + "version": "4.0.5", 4 4 "author": "42willow", 5 5 "devDependencies": { 6 6 "@catppuccin/palette": "^1.7.1",
+8 -1
src/entrypoints/background.ts
··· 11 11 } else if (reason === "update") { 12 12 logger.info("[background] Showing update badge"); 13 13 14 - await updated.set(true); 14 + await updated.storage.setValue(true); 15 15 updateIcon(); 16 + 17 + // hacky way of resetting the extension to fix migration issues 18 + const manifest = browser.runtime.getManifest(); 19 + const version = manifest.version_name || manifest.version; 20 + if (version === "4.0.5") { 21 + await storage.clear("local"); 22 + } 16 23 17 24 if (import.meta.env.DEV) { 18 25 logger.info("[background] Opening development URLs");
+1 -1
src/entrypoints/popup/components/Footer.svelte
··· 17 17 <span class="relative inline-flex"> 18 18 <Button 19 19 onclick={async () => { 20 - await updated.set(false); 20 + await updated.storage.setValue(false); 21 21 22 22 browser.tabs.create({ 23 23 url: `https://github.com/schooltape/schooltape/releases/tag/v${version}`,
-6
src/utils/storage.ts
··· 4 4 // Global 5 5 export const globalSettings: StorageState<Types.Settings> = new StorageState<Types.Settings>( 6 6 storage.defineItem<Types.Settings>("local:globalSettings", { 7 - version: 4, 8 7 fallback: { 9 8 global: true, 10 9 plugins: true, ··· 17 16 themeLogoAsFavicon: false, 18 17 19 18 userSnippets: {}, 20 - }, 21 - migrations: { 22 - 4: async () => { 23 - await storage.clear("local"); 24 - }, 25 19 }, 26 20 }), 27 21 );