Consider syncing themes over firefox sync
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- frontend
调研方向
先从所引用行中的 src/extension/background.js 存储 getter 开始,然后跟踪已保存主题如何保存在 color.firefox.com 的 localStorage 中,以及网站如何与 add-on 通信。定义从 localStorage 迁移到 browser.storage.sync 的方案,包括现有主题和已保存主题。完成标准是:主题和已保存主题可在多个 Firefox 实例之间使用,同时不会丢失现有数据。
由索引模型根据 Issue 内容生成。
描述
Currently themes aren't synced between multiple firefox instances, which would be awesome :-). I think it might be possible to make this work by changing the storage getters to instead use browser.storage.sync (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/sync).
It would probably also be nice to sync the saved themes, which appear to currently be stored in color.firefox.com's localStorage. This could probably be moved to instead message the addon and store in sync as well :-)
There'd have to be migration logic too. I think it could look something like:
function getStorage(key) {
let synced = browser.storage.sync.get(key);
if (synced !== undefined) {
return synced;
}
// Do migration :-)
let local = browser.storage.local.get(key);
browser.storage.sync.set({ [key]: local });
return local;
}
- 主要语言
- JavaScript
- 星标
- 506
- 派生
- 100
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mozilla/FirefoxColor 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
mozilla/FirefoxColor#1081 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
mozilla/FirefoxColor#1087 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
mozilla/FirefoxColor#1085 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 68/100
mozilla/FirefoxColor#1084 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
mozilla/FirefoxColor#1083 · 1 个 reaction ·
查看 mozilla/FirefoxColor 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复
-
Design only Leadership Survey SLFS
难度 2/5 1-3 小时 新手友好度 70/100
bcgov/digital-journeys#2293 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
tursodatabase/turso#9405 ·
维护者通常 1 天内回复
-
Toolkit
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
API Bug
难度 2/5 1-3 小时 新手友好度 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
维护者通常 1 天内回复