feat: Custom accent color (#4897)

* types

* Working, but messy

* Add InputColor component

* types

* Show default theme values when not customized

* Support custom theme on team sign-in page

* Payload validation

* Custom theme on shared documents

* Improve theme validation

* Team -> Workspace in settings
This commit is contained in:
Tom Moor
2023-02-19 10:43:03 -05:00
committed by GitHub
parent 7c05b7326a
commit 70beb7524f
45 changed files with 684 additions and 390 deletions

View File

@@ -1,7 +1,6 @@
import fs from "fs-extra";
import invariant from "invariant";
import Router from "koa-router";
import { pick } from "lodash";
import mime from "mime-types";
import { Op, ScopeOptions, WhereOptions } from "sequelize";
import { TeamPreference } from "@shared/types";
@@ -41,6 +40,7 @@ import {
presentCollection,
presentDocument,
presentPolicies,
presentPublicTeam,
} from "@server/presenters";
import { APIContext } from "@server/types";
import { RateLimiterStrategy } from "@server/utils/RateLimiter";
@@ -419,7 +419,7 @@ router.post(
? {
document: serializedDocument,
team: team?.getPreference(TeamPreference.PublicBranding)
? pick(team, ["avatarUrl", "name"])
? presentPublicTeam(team)
: undefined,
sharedTree:
share && share.includeChildDocuments