feat: Unified icon picker (#7038)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user