refactor: backport cloud for orgs related foundational changes
- Remove organization branding updates. - Update `Hoppscotch Cloud` organization sidebar item. - Ensure organization switcher sidebar isn't displayed on the central cloud instance.
This commit is contained in:
parent
29d8b6cc77
commit
67dff5fe0f
2 changed files with 4 additions and 49 deletions
|
|
@ -2218,7 +2218,7 @@
|
||||||
},
|
},
|
||||||
"organization_sidebar": {
|
"organization_sidebar": {
|
||||||
"instances": "Instances",
|
"instances": "Instances",
|
||||||
"hoppscotch": "Hoppscotch",
|
"hoppscotch_cloud": "Hoppscotch Cloud",
|
||||||
"admin": "Admin",
|
"admin": "Admin",
|
||||||
"no_orgs_title": "No organizations yet",
|
"no_orgs_title": "No organizations yet",
|
||||||
"no_orgs_description": "Join or create an organization to collaborate with your team",
|
"no_orgs_description": "Join or create an organization to collaborate with your team",
|
||||||
|
|
|
||||||
|
|
@ -45,43 +45,7 @@
|
||||||
</template>
|
</template>
|
||||||
</tippy>
|
</tippy>
|
||||||
|
|
||||||
<router-link
|
|
||||||
v-else-if="showOrgLogo"
|
|
||||||
to="/"
|
|
||||||
class="flex items-center gap-2 px-2 py-1 rounded hover:bg-primaryDark focus-visible:bg-primaryDark focus-visible:outline-none transition-colors"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
v-if="orgInfo?.logo"
|
|
||||||
class="h-6 w-6 rounded overflow-hidden flex-shrink-0"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
:src="sanitizeLogoUrl(orgInfo.logo)"
|
|
||||||
:alt="orgInfo.name || t('app.name')"
|
|
||||||
class="h-full w-full object-cover"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else-if="orgInfo?.name"
|
|
||||||
class="h-6 w-6 rounded flex items-center justify-center text-xs font-semibold flex-shrink-0"
|
|
||||||
:class="getOrgColor(orgInfo.name)"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
{{ getOrgInitials(orgInfo.name) }}
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center gap-1.5 min-w-0">
|
|
||||||
<span class="font-bold tracking-wide text-secondaryDark truncate">
|
|
||||||
{{ orgInfo?.name || t("app.name") }}
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
class="text-secondary text-xs hidden sm:inline flex-shrink-0"
|
|
||||||
>
|
|
||||||
• {{ t("app.powered_by") }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</router-link>
|
|
||||||
|
|
||||||
<HoppButtonSecondary
|
<HoppButtonSecondary
|
||||||
v-else
|
|
||||||
class="!font-bold uppercase tracking-wide !text-secondaryDark hover:bg-primaryDark focus-visible:bg-primaryDark"
|
class="!font-bold uppercase tracking-wide !text-secondaryDark hover:bg-primaryDark focus-visible:bg-primaryDark"
|
||||||
:label="t('app.name')"
|
:label="t('app.name')"
|
||||||
to="/"
|
to="/"
|
||||||
|
|
@ -391,11 +355,6 @@ import { getKernelMode } from "@hoppscotch/kernel"
|
||||||
import { useI18n } from "@composables/i18n"
|
import { useI18n } from "@composables/i18n"
|
||||||
import { useReadonlyStream } from "@composables/stream"
|
import { useReadonlyStream } from "@composables/stream"
|
||||||
import { defineActionHandler, invokeAction } from "@helpers/actions"
|
import { defineActionHandler, invokeAction } from "@helpers/actions"
|
||||||
import {
|
|
||||||
getOrgInitials,
|
|
||||||
getOrgColor,
|
|
||||||
sanitizeLogoUrl,
|
|
||||||
} from "@helpers/utils/organization"
|
|
||||||
import { breakpointsTailwind, useBreakpoints, useNetwork } from "@vueuse/core"
|
import { breakpointsTailwind, useBreakpoints, useNetwork } from "@vueuse/core"
|
||||||
import { useService } from "dioc/vue"
|
import { useService } from "dioc/vue"
|
||||||
import * as TE from "fp-ts/TaskEither"
|
import * as TE from "fp-ts/TaskEither"
|
||||||
|
|
@ -405,22 +364,22 @@ import { useToast } from "~/composables/toast"
|
||||||
import { GetMyTeamsQuery, TeamAccessRole } from "~/helpers/backend/graphql"
|
import { GetMyTeamsQuery, TeamAccessRole } from "~/helpers/backend/graphql"
|
||||||
import { deleteTeam as backendDeleteTeam } from "~/helpers/backend/mutations/Team"
|
import { deleteTeam as backendDeleteTeam } from "~/helpers/backend/mutations/Team"
|
||||||
import { platform } from "~/platform"
|
import { platform } from "~/platform"
|
||||||
|
import { AdditionalLinksService } from "~/services/additionalLinks.service"
|
||||||
import {
|
import {
|
||||||
BANNER_PRIORITY_LOW,
|
BANNER_PRIORITY_LOW,
|
||||||
BannerContent,
|
BannerContent,
|
||||||
BannerService,
|
BannerService,
|
||||||
} from "~/services/banner.service"
|
} from "~/services/banner.service"
|
||||||
import { WorkspaceService } from "~/services/workspace.service"
|
import { WorkspaceService } from "~/services/workspace.service"
|
||||||
|
import IconChevronDown from "~icons/lucide/chevron-down"
|
||||||
import IconDownload from "~icons/lucide/download"
|
import IconDownload from "~icons/lucide/download"
|
||||||
|
import IconLayoutDashboard from "~icons/lucide/layout-dashboard"
|
||||||
import IconLifeBuoy from "~icons/lucide/life-buoy"
|
import IconLifeBuoy from "~icons/lucide/life-buoy"
|
||||||
import IconSettings from "~icons/lucide/settings"
|
import IconSettings from "~icons/lucide/settings"
|
||||||
import IconUploadCloud from "~icons/lucide/upload-cloud"
|
import IconUploadCloud from "~icons/lucide/upload-cloud"
|
||||||
import IconUser from "~icons/lucide/user"
|
import IconUser from "~icons/lucide/user"
|
||||||
import IconUserPlus from "~icons/lucide/user-plus"
|
import IconUserPlus from "~icons/lucide/user-plus"
|
||||||
import IconUsers from "~icons/lucide/users"
|
import IconUsers from "~icons/lucide/users"
|
||||||
import IconChevronDown from "~icons/lucide/chevron-down"
|
|
||||||
import IconLayoutDashboard from "~icons/lucide/layout-dashboard"
|
|
||||||
import { AdditionalLinksService } from "~/services/additionalLinks.service"
|
|
||||||
|
|
||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
|
|
@ -441,10 +400,6 @@ const workspaceSelectorFlagEnabled = computed(
|
||||||
() => !!platform.platformFeatureFlags.workspaceSwitcherLogin?.value
|
() => !!platform.platformFeatureFlags.workspaceSwitcherLogin?.value
|
||||||
)
|
)
|
||||||
|
|
||||||
const showOrgLogo = computed(() => {
|
|
||||||
return platform.organization?.isDefaultCloudInstance === false
|
|
||||||
})
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const { organization } = platform
|
const { organization } = platform
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue