mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 17:30:07 +00:00
[backport cloud/1.37] feat: add isCloud guard to team workspaces feature flag (#8229)
## Summary - Backport of #8201 to cloud/1.37 - Adds isCloud guard to team workspaces feature flag ## Test plan - [ ] Verify team workspaces feature flag only activates on cloud environments 🤖 Generated with [Claude Code](https://claude.com/claude-code) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8229-backport-cloud-1-37-feat-add-isCloud-guard-to-team-workspaces-feature-flag-2f06d73d365081b18655fb82da53ff43) by [Unito](https://www.unito.io) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.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)
|
||||||
|
|||||||
@@ -5,36 +5,38 @@
|
|||||||
:placeholder="$t('sideToolbar.searchAssets') + '...'"
|
:placeholder="$t('sideToolbar.searchAssets') + '...'"
|
||||||
@update:model-value="handleSearchChange"
|
@update:model-value="handleSearchChange"
|
||||||
/>
|
/>
|
||||||
<MediaAssetFilterButton
|
<div class="flex gap-1.5 items-center">
|
||||||
v-if="isCloud"
|
<MediaAssetFilterButton
|
||||||
v-tooltip.top="{ value: $t('assetBrowser.filterBy') }"
|
v-if="isCloud"
|
||||||
size="md"
|
v-tooltip.top="{ value: $t('assetBrowser.filterBy') }"
|
||||||
>
|
size="md"
|
||||||
<template #default="{ close }">
|
>
|
||||||
<MediaAssetFilterMenu
|
<template #default="{ close }">
|
||||||
:media-type-filters="mediaTypeFilters"
|
<MediaAssetFilterMenu
|
||||||
:close="close"
|
:media-type-filters
|
||||||
@update:media-type-filters="handleMediaTypeFiltersChange"
|
:close
|
||||||
/>
|
@update:media-type-filters="handleMediaTypeFiltersChange"
|
||||||
</template>
|
/>
|
||||||
</MediaAssetFilterButton>
|
</template>
|
||||||
<AssetSortButton
|
</MediaAssetFilterButton>
|
||||||
v-if="isCloud"
|
<AssetSortButton
|
||||||
v-tooltip.top="{ value: $t('assetBrowser.sortBy') }"
|
v-if="isCloud"
|
||||||
size="md"
|
v-tooltip.top="{ value: $t('assetBrowser.sortBy') }"
|
||||||
>
|
size="md"
|
||||||
<template #default="{ close }">
|
>
|
||||||
<MediaAssetSortMenu
|
<template #default="{ close }">
|
||||||
v-model:sort-by="sortBy"
|
<MediaAssetSortMenu
|
||||||
:show-generation-time-sort
|
v-model:sort-by="sortBy"
|
||||||
:close="close"
|
:show-generation-time-sort
|
||||||
/>
|
:close
|
||||||
</template>
|
/>
|
||||||
</AssetSortButton>
|
</template>
|
||||||
<MediaAssetViewModeToggle
|
</AssetSortButton>
|
||||||
v-if="isQueuePanelV2Enabled"
|
<MediaAssetViewModeToggle
|
||||||
v-model:view-mode="viewMode"
|
v-if="isQueuePanelV2Enabled"
|
||||||
/>
|
v-model:view-mode="viewMode"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user