diff --git a/src/composables/useFeatureFlags.ts b/src/composables/useFeatureFlags.ts index 3388140ad..2fd2d6137 100644 --- a/src/composables/useFeatureFlags.ts +++ b/src/composables/useFeatureFlags.ts @@ -1,5 +1,6 @@ import { computed, reactive, readonly } from 'vue' +import { isCloud } from '@/platform/distribution/types' import { remoteConfig } from '@/platform/remoteConfig/remoteConfig' import { api } from '@/scripts/api' @@ -16,7 +17,8 @@ export enum ServerFeatureFlag { PRIVATE_MODELS_ENABLED = 'private_models_enabled', ONBOARDING_SURVEY_ENABLED = 'onboarding_survey_enabled', HUGGINGFACE_MODEL_IMPORT_ENABLED = 'huggingface_model_import_enabled', - ASYNC_MODEL_UPLOAD_ENABLED = 'async_model_upload_enabled' + ASYNC_MODEL_UPLOAD_ENABLED = 'async_model_upload_enabled', + TEAM_WORKSPACES_ENABLED = 'team_workspaces_enabled' } /** @@ -85,6 +87,14 @@ export function useFeatureFlags() { false ) ) + }, + get teamWorkspacesEnabled() { + if (!isCloud) return false + + return ( + remoteConfig.value.team_workspaces_enabled ?? + api.getServerFeature(ServerFeatureFlag.TEAM_WORKSPACES_ENABLED, false) + ) } }) diff --git a/src/platform/assets/components/MediaAssetFilterBar.vue b/src/platform/assets/components/MediaAssetFilterBar.vue index 6a0fcdb93..a933bda84 100644 --- a/src/platform/assets/components/MediaAssetFilterBar.vue +++ b/src/platform/assets/components/MediaAssetFilterBar.vue @@ -5,36 +5,38 @@ :placeholder="$t('sideToolbar.searchAssets') + '...'" @update:model-value="handleSearchChange" /> - - - - - - - +
+ + + + + + + +
diff --git a/src/platform/remoteConfig/types.ts b/src/platform/remoteConfig/types.ts index f4e51115b..bd51e9af6 100644 --- a/src/platform/remoteConfig/types.ts +++ b/src/platform/remoteConfig/types.ts @@ -41,4 +41,5 @@ export type RemoteConfig = { onboarding_survey_enabled?: boolean huggingface_model_import_enabled?: boolean async_model_upload_enabled?: boolean + team_workspaces_enabled?: boolean }