add: services to profiles.

This commit is contained in:
Darshan
2025-11-06 15:00:27 +05:30
parent d03a6292df
commit 85df8ecbd4
2 changed files with 34 additions and 2 deletions
+30
View File
@@ -23,6 +23,16 @@ export type Profile = {
showExtendedAccountsMenu: boolean;
showGeneralAvailability: boolean;
showConnectProjectOnToolbar: boolean;
services: {
overview: boolean;
auth: boolean;
databases: boolean;
functions: boolean;
messaging: boolean;
storage: boolean;
sites: boolean;
settings: boolean;
};
getProjectRoute: (params: { region: string; project: string }) => ResolvedPathname;
};
@@ -42,6 +52,16 @@ export const base: Profile = {
showExtendedAccountsMenu: false,
showGeneralAvailability: true,
showConnectProjectOnToolbar: true,
services: {
overview: true,
auth: true,
databases: true,
functions: true,
messaging: true,
storage: true,
sites: true,
settings: true
},
getProjectRoute({ region, project }) {
return resolve(`/(console)/project-[region]-[project]/overview`, {
region,
@@ -66,6 +86,16 @@ export const studio: Profile = {
showExtendedAccountsMenu: true,
showGeneralAvailability: false,
showConnectProjectOnToolbar: false,
services: {
overview: false,
auth: true,
databases: true,
functions: false,
messaging: false,
storage: true,
sites: false,
settings: false
},
getProjectRoute({ region, project }) {
return resolve(`/(console)/project-[region]-[project]/(studio)/studio`, {
region,
+4 -2
View File
@@ -12,7 +12,8 @@ const BLOCK_START_BASE_OFFSET = 48;
const INLINE_START_BASE_OFFSET = 8;
const CACHE_BUSTER = new Date().getTime();
const CDN_URL =
'https://esm.sh/@imagine.dev/web-components@0/web-components?bundle=false&deps=react@19.1.0,react-dom@19.1.0&cache=' + CACHE_BUSTER;
'https://esm.sh/@imagine.dev/web-components@0/web-components?bundle=false&deps=react@19.1.0,react-dom@19.1.0&cache=' +
CACHE_BUSTER;
const DEV_OVERRIDE_WEB_COMPONENTS = env?.PUBLIC_AI_OVERRIDE_WEB_COMPONENTS === 'true';
let component: HTMLElement | null = null;
@@ -91,7 +92,8 @@ function injectStyles(node: HTMLElement, attempt = 0) {
link.rel = 'stylesheet';
link.href = DEV_OVERRIDE_WEB_COMPONENTS
? DEV_CSS_URL
: 'https://esm.sh/@imagine.dev/web-components@0/imagine-web-components.css?cache=' + CACHE_BUSTER;
: 'https://esm.sh/@imagine.dev/web-components@0/imagine-web-components.css?cache=' +
CACHE_BUSTER;
link.setAttribute(STYLE_ATTRIBUTE, 'true');
shadow.prepend(link);
})