From 5413269273d24638c8e3e29d627904eb3dc78383 Mon Sep 17 00:00:00 2001 From: Kristaps Fabians Geikins Date: Fri, 13 Sep 2024 14:02:04 +0300 Subject: [PATCH 01/10] fix(server): workspace status check query --- packages/server/codegen.yml | 1 + packages/server/modules/core/graph/generated/graphql.ts | 8 ++++---- .../modules/workspaces/graph/resolvers/workspaces.ts | 6 ++++++ .../workspacesCore/graph/resolvers/workspacesCore.ts | 6 ++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/server/codegen.yml b/packages/server/codegen.yml index f7ae9eeda..45848709e 100644 --- a/packages/server/codegen.yml +++ b/packages/server/codegen.yml @@ -66,6 +66,7 @@ generates: Webhook: '@/modules/webhooks/helpers/graphTypes#WebhookGraphQLReturn' SmartTextEditorValue: '@/modules/core/services/richTextEditorService#SmartTextEditorValueSchema' BlobMetadata: '@/modules/blobstorage/domain/types#BlobStorageItem' + ServerWorkspacesInfo: '@/modules/core/helpers/graphTypes#GraphQLEmptyReturn' modules/cross-server-sync/graph/generated/graphql.ts: plugins: - 'typescript' diff --git a/packages/server/modules/core/graph/generated/graphql.ts b/packages/server/modules/core/graph/generated/graphql.ts index bd6a72416..1667a4754 100644 --- a/packages/server/modules/core/graph/generated/graphql.ts +++ b/packages/server/modules/core/graph/generated/graphql.ts @@ -4418,7 +4418,7 @@ export type ResolversTypes = { ServerAppListItem: ResolverTypeWrapper; ServerAutomateInfo: ResolverTypeWrapper; ServerConfiguration: ResolverTypeWrapper; - ServerInfo: ResolverTypeWrapper; + ServerInfo: ResolverTypeWrapper & { workspaces: ResolversTypes['ServerWorkspacesInfo'] }>; ServerInfoUpdateInput: ServerInfoUpdateInput; ServerInvite: ResolverTypeWrapper; ServerInviteCreateInput: ServerInviteCreateInput; @@ -4427,7 +4427,7 @@ export type ResolversTypes = { ServerRoleItem: ResolverTypeWrapper; ServerStatistics: ResolverTypeWrapper; ServerStats: ResolverTypeWrapper; - ServerWorkspacesInfo: ResolverTypeWrapper; + ServerWorkspacesInfo: ResolverTypeWrapper; SetPrimaryUserEmailInput: SetPrimaryUserEmailInput; SmartTextEditorValue: ResolverTypeWrapper; SortDirection: SortDirection; @@ -4663,7 +4663,7 @@ export type ResolversParentTypes = { ServerAppListItem: ServerAppListItem; ServerAutomateInfo: ServerAutomateInfo; ServerConfiguration: ServerConfiguration; - ServerInfo: ServerInfo; + ServerInfo: Omit & { workspaces: ResolversParentTypes['ServerWorkspacesInfo'] }; ServerInfoUpdateInput: ServerInfoUpdateInput; ServerInvite: ServerInviteGraphQLReturnType; ServerInviteCreateInput: ServerInviteCreateInput; @@ -4671,7 +4671,7 @@ export type ResolversParentTypes = { ServerRoleItem: ServerRoleItem; ServerStatistics: GraphQLEmptyReturn; ServerStats: GraphQLEmptyReturn; - ServerWorkspacesInfo: ServerWorkspacesInfo; + ServerWorkspacesInfo: GraphQLEmptyReturn; SetPrimaryUserEmailInput: SetPrimaryUserEmailInput; SmartTextEditorValue: SmartTextEditorValueSchema; Stream: StreamGraphQLReturn; diff --git a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts index 03a515f00..28ac181a1 100644 --- a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts +++ b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts @@ -878,6 +878,12 @@ export = FF_WORKSPACES_MODULE_ENABLED getWorkspaceWithDomains: getWorkspaceWithDomainsFactory({ db }) })({ workspaceId, userId }) } + }, + ServerInfo: { + workspaces: () => ({}) + }, + ServerWorkspacesInfo: { + workspacesEnabled: () => true } } as Resolvers) : {} diff --git a/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts b/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts index d362d94da..e842bca8c 100644 --- a/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts +++ b/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts @@ -102,6 +102,12 @@ export = !FF_WORKSPACES_MODULE_ENABLED }, LimitedUser: { workspaceDomainPolicyCompliant: async () => null + }, + ServerInfo: { + workspaces: () => ({}) + }, + ServerWorkspacesInfo: { + workspacesEnabled: () => false } } as Resolvers) : {} From 2569f190cbde99c0b71d2aa607d19de365f51759 Mon Sep 17 00:00:00 2001 From: Kristaps Fabians Geikins Date: Fri, 13 Sep 2024 14:02:56 +0300 Subject: [PATCH 02/10] Revert "fix(server): workspace status check query" This reverts commit 5413269273d24638c8e3e29d627904eb3dc78383. --- packages/server/codegen.yml | 1 - packages/server/modules/core/graph/generated/graphql.ts | 8 ++++---- .../modules/workspaces/graph/resolvers/workspaces.ts | 6 ------ .../workspacesCore/graph/resolvers/workspacesCore.ts | 6 ------ 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/server/codegen.yml b/packages/server/codegen.yml index 45848709e..f7ae9eeda 100644 --- a/packages/server/codegen.yml +++ b/packages/server/codegen.yml @@ -66,7 +66,6 @@ generates: Webhook: '@/modules/webhooks/helpers/graphTypes#WebhookGraphQLReturn' SmartTextEditorValue: '@/modules/core/services/richTextEditorService#SmartTextEditorValueSchema' BlobMetadata: '@/modules/blobstorage/domain/types#BlobStorageItem' - ServerWorkspacesInfo: '@/modules/core/helpers/graphTypes#GraphQLEmptyReturn' modules/cross-server-sync/graph/generated/graphql.ts: plugins: - 'typescript' diff --git a/packages/server/modules/core/graph/generated/graphql.ts b/packages/server/modules/core/graph/generated/graphql.ts index 1667a4754..bd6a72416 100644 --- a/packages/server/modules/core/graph/generated/graphql.ts +++ b/packages/server/modules/core/graph/generated/graphql.ts @@ -4418,7 +4418,7 @@ export type ResolversTypes = { ServerAppListItem: ResolverTypeWrapper; ServerAutomateInfo: ResolverTypeWrapper; ServerConfiguration: ResolverTypeWrapper; - ServerInfo: ResolverTypeWrapper & { workspaces: ResolversTypes['ServerWorkspacesInfo'] }>; + ServerInfo: ResolverTypeWrapper; ServerInfoUpdateInput: ServerInfoUpdateInput; ServerInvite: ResolverTypeWrapper; ServerInviteCreateInput: ServerInviteCreateInput; @@ -4427,7 +4427,7 @@ export type ResolversTypes = { ServerRoleItem: ResolverTypeWrapper; ServerStatistics: ResolverTypeWrapper; ServerStats: ResolverTypeWrapper; - ServerWorkspacesInfo: ResolverTypeWrapper; + ServerWorkspacesInfo: ResolverTypeWrapper; SetPrimaryUserEmailInput: SetPrimaryUserEmailInput; SmartTextEditorValue: ResolverTypeWrapper; SortDirection: SortDirection; @@ -4663,7 +4663,7 @@ export type ResolversParentTypes = { ServerAppListItem: ServerAppListItem; ServerAutomateInfo: ServerAutomateInfo; ServerConfiguration: ServerConfiguration; - ServerInfo: Omit & { workspaces: ResolversParentTypes['ServerWorkspacesInfo'] }; + ServerInfo: ServerInfo; ServerInfoUpdateInput: ServerInfoUpdateInput; ServerInvite: ServerInviteGraphQLReturnType; ServerInviteCreateInput: ServerInviteCreateInput; @@ -4671,7 +4671,7 @@ export type ResolversParentTypes = { ServerRoleItem: ServerRoleItem; ServerStatistics: GraphQLEmptyReturn; ServerStats: GraphQLEmptyReturn; - ServerWorkspacesInfo: GraphQLEmptyReturn; + ServerWorkspacesInfo: ServerWorkspacesInfo; SetPrimaryUserEmailInput: SetPrimaryUserEmailInput; SmartTextEditorValue: SmartTextEditorValueSchema; Stream: StreamGraphQLReturn; diff --git a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts index 28ac181a1..03a515f00 100644 --- a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts +++ b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts @@ -878,12 +878,6 @@ export = FF_WORKSPACES_MODULE_ENABLED getWorkspaceWithDomains: getWorkspaceWithDomainsFactory({ db }) })({ workspaceId, userId }) } - }, - ServerInfo: { - workspaces: () => ({}) - }, - ServerWorkspacesInfo: { - workspacesEnabled: () => true } } as Resolvers) : {} diff --git a/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts b/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts index e842bca8c..d362d94da 100644 --- a/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts +++ b/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts @@ -102,12 +102,6 @@ export = !FF_WORKSPACES_MODULE_ENABLED }, LimitedUser: { workspaceDomainPolicyCompliant: async () => null - }, - ServerInfo: { - workspaces: () => ({}) - }, - ServerWorkspacesInfo: { - workspacesEnabled: () => false } } as Resolvers) : {} From f5ebb7de08b2970880657b747dcc40b1d96d79b1 Mon Sep 17 00:00:00 2001 From: Kristaps Fabians Geikins Date: Fri, 13 Sep 2024 14:51:48 +0300 Subject: [PATCH 03/10] fix(server): workspace status check query (#2991) --- packages/server/codegen.yml | 1 + packages/server/modules/core/graph/generated/graphql.ts | 8 ++++---- .../modules/workspaces/graph/resolvers/workspaces.ts | 6 ++++++ .../workspacesCore/graph/resolvers/workspacesCore.ts | 6 ++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/server/codegen.yml b/packages/server/codegen.yml index f7ae9eeda..45848709e 100644 --- a/packages/server/codegen.yml +++ b/packages/server/codegen.yml @@ -66,6 +66,7 @@ generates: Webhook: '@/modules/webhooks/helpers/graphTypes#WebhookGraphQLReturn' SmartTextEditorValue: '@/modules/core/services/richTextEditorService#SmartTextEditorValueSchema' BlobMetadata: '@/modules/blobstorage/domain/types#BlobStorageItem' + ServerWorkspacesInfo: '@/modules/core/helpers/graphTypes#GraphQLEmptyReturn' modules/cross-server-sync/graph/generated/graphql.ts: plugins: - 'typescript' diff --git a/packages/server/modules/core/graph/generated/graphql.ts b/packages/server/modules/core/graph/generated/graphql.ts index bd6a72416..1667a4754 100644 --- a/packages/server/modules/core/graph/generated/graphql.ts +++ b/packages/server/modules/core/graph/generated/graphql.ts @@ -4418,7 +4418,7 @@ export type ResolversTypes = { ServerAppListItem: ResolverTypeWrapper; ServerAutomateInfo: ResolverTypeWrapper; ServerConfiguration: ResolverTypeWrapper; - ServerInfo: ResolverTypeWrapper; + ServerInfo: ResolverTypeWrapper & { workspaces: ResolversTypes['ServerWorkspacesInfo'] }>; ServerInfoUpdateInput: ServerInfoUpdateInput; ServerInvite: ResolverTypeWrapper; ServerInviteCreateInput: ServerInviteCreateInput; @@ -4427,7 +4427,7 @@ export type ResolversTypes = { ServerRoleItem: ResolverTypeWrapper; ServerStatistics: ResolverTypeWrapper; ServerStats: ResolverTypeWrapper; - ServerWorkspacesInfo: ResolverTypeWrapper; + ServerWorkspacesInfo: ResolverTypeWrapper; SetPrimaryUserEmailInput: SetPrimaryUserEmailInput; SmartTextEditorValue: ResolverTypeWrapper; SortDirection: SortDirection; @@ -4663,7 +4663,7 @@ export type ResolversParentTypes = { ServerAppListItem: ServerAppListItem; ServerAutomateInfo: ServerAutomateInfo; ServerConfiguration: ServerConfiguration; - ServerInfo: ServerInfo; + ServerInfo: Omit & { workspaces: ResolversParentTypes['ServerWorkspacesInfo'] }; ServerInfoUpdateInput: ServerInfoUpdateInput; ServerInvite: ServerInviteGraphQLReturnType; ServerInviteCreateInput: ServerInviteCreateInput; @@ -4671,7 +4671,7 @@ export type ResolversParentTypes = { ServerRoleItem: ServerRoleItem; ServerStatistics: GraphQLEmptyReturn; ServerStats: GraphQLEmptyReturn; - ServerWorkspacesInfo: ServerWorkspacesInfo; + ServerWorkspacesInfo: GraphQLEmptyReturn; SetPrimaryUserEmailInput: SetPrimaryUserEmailInput; SmartTextEditorValue: SmartTextEditorValueSchema; Stream: StreamGraphQLReturn; diff --git a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts index 03a515f00..28ac181a1 100644 --- a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts +++ b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts @@ -878,6 +878,12 @@ export = FF_WORKSPACES_MODULE_ENABLED getWorkspaceWithDomains: getWorkspaceWithDomainsFactory({ db }) })({ workspaceId, userId }) } + }, + ServerInfo: { + workspaces: () => ({}) + }, + ServerWorkspacesInfo: { + workspacesEnabled: () => true } } as Resolvers) : {} diff --git a/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts b/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts index d362d94da..e842bca8c 100644 --- a/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts +++ b/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts @@ -102,6 +102,12 @@ export = !FF_WORKSPACES_MODULE_ENABLED }, LimitedUser: { workspaceDomainPolicyCompliant: async () => null + }, + ServerInfo: { + workspaces: () => ({}) + }, + ServerWorkspacesInfo: { + workspacesEnabled: () => false } } as Resolvers) : {} From eb990f990372a7c03fdb08f580b8fe9717f2f220 Mon Sep 17 00:00:00 2001 From: andrewwallacespeckle <139135120+andrewwallacespeckle@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:45:44 +0100 Subject: [PATCH 04/10] Add 'just now' to isTimeframe check (#2994) --- packages/frontend-2/utils/dateFormatter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend-2/utils/dateFormatter.ts b/packages/frontend-2/utils/dateFormatter.ts index a13139468..0d7f35b6e 100644 --- a/packages/frontend-2/utils/dateFormatter.ts +++ b/packages/frontend-2/utils/dateFormatter.ts @@ -41,7 +41,8 @@ const isTimeframe = (date: ConfigType) => { unit.includes('second') || unit.includes('minute') || unit.includes('hour') || - unit.includes('day') + unit.includes('day') || + unit.includes('just now') ) } From d3ce46ba4da4a7a01504e81d35bec82d3f937f47 Mon Sep 17 00:00:00 2001 From: andrewwallacespeckle <139135120+andrewwallacespeckle@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:46:09 +0100 Subject: [PATCH 05/10] Remove icon. Add danger border (#2993) --- .../ui-components/src/components/form/TextInput.vue | 11 +---------- .../ui-components/src/composables/form/textInput.ts | 4 +--- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/ui-components/src/components/form/TextInput.vue b/packages/ui-components/src/components/form/TextInput.vue index a186d74d4..02bcb42e0 100644 --- a/packages/ui-components/src/components/form/TextInput.vue +++ b/packages/ui-components/src/components/form/TextInput.vue @@ -66,15 +66,6 @@ Clear input