* feat(db): add new col: user appTheme * feat(event-types page): apply appTheme color * add appTheme for trpc * feat: mutate main page theme * feat: add english translation for app theme update section * modify keys in common (en) * add woring * Revert yarn.lock to its state before unintended changes * feat(i18n): add back the i18n string (for dark/light mode switching) * refactor: refactor ThemeLabel * fix: add new user field "appTheme" to test files * chore: modify TODO comment * chore: update common.json (en) for "theme" since we had appTheme now, I think it's better to update the wording here to avoid confusion * fix: update button's data-testid to fix e2e test error * chore: remove comment * fix: fix brand-color-not-apply bug * solve type error * fix: fix type error * fix: use correct storageKey for booker / dashboard * fix: tidy up * fix: skeleton --------- Co-authored-by: swh00tw <a6140000@gmail.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Udit Takkar <udit222001@gmail.com>
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import { UserPermissionRole } from "@calcom/prisma/client";
|
|
import { IdentityProvider } from "@calcom/prisma/enums";
|
|
|
|
export const getSampleUserInSession = function () {
|
|
return {
|
|
locale: "",
|
|
avatar: "",
|
|
organization: {
|
|
isOrgAdmin: false,
|
|
metadata: null,
|
|
id: 1,
|
|
requestedSlug: null,
|
|
},
|
|
profile: null,
|
|
defaultScheduleId: null,
|
|
name: "",
|
|
defaultBookerLayouts: null,
|
|
timeZone: "Asia/Kolkata",
|
|
selectedCalendars: [],
|
|
destinationCalendar: null,
|
|
emailVerified: new Date(),
|
|
allowDynamicBooking: false,
|
|
bio: "",
|
|
weekStart: "",
|
|
startTime: 0,
|
|
endTime: 0,
|
|
bufferTime: 0,
|
|
hideBranding: false,
|
|
timeFormat: 12,
|
|
twoFactorEnabled: false,
|
|
identityProvider: IdentityProvider.CAL,
|
|
brandColor: "#292929",
|
|
darkBrandColor: "#fafafa",
|
|
away: false,
|
|
metadata: null,
|
|
role: UserPermissionRole.USER,
|
|
disableImpersonation: false,
|
|
organizationId: null,
|
|
theme: "",
|
|
appTheme: "",
|
|
createdDate: new Date(),
|
|
trialEndsAt: new Date(),
|
|
completedOnboarding: false,
|
|
allowSEOIndexing: false,
|
|
receiveMonthlyDigestEmail: false,
|
|
};
|
|
};
|