Skip to content

Commit b9f794a

Browse files
authored
Merge branch 'feat-profiles' into fix-studio-billing
2 parents 6fa9e30 + 0d3fe45 commit b9f794a

18 files changed

Lines changed: 305 additions & 85 deletions

File tree

docker/generate-env.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ echo "✓ Successfully generated $env_file"
7474
echo "File contents:"
7575
cat "$env_file"
7676

77-
# NUKE all pre-compressed files so nginx serves fresh content
78-
echo "Nuking all .br and .gz files..."
79-
find /usr/share/nginx/html/console -type f \( -name "*.br" -o -name "*.gz" \) -delete
80-
echo "✓ Nuked all compressed files"
81-
8277
echo "========================================="
8378
echo "Starting nginx..."
8479
echo "========================================="

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build": "node build.js",
1010
"preview": "vite preview",
1111
"prepare": "svelte-kit sync || echo ''",
12-
"clean": "rm -rf node_modules && rm -rf .svelte_kit && pnpm i --force",
12+
"clean": "rm -rf node_modules && rm -rf .svelte_kit",
1313
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1414
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
1515
"format": "prettier --cache --write --cache .",
@@ -26,7 +26,7 @@
2626
"@appwrite.io/pink-icons": "0.25.0",
2727
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@5b26bb8",
2828
"@appwrite.io/pink-legacy": "^1.0.3",
29-
"@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@5b26bb8",
29+
"@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@33845eb",
3030
"@faker-js/faker": "^9.9.0",
3131
"@popperjs/core": "^2.11.8",
3232
"@sentry/sveltekit": "^10.25.0",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/layout/shell.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
margin-top: 48px;
264264
margin-right: 10px;
265265
margin-left: 64px;
266+
overflow: auto;
266267
@media (min-width: 1024px) {
267268
width: 100%;
268269
padding-left: 190px;

src/lib/profiles/css/studio.css

Lines changed: 86 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ button.primary {
1313
),
1414
#2d2d31 !important;
1515
--button-box-shadow:
16-
0 3px 0 0 rgba(255, 255, 255, 0.16) inset, 0 -2px 0 0 #000 inset, 0 1px 0 0 #000 inset,
17-
0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 2px 5px 0 rgba(0, 0, 0, 0.16);
16+
0 2px 0 0 rgba(255, 255, 255, 0.08) inset, 0 -2px 0 0 rgba(0, 0, 0, 0.24) inset,
17+
0 1px 1px 0 rgba(0, 0, 0, 0.08), 0 2px 5px 0 rgba(0, 0, 0, 0.16);
1818
}
1919

2020
a.primary:hover,
@@ -29,8 +29,8 @@ button.primary:hover {
2929
),
3030
#2d2d31 !important;
3131
--button-box-shadow:
32-
0 3px 0 0 rgba(255, 255, 255, 0.16) inset, 0 -2px 0 0 #000 inset, 0 1px 0 0 #000 inset,
33-
0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 2px 5px 0 rgba(0, 0, 0, 0.12);
32+
0 2px 0 0 rgba(255, 255, 255, 0.08) inset, 0 -2px 0 0 rgba(0, 0, 0, 0.24) inset,
33+
0 1px 1px 0 rgba(0, 0, 0, 0.08), 0 2px 5px 0 rgba(0, 0, 0, 0.16);
3434
}
3535

3636
a.primary:active:not(:disabled),
@@ -55,9 +55,8 @@ button.primary:active:not(:disabled) {
5555
),
5656
#f4f4f7 !important;
5757
--button-box-shadow:
58-
0 -2px 0 0 rgba(0, 0, 0, 0.12) inset, 0 1px 0 0 rgba(237, 237, 240, 0.8) inset,
59-
0 3px 0 0 rgba(255, 255, 255, 1) inset, 0 1px 1px 0 rgba(0, 0, 0, 0.2),
60-
0 2px 5px 0 rgba(0, 0, 0, 0.24);
58+
0 -2px 0 0 rgba(0, 0, 0, 0.12) inset, 0 2px 0 0 rgba(255, 255, 255, 1) inset,
59+
0 1px 1px 0 rgba(0, 0, 0, 0.2), 0 2px 5px 0 rgba(0, 0, 0, 0.24);
6160
}
6261

