feat: Unified icon picker (#7038)

This commit is contained in:
Hemachandar
2024-06-23 19:01:18 +05:30
committed by GitHub
parent 56d90e6bc3
commit 6fd3a0fa8a
83 changed files with 2302 additions and 852 deletions

View File

@@ -1,4 +1,3 @@
import { colorPalette } from "@shared/utils/collections";
import Collection from "@server/models/Collection";
import { DocumentHelper } from "@server/models/helpers/DocumentHelper";
import { APIContext } from "@server/types";
@@ -19,7 +18,7 @@ export default async function presentCollection(
sort: collection.sort,
icon: collection.icon,
index: collection.index,
color: collection.color || colorPalette[0],
color: collection.color,
permission: collection.permission,
sharing: collection.sharing,
createdAt: collection.createdAt,

View File

@@ -49,6 +49,8 @@ async function presentDocument(
: undefined,
text: !asData || options?.includeText ? text : undefined,
emoji: document.emoji,
icon: document.icon,
color: document.color,
tasks: document.tasks,
createdAt: document.createdAt,
createdBy: undefined,

View File

@@ -13,7 +13,8 @@ async function presentRevision(revision: Revision, diff?: string) {
documentId: revision.documentId,
title: strippedTitle,
data: await DocumentHelper.toJSON(revision),
emoji: revision.emoji ?? emoji,
icon: revision.icon ?? revision.emoji ?? emoji,
color: revision.color,
html: diff,
createdAt: revision.createdAt,
createdBy: presentUser(revision.user),