From f40750ec9542e357e441308947de1f9111cba071 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Thu, 1 Jun 2023 17:17:54 +0700 Subject: [PATCH] UBER-325/349/352/342 (#3320) Signed-off-by: Andrey Sobolev --- dev/docker-compose.yaml | 1 + dev/prod/src/platform.ts | 3 +- models/setting/src/index.ts | 56 +++++++++---------- packages/ui/src/colors.ts | 28 +++++----- .../src/components/ChannelFilter.svelte | 4 +- .../src/components/EmployeeFilter.svelte | 3 +- .../components/PeopleNotificationsView.svelte | 6 +- .../src/components/TagsFilter.svelte | 41 ++++++++++---- .../milestones/MilestoneFilter.svelte | 6 +- .../src/components/filter/ObjectFilter.svelte | 3 +- .../src/components/filter/ValueFilter.svelte | 4 +- plugins/view-resources/src/filter.ts | 2 +- .../src/components/Applications.svelte | 16 +++--- .../src/components/Logo.svelte | 8 ++- .../src/components/Workbench.svelte | 13 ++--- server/front/src/__start.ts | 5 +- server/front/src/index.ts | 4 +- 17 files changed, 118 insertions(+), 85 deletions(-) diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index 84b9b33b80..3bad52dcd1 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -98,6 +98,7 @@ services: - MINIO_ENDPOINT=minio - MINIO_ACCESS_KEY=minioadmin - MINIO_SECRET_KEY=minioadmin + - TITLE=DevPlatform restart: unless-stopped # tracker-front: # image: hardcoreeng/tracker-front diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index 27edb8053c..e3e7b32079 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -87,6 +87,7 @@ interface Config { REKONI_URL: string TELEGRAM_URL: string GMAIL_URL: string + TITLE?: string } const devConfig = process.env.CLIENT_TYPE === 'dev-production' @@ -161,5 +162,5 @@ export async function configurePlatform() { // Disable for now, since it causes performance issues on linux/docker/kubernetes boxes for now. setMetadata(client.metadata.UseProtocolCompression, true) - setMetadata(workbench.metadata.PlatformTitle, 'Platform') + setMetadata(workbench.metadata.PlatformTitle, config.TITLE ?? 'Platform') } diff --git a/models/setting/src/index.ts b/models/setting/src/index.ts index 112849a0aa..19fd121bc3 100644 --- a/models/setting/src/index.ts +++ b/models/setting/src/index.ts @@ -268,34 +268,34 @@ export function createModel (builder: Builder): void { // }, // setting.ids.Support // ) - builder.createDoc( - setting.class.SettingsCategory, - core.space.Model, - { - name: 'privacy', - label: setting.string.Privacy, - icon: setting.icon.Privacy, - component: setting.component.Privacy, - group: 'main', - secured: false, - order: 6000 - }, - setting.ids.Privacy - ) - builder.createDoc( - setting.class.SettingsCategory, - core.space.Model, - { - name: 'terms', - label: setting.string.Terms, - icon: setting.icon.Terms, - component: setting.component.Terms, - group: 'main', - secured: false, - order: 10000 - }, - setting.ids.Terms - ) + // builder.createDoc( + // setting.class.SettingsCategory, + // core.space.Model, + // { + // name: 'privacy', + // label: setting.string.Privacy, + // icon: setting.icon.Privacy, + // component: setting.component.Privacy, + // group: 'main', + // secured: false, + // order: 6000 + // }, + // setting.ids.Privacy + // ) + // builder.createDoc( + // setting.class.SettingsCategory, + // core.space.Model, + // { + // name: 'terms', + // label: setting.string.Terms, + // icon: setting.icon.Terms, + // component: setting.component.Terms, + // group: 'main', + // secured: false, + // order: 10000 + // }, + // setting.ids.Terms + // ) builder.createDoc( workbench.class.Application, diff --git a/packages/ui/src/colors.ts b/packages/ui/src/colors.ts index b8f29edd8c..bfdcfdd689 100644 --- a/packages/ui/src/colors.ts +++ b/packages/ui/src/colors.ts @@ -236,52 +236,52 @@ export const CadetGreyColor = '#95A2B3' /** * @public */ -export function getPlatformColor (hash: number, blackTheme: boolean): string { - const palette = blackTheme ? darkPalette : whitePalette +export function getPlatformColor (hash: number, darkTheme: boolean): string { + const palette = darkTheme ? darkPalette : whitePalette return (palette[Math.abs(hash) % palette.length] ?? palette[0]).color } /** * @public */ -export function getPlatformColorDef (hash: number, blackTheme: boolean): ColorDefinition { - const palette = blackTheme ? darkPalette : whitePalette +export function getPlatformColorDef (hash: number, darkTheme: boolean): ColorDefinition { + const palette = darkTheme ? darkPalette : whitePalette return palette[Math.abs(hash) % palette.length] ?? palette[0] } /** * @public */ -export function getPlatformAvatarColorDef (hash: number, blackTheme: boolean): ColorDefinition { - const palette = blackTheme ? avatarDarkColors : avatarWhiteColors +export function getPlatformAvatarColorDef (hash: number, darkTheme: boolean): ColorDefinition { + const palette = darkTheme ? avatarDarkColors : avatarWhiteColors return palette[Math.abs(hash) % palette.length] ?? palette[0] } /** * @public */ -export function getPlatformAvatarColorForTextDef (text: string, blackTheme: boolean): ColorDefinition { - return getPlatformAvatarColorDef(hashCode(text), blackTheme) +export function getPlatformAvatarColorForTextDef (text: string, darkTheme: boolean): ColorDefinition { + return getPlatformAvatarColorDef(hashCode(text), darkTheme) } /** * @public */ -export function getPlatformColorForText (text: string, blackTheme: boolean): string { - return getPlatformColor(hashCode(text), blackTheme) +export function getPlatformColorForText (text: string, darkTheme: boolean): string { + return getPlatformColor(hashCode(text), darkTheme) } /** * @public */ -export function getPlatformColorForTextDef (text: string, blackTheme: boolean): ColorDefinition { - return getPlatformColorDef(hashCode(text), blackTheme) +export function getPlatformColorForTextDef (text: string, darkTheme: boolean): ColorDefinition { + return getPlatformColorDef(hashCode(text), darkTheme) } /** * @public */ -export function getPlatformColors (blackTheme: boolean): readonly ColorDefinition[] { - return blackTheme ? darkPalette : whitePalette +export function getPlatformColors (darkTheme: boolean): readonly ColorDefinition[] { + return darkTheme ? darkPalette : whitePalette } function hashCode (str: string): number { diff --git a/plugins/contact-resources/src/components/ChannelFilter.svelte b/plugins/contact-resources/src/components/ChannelFilter.svelte index e891ac6300..3333ad8b66 100644 --- a/plugins/contact-resources/src/components/ChannelFilter.svelte +++ b/plugins/contact-resources/src/components/ChannelFilter.svelte @@ -62,13 +62,15 @@ } const dispatch = createEventDispatcher() + + const sortedElemenets = sortFilterValues($channelProviders, (v) => isSelected(v, selected))
dispatch('changeContent')}>