mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 18:22:40 +00:00
feat: add isCloud guard to team workspaces feature flag (#8192)
Ensures the team_workspaces_enabled feature flag only returns true when running in cloud environment, preventing the feature from activating in local/desktop installations. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8192-feat-add-isCloud-guard-to-team-workspaces-feature-flag-2ee6d73d3650810bb1d7c1721ebcdd44) by [Unito](https://www.unito.io) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { computed, reactive, readonly } from 'vue'
|
import { computed, reactive, readonly } from 'vue'
|
||||||
|
|
||||||
|
import { isCloud } from '@/platform/distribution/types'
|
||||||
import { remoteConfig } from '@/platform/remoteConfig/remoteConfig'
|
import { remoteConfig } from '@/platform/remoteConfig/remoteConfig'
|
||||||
import { api } from '@/scripts/api'
|
import { api } from '@/scripts/api'
|
||||||
|
|
||||||
@@ -95,6 +96,8 @@ export function useFeatureFlags() {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
get teamWorkspacesEnabled() {
|
get teamWorkspacesEnabled() {
|
||||||
|
if (!isCloud) return false
|
||||||
|
|
||||||
return (
|
return (
|
||||||
remoteConfig.value.team_workspaces_enabled ??
|
remoteConfig.value.team_workspaces_enabled ??
|
||||||
api.getServerFeature(ServerFeatureFlag.TEAM_WORKSPACES_ENABLED, false)
|
api.getServerFeature(ServerFeatureFlag.TEAM_WORKSPACES_ENABLED, false)
|
||||||
|
|||||||
@@ -6,20 +6,36 @@
|
|||||||
@update:model-value="handleSearchChange"
|
@update:model-value="handleSearchChange"
|
||||||
/>
|
/>
|
||||||
<div class="flex gap-1.5 items-center">
|
<div class="flex gap-1.5 items-center">
|
||||||
<MediaAssetFilterButton v-if="isCloud" v-tooltip.top="{ value: $t('assetBrowser.filterBy') }" size="md">
|
<MediaAssetFilterButton
|
||||||
|
v-if="isCloud"
|
||||||
|
v-tooltip.top="{ value: $t('assetBrowser.filterBy') }"
|
||||||
|
size="md"
|
||||||
|
>
|
||||||
<template #default="{ close }">
|
<template #default="{ close }">
|
||||||
<MediaAssetFilterMenu
|
<MediaAssetFilterMenu
|
||||||
:media-type-filters
|
:media-type-filters
|
||||||
:close
|
:close
|
||||||
@update:media-type-filters="handleMediaTypeFiltersChange" />
|
@update:media-type-filters="handleMediaTypeFiltersChange"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</MediaAssetFilterButton>
|
</MediaAssetFilterButton>
|
||||||
<AssetSortButton v-if="isCloud" v-tooltip.top="{ value: $t('assetBrowser.sortBy') }" size="md">
|
<AssetSortButton
|
||||||
|
v-if="isCloud"
|
||||||
|
v-tooltip.top="{ value: $t('assetBrowser.sortBy') }"
|
||||||
|
size="md"
|
||||||
|
>
|
||||||
<template #default="{ close }">
|
<template #default="{ close }">
|
||||||
<MediaAssetSortMenu v-model:sort-by="sortBy" :show-generation-time-sort :close />
|
<MediaAssetSortMenu
|
||||||
|
v-model:sort-by="sortBy"
|
||||||
|
:show-generation-time-sort
|
||||||
|
:close
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</AssetSortButton>
|
</AssetSortButton>
|
||||||
<MediaAssetViewModeToggle v-if="isQueuePanelV2Enabled" v-model:view-mode="viewMode" />
|
<MediaAssetViewModeToggle
|
||||||
|
v-if="isQueuePanelV2Enabled"
|
||||||
|
v-model:view-mode="viewMode"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user