mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-02-19 07:26:57 -05:00
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:
@@ -2218,7 +2218,7 @@
|
||||
},
|
||||
"organization_sidebar": {
|
||||
"instances": "Instances",
|
||||
"hoppscotch": "Hoppscotch",
|
||||
"hoppscotch_cloud": "Hoppscotch Cloud",
|
||||
"admin": "Admin",
|
||||
"no_orgs_title": "No organizations yet",
|
||||
"no_orgs_description": "Join or create an organization to collaborate with your team",
|
||||
|
||||
@@ -45,43 +45,7 @@
|
||||
</template>
|
||||
</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
|
||||
v-else
|
||||
class="!font-bold uppercase tracking-wide !text-secondaryDark hover:bg-primaryDark focus-visible:bg-primaryDark"
|
||||
:label="t('app.name')"
|
||||
to="/"
|
||||
@@ -391,11 +355,6 @@ import { getKernelMode } from "@hoppscotch/kernel"
|
||||
import { useI18n } from "@composables/i18n"
|
||||
import { useReadonlyStream } from "@composables/stream"
|
||||
import { defineActionHandler, invokeAction } from "@helpers/actions"
|
||||
import {
|
||||
getOrgInitials,
|
||||
getOrgColor,
|
||||
sanitizeLogoUrl,
|
||||
} from "@helpers/utils/organization"
|
||||
import { breakpointsTailwind, useBreakpoints, useNetwork } from "@vueuse/core"
|
||||
import { useService } from "dioc/vue"
|
||||
import * as TE from "fp-ts/TaskEither"
|
||||
@@ -405,22 +364,22 @@ import { useToast } from "~/composables/toast"
|
||||
import { GetMyTeamsQuery, TeamAccessRole } from "~/helpers/backend/graphql"
|
||||
import { deleteTeam as backendDeleteTeam } from "~/helpers/backend/mutations/Team"
|
||||
import { platform } from "~/platform"
|
||||
import { AdditionalLinksService } from "~/services/additionalLinks.service"
|
||||
import {
|
||||
BANNER_PRIORITY_LOW,
|
||||
BannerContent,
|
||||
BannerService,
|
||||
} from "~/services/banner.service"
|
||||
import { WorkspaceService } from "~/services/workspace.service"
|
||||
import IconChevronDown from "~icons/lucide/chevron-down"
|
||||
import IconDownload from "~icons/lucide/download"
|
||||
import IconLayoutDashboard from "~icons/lucide/layout-dashboard"
|
||||
import IconLifeBuoy from "~icons/lucide/life-buoy"
|
||||
import IconSettings from "~icons/lucide/settings"
|
||||
import IconUploadCloud from "~icons/lucide/upload-cloud"
|
||||
import IconUser from "~icons/lucide/user"
|
||||
import IconUserPlus from "~icons/lucide/user-plus"
|
||||
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 toast = useToast()
|
||||
@@ -441,10 +400,6 @@ const workspaceSelectorFlagEnabled = computed(
|
||||
() => !!platform.platformFeatureFlags.workspaceSwitcherLogin?.value
|
||||
)
|
||||
|
||||
const showOrgLogo = computed(() => {
|
||||
return platform.organization?.isDefaultCloudInstance === false
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
const { organization } = platform
|
||||
|
||||
|
||||
Reference in New Issue
Block a user