Skip to content

Commit

Permalink
fix: Show tag icon in account header
Browse files Browse the repository at this point in the history
  • Loading branch information
kewisch committed Nov 30, 2024
1 parent c134d36 commit 591c857
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/foldernode.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ export class AccountNode extends BaseNode {
get account() {
return this;
}

get type() {
return this.item.type;
}
}

export class VirtualAccountNode extends AccountNode {
Expand Down
7 changes: 7 additions & 0 deletions src/popup/folderList.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class TBFolderList extends BaseItemList {
.header-item .icon.account-type-nntp {
background-image: url("../images/account/globe.svg");
}
.header-item .icon.account-type-tags {
background-image: none;
}
`;
}

Expand Down Expand Up @@ -125,6 +128,10 @@ class TBFolderList extends BaseItemList {
accountItem.querySelector(".text").textContent = account.name;
accountItem.querySelector(".icon").classList.add("account-type-" + account.type);

if (account.type == "tags") {
accountItem.querySelector(".icon").innerHTML = BaseItemList.tagIcon("#0a84ff");
}

accountItem.querySelector(".header-item").account = account;
body.appendChild(accountItem);
}
Expand Down

0 comments on commit 591c857

Please sign in to comment.