6362
.theme-dark a.primary:hover,
@@ -72,9 +71,8 @@ button.primary:active:not(:disabled) {
7271
),
7372
#f4f4f7 !important;
7473
--button-box-shadow:
75-
0 -2px 0 0 rgba(0, 0, 0, 0.16) inset, 0 1px 0 0 rgba(237, 237, 240, 0.8) inset,
76-
0 3px 0 0 rgba(255, 255, 255, 1) inset, 0 1px 1px 0 rgba(0, 0, 0, 0.16),
77-
0 2px 5px 0 rgba(0, 0, 0, 0.2);
74+
0 -2px 0 0 rgba(0, 0, 0, 0.12) inset, 0 2px 0 0 rgba(255, 255, 255, 1) inset,
75+
0 1px 1px 0 rgba(0, 0, 0, 0.2), 0 2px 5px 0 rgba(0, 0, 0, 0.24);
7876
}
7977

8078
.theme-dark a.primary:active:not(:disabled),
@@ -93,8 +91,8 @@ button.primary:active:not(:disabled) {
9391
0 1px 1px 0 rgba(0, 0, 0, 0.2), 0 2px 5px 0 rgba(0, 0, 0, 0.24);
9492
}
9593

96-
a.secondary,
97-
button.secondary {
94+
.theme-light a.secondary,
95+
.theme-light button.secondary {
9896
--border-width-s: 0px;
9997
background:
10098
linear-gradient(
@@ -105,12 +103,11 @@ button.secondary {
105103
),
106104
#f4f4f7 !important;
107105
--button-box-shadow:
108-
0 -2px 0 0 rgba(0, 0, 0, 0.04) inset, 0 1px 0 0 rgba(237, 237, 240, 0.8) inset,
109-
0 3px 0 0 rgba(255, 255, 255, 0.5) inset, 0 1px 1px 0 rgba(0, 0, 0, 0.12),
110-
0 2px 5px 0 rgba(0, 0, 0, 0.12);
106+
0 -2px 0 0 rgba(0, 0, 0, 0.04) inset, 0 2px 0 0 rgba(255, 255, 255, 0.5) inset,
107+
0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 2px 5px 0 rgba(0, 0, 0, 0.08);
111108
}
112-
a.secondary:hover,
113-
button.secondary:hover {
109+
.theme-light a.secondary:hover,
110+
.theme-light button.secondary:hover {
114111
background:
115112
linear-gradient(0deg, rgba(255, 255, 255, 0) -16.18%, rgba(255, 255, 255, 0.4) 100%),
116113
linear-gradient(
@@ -121,13 +118,12 @@ button.secondary:hover {
121118
),
122119
#f4f4f7 !important;
123120
--button-box-shadow:
124-
0 -2px 0 0 rgba(0, 0, 0, 0.04) inset, 0 1px 0 0 rgba(237, 237, 240, 0.8) inset,
125-
0 3px 0 0 rgba(255, 255, 255, 0.5) inset, 0 1px 1px 0 rgba(0, 0, 0, 0.09),
126-
0 2px 5px 0 rgba(0, 0, 0, 0.1);
121+
0 -2px 0 0 rgba(0, 0, 0, 0.04) inset, 0 2px 0 0 rgba(255, 255, 255, 0.5) inset,
122+
0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 2px 5px 0 rgba(0, 0, 0, 0.12);
127123
}
128124

129-
a.secondary:active:not(:disabled),
130-
button.secondary:active:not(:disabled) {
125+
.theme-light a.secondary:active:not(:disabled),
126+
.theme-light button.secondary:active:not(:disabled) {
131127
background:
132128
linear-gradient(
133129
180deg,
@@ -147,14 +143,14 @@ button.secondary:active:not(:disabled) {
147143
background:
148144
linear-gradient(
149145
180deg,
150-
rgba(255, 255, 255, 0.08) 0%,
146+
rgba(255, 255, 255, 0.04) 0%,
151147
rgba(0, 0, 0, 0) 40.87%,
152148
#2d2d31 100%
153149
),
154150
#2d2d31 !important;
155151
--button-color: oklch(0.985 0 0);
156152
--button-box-shadow:
157-
0 3px 0 0 rgba(255, 255, 255, 0.1) inset, 0 -2px 0 0 #000 inset, 0 1px 0 0 #000 inset,
153+
0 2px 0 0 rgba(255, 255, 255, 0.04) inset, 0 -2px 0 0 rgba(0, 0, 0, 0.24) inset,
158154
0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 2px 5px 0 rgba(0, 0, 0, 0.16);
159155
}
160156

@@ -169,10 +165,6 @@ button.secondary:active:not(:disabled) {
169165
#2d2d31 100%
170166
),
171167
#2d2d31 !important;
172-
--button-box-shadow:
173-
0 3px 0 0 rgba(255, 255, 255, 0.1) inset, 0 -2px 0 0 #000 inset, 0 1px 0 0 #000 inset,
174-
0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 2px 5px 0 rgba(0, 0, 0, 0.12);
175-
176168
--button-color: oklch(0.985 0 0);
177169
}
178170

@@ -194,3 +186,69 @@ button.secondary:active:not(:disabled) {
194186
button.danger {
195187
--button-color: var(--neutral-0);
196188
}
189+
190+
.tab-primary {
191+
transition: none !important;
192+
background: none !important;
193+
border: none !important;
194+
margin: none !important;
195+
}
196+
197+
.theme-dark .tabs-primary {
198+
background: rgba(45, 45, 49, 0.5) !important;
199+
box-shadow:
200+
0 4px 4px 0 rgba(0, 0, 0, 0.02) inset,
201+
0 -3px 4px 0 rgba(255, 255, 255, 0.04) inset,
202+
0 1px 1px 0 rgba(0, 0, 0, 0.25) !important;
203+
}
204+
.theme-dark .tab-primary.active {
205+
background:
206+
linear-gradient(
207+
180deg,
208+
rgba(255, 255, 255, 0.01) 0%,
209+
rgba(0, 0, 0, 0) 40.87%,
210+
rgba(0, 0, 0, 0.12) 100%
211+
),
212+
linear-gradient(0deg, #2d2d31 0%, #2d2d31 100%), #19191c !important;
213+
background-blend-mode: normal, normal, normal;
214+
box-shadow:
215+
0 1px 1px 0 rgba(0, 0, 0, 0.04),
216+
-6px 1px 5.2px 1px rgba(0, 0, 0, 0.04),
217+
0 2px 5px 0 rgba(0, 0, 0, 0.04),
218+
0 2px 0 0 rgba(255, 255, 255, 0.04) inset,
219+
0 -2px 0 0 rgba(0, 0, 0, 0.24) inset,
220+
0 1px 0 0 var(--border-neutral-strong, #414146) inset !important;
221+
}
222+
.theme-dark .tab-primary:not(.active):hover {
223+
color: var(--fgcolor-neutral-primary);
224+
}
225+
226+
.theme-light .tabs-primary {
227+
background: #f4f4f7 !important;
228+
box-shadow:
229+
0 1px 1px 0 rgba(0, 0, 0, 0.12),
230+
0 4px 4px 0 rgba(0, 0, 0, 0.02) inset,
231+
0 -3px 4px 0 rgba(255, 255, 255, 0.5) inset !important;
232+
}
233+
234+
.theme-light .tab-primary.active {
235+
background: #fafafb !important;
236+
box-shadow:
237+
0 2px 5px 0 rgba(0, 0, 0, 0.12),
238+
0 -2px 0 0 rgba(0, 0, 0, 0.08) inset,
239+
0 1px 0 0 rgba(237, 237, 240, 0.8) inset,
240+
0 2px 0 0 #fff inset !important;
241+
}
242+
.theme-light .tab-primary:not(.active):hover {
243+
color: var(--fgcolor-neutral-primary);
244+
}
245+
246+
.theme-light .top-cover-console,
247+
.theme-light .main-content {
248+
background: var(--bgcolor-neutral-default);
249+
}
250+
251+
.theme-dark .top-cover-console,
252+
.theme-dark .main-content {
253+
background: var(--bgcolor-neutral-default);
254+
}

src/lib/profiles/index.svelte.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
import { asset, resolve } from '$app/paths';
22
import type { ResolvedPathname } from '$app/types';
3-
import { Platform } from '@appwrite.io/console';
3+
import { OAuthProvider, Platform } from '@appwrite.io/console';
44
import { env } from '$env/dynamic/public';
55
import { BillingPlan } from '@appwrite.io/console';
66
import type { Component } from 'svelte';
77
import UnauthenticatedConsole from './(unauthenticated)/console.svelte';
88
import UnauthenticatedStudio from './(unauthenticated)/studio.svelte';
99
import StudioCss from './css/studio.css?url';
1010
import ConsoleCss from './css/console.css?url';
11+
import { isCloud } from '$lib/system';
1112

1213
export const enum ProfileMode {
1314
STUDIO = 'studio',
1415
CONSOLE = 'console'
1516
}
17+
export const enum Logins {
18+
EMAIL = 'email',
19+
GITHUB = 'github',
20+
GOOGLE = 'google'
21+
}
1622

1723
export type Profile = {
1824
id: ProfileMode;
@@ -26,13 +32,16 @@ export type Profile = {
2632
};
2733
alt: string;
2834
};
35+
logins: Array<Logins>;
36+
oauthProviders: Partial<Record<Logins, OAuthProvider>>;
2937
css: string;
3038
showOnboarding: boolean;
3139
useCommandCenter: boolean;
3240
showGithubIssueSupport: boolean;
3341
showExtendedAccountsMenu: boolean;
3442
showGeneralAvailability: boolean;
3543
showConnectProjectOnToolbar: boolean;
44+
showProgressBar: boolean;
3645
services: {
3746
'get-started': boolean;
3847
overview: boolean;
@@ -69,13 +78,18 @@ export const base: Profile = {
6978
component: {
7079
unauthenticated: UnauthenticatedConsole
7180
},
81+
logins: [Logins.EMAIL, isCloud && Logins.GITHUB].filter(Boolean),
82+
oauthProviders: {
83+
github: OAuthProvider.Github
84+
},
7285
css: ConsoleCss,
7386
showOnboarding: true,
7487
useCommandCenter: true,
7588
showGithubIssueSupport: true,
7689
showExtendedAccountsMenu: false,
7790
showGeneralAvailability: true,
7891
showConnectProjectOnToolbar: true,
92+
showProgressBar: true,
7993
services: {
8094
'get-started': true,
8195
overview: true,
@@ -111,6 +125,11 @@ export const studio: Profile = {
111125
},
112126
alt: 'Imagine Appwrite'
113127
},
128+
logins: [/** temporary */ Logins.EMAIL, Logins.GITHUB, Logins.GOOGLE].filter(Boolean),
129+
oauthProviders: {
130+
github: OAuthProvider.GithubImagine,
131+
google: OAuthProvider.Google
132+
},
114133
css: StudioCss,
115134
component: {
116135
unauthenticated: UnauthenticatedStudio
@@ -121,6 +140,7 @@ export const studio: Profile = {
121140
showExtendedAccountsMenu: true,
122141
showGeneralAvailability: false,
123142
showConnectProjectOnToolbar: false,
143+
showProgressBar: false,
124144
services: {
125145
'get-started': false,
126146
overview: false,

src/lib/stores/feedback.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Component } from 'svelte';
33
import { browser } from '$app/environment';
44
import { get, writable } from 'svelte/store';
55
import { Submit, trackEvent } from '$lib/actions/analytics';
6+
import { resolvedProfile } from '$lib/profiles/index.svelte';
67
import FeedbackNps from '$lib/components/feedback/feedbackNPS.svelte';
78
import FeedbackGeneral from '$lib/components/feedback/feedbackGeneral.svelte';
89

@@ -29,12 +30,12 @@ export type FeedbackOption = {
2930
export const feedbackOptions: FeedbackOption[] = [
3031
{
3132
type: 'general',
32-
desc: `Appwrite evolves with your input. Share your thoughts and help us improve Appwrite.`,
33+
desc: `${resolvedProfile.platform} evolves with your input. Share your thoughts and help us improve ${resolvedProfile.platform}.`,
3334
component: FeedbackGeneral
3435
},
3536
{
3637
type: 'nps',
37-
desc: `How likely are you to recommend Appwrite to a friend or colleague?`,
38+
desc: `How likely are you to recommend ${resolvedProfile.platform} to a friend or colleague?`,
3839
component: FeedbackNps
3940
}
4041
];

src/lib/studio/studio.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import AddDomains from './domains/add/view.svelte';
1313
import VerifyDomain from './domains/verify/view.svelte';
1414
import ManageDomains from './domains/manage/view.svelte';
15+
import { sdk } from '$lib/stores/sdk';
1516
1617
const {
1718
region,
@@ -24,9 +25,12 @@
2425
} = $props();
2526
2627
const siteId = `project-${projectId}`;
28+
const isStage = sdk.forConsole.client.config.endpoint.includes('stage');
2729
let showAddDomainsWizard = $state(false);
2830
let showManageDomainsSheet = $state(false);
29-
let primaryDomainForSite = $state(`imagine-${projectId}.stage.appwrite.network`);
31+
let primaryDomainForSite = $state(
32+
`imagine-${projectId}.${isStage ? 'stage.' : ''}appwrite.network`
33+
);
3034
3135
let showVerifyDomainsWizard = $state(false);
3236
let ruleIdForVerification = $state(null);

0 commit comments

Comments
 (0)