Closed l1tok closed 1 year ago
getitem
function as a menuitem, and the return value cannot be stored directly via chrome.storage.local.set
due to nesting, I extracted the information required by the getitem function (label
,key
, icon
, children
), and converted it into a storable data structure for storage. Also, when reading the local data via chrome.storage.local.get
, you need to pass the information mentioned above into the getitem
function as parameters to get the value of the menu.SetAsDefault
, user can initialize menu to default state by this button.UpdateCollection
function is used to realize the renumbering.getRepoName
function to get the name of the repository on the current page and add it to the item list of the collection.[
{
"label": "X-Lab",
"key": "collection1",
"icon": "GithubOutlined",
"children": [
{ "label": "delete collection", "key": "delete1", "icon": "DeleteOutlined" },
{ "label": "add current Repo", "key": "add1", "icon": "FolderAddOutlined" },
{ "type": "divider" },
{ "label": "open-digger", "key": "1.1" },
{ "label": "open-perf", "key": "1.2" },
{ "label": "open-leaderboard", "key": "1.3" },
{ "label": "open-wonderland", "key": "1.4" }
]
}
]
label
is the name of the collectionkey
is the key of the unique collection option, in the first level, the key is the collection plus a numeric numbering arrangementicon
is the icon in front of the optionchildren
is the information contained in the collection.type
attribute. children
is the information contained within the collection that is associated with the parent collection number.Simply recorded a demo video, the operations include adding collection, deleting collection, adding current repo to collection, resetting default values.
https://github.com/hypertrons/hypertrons-crx/assets/50283262/f304a803-f8f3-4e2c-9859-705a5990327e
Hi, @andyhuang18 . Appreciate your work so far. I am working on a new design of the current collection button about where to put it and how is should interact. Should be done this week, so you can take it easy on implementing details on the repo collection
button.
However, you could focus on the pop up window first. Looks like this modal could be a good choice, but feel free to use whatever you think is proper.
Feel free to comment below or in PR or DM in on WeChat or Slack for any concerns. Good Job!
Description
Agenda
1. How many users?
2. Bug
714
718
3. OSPP
713
716