-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add option to display framework icon (#21)
* save tabs data to storage handle service worker for manifest v3 * refactor background. Split background into modules * add branded icons * update tabs manager * add cache controller * implement user local settings * add settings controller UI * change UI color * Update src/components/Settings.vue * use framework icon by default #21 (comment) * remove on-click-outside * remove checkbox icons * chore: update vta --------- Co-authored-by: Den <[email protected]> Co-authored-by: Sébastien Chopin <[email protected]> Co-authored-by: Den <[email protected]> Co-authored-by: Sébastien Chopin <[email protected]>
- Loading branch information
1 parent
742cbc8
commit 1526345
Showing
15 changed files
with
106 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import CacheService from '../shared/CacheService' | ||
|
||
// persistent state storage | ||
export default class TabsStorage extends CacheService { | ||
get key () { | ||
return 'tabs' | ||
} | ||
|
||
async get () { | ||
const cache = await super.get() | ||
return cache || {} | ||
} | ||
|
||
async updateData (tabId, state) { | ||
const cache = await this.get() | ||
return this.set({ ...cache, [tabId]: state }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import browser from 'webextension-polyfill' | ||
|
||
export default class AbstractCacheService { | ||
get key () { | ||
throw new Error('key must be set') | ||
} | ||
|
||
async get () { | ||
const cache = await browser.storage.local.get([this.key]) | ||
return cache[this.key] | ||
} | ||
|
||
async set (updatedState) { | ||
return browser.storage.local.set({ [this.key]: updatedState }) | ||
} | ||
|
||
async clear () { | ||
return browser.storage.local.remove([this.key]) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters