web: new sidebar ui

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
This commit is contained in:
01zulfi
2024-12-24 15:47:49 +05:00
committed by Abdullah Atta
parent 0cc33f7a81
commit 2c5e1f611b
14 changed files with 903 additions and 569 deletions

View File

@@ -112,6 +112,12 @@ export class Colors implements ICollection {
);
}
async count(id: string) {
const color = await this.color(id);
if (!color) return;
return this.db.relations.from(color, "note").count();
}
async remove(...ids: string[]) {
await this.db.transaction(async () => {
await this.db.relations.unlinkOfType("color", ids);