Skip to content

Commit c307071

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat-project-changes
2 parents 847b645 + 3c2c49b commit c307071

File tree

27 files changed

+209
-137
lines changed

27 files changed

+209
-137
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@appwrite.io/pink-icons": "0.25.0",
2727
"@appwrite.io/pink-icons-svelte": "^2.0.0-RC.1",
2828
"@appwrite.io/pink-legacy": "^1.0.3",
29-
"@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@973fff2",
29+
"@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@d521606",
3030
"@popperjs/core": "^2.11.8",
3131
"@sentry/sveltekit": "^8.38.0",
3232
"@stripe/stripe-js": "^3.5.0",

pnpm-lock.yaml

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

src/lib/components/breadcrumbs.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
<ActionMenu.Root>
342342
<ActionMenu.Item.Anchor
343343
href={`${base}/project-${project.region}-${project.$id}/overview/platforms`}>
344-
{project.name}
344+
<span class="projectName dropdown">{project.name}</span>
345345
</ActionMenu.Item.Anchor>
346346
</ActionMenu.Root>
347347
</div>
@@ -421,6 +421,15 @@
421421
@media (min-width: 1024px) {
422422
max-width: 150px;
423423
}
424+
425+
&.dropdown {
426+
max-width: 200px;
427+
white-space: nowrap;
428+
overflow: hidden;
429+
text-overflow: ellipsis;
430+
display: inline-block;
431+
vertical-align: middle;
432+
}
424433
}
425434
426435
.noProjects {

src/lib/components/domains/cnameTable.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{#if verified === true}
2727
<Badge variant="secondary" type="success" size="xs" content="Verified" />
2828
{:else if verified === false}
29-
<Badge variant="secondary" type="error" size="xs" content="Verification failed" />
29+
<Badge variant="secondary" type="warning" size="xs" content="Verification failed" />
3030
{/if}
3131
</Layout.Stack>
3232
<Typography.Text variant="m-400">

src/lib/components/domains/recordTable.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
{#if verified === true}
4141
<Badge variant="secondary" type="success" size="xs" content="Verified" />
4242
{:else if verified === false}
43-
<Badge variant="secondary" type="error" size="xs" content="Verification failed" />
43+
<Badge variant="secondary" type="warning" size="xs" content="Verification failed" />
4444
{/if}
4545
</Layout.Stack>
4646
<Typography.Text variant="m-400">

src/lib/components/expirationInput.svelte

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
return options[0]?.value ?? null;
8686
}
8787
88-
let result = 'custom';
88+
let result = null;
89+
8990
for (const option of options) {
9091
if (!isValidDate(option.value)) continue;
9192
@@ -95,6 +96,12 @@
9596
}
9697
}
9798
99+
// no matching date, check if 'custom' is available
100+
if (result === null) {
101+
const hasCustomOption = options.some((option) => option.value === 'custom');
102+
result = hasCustomOption ? 'custom' : (options[0]?.value ?? null);
103+
}
104+
98105
return result;
99106
}
100107
@@ -108,8 +115,18 @@
108115
let expirationSelect = initExpirationSelect();
109116
let expirationCustom: string | null = value ? splitDateValue(value) : null;
110117
118+
let initialized = false;
119+
let hasUserInteracted = false;
120+
111121
$: {
112-
if (!isSameDay(new Date(expirationSelect), new Date(value))) {
122+
// Set initial value if value is null on first load
123+
if (!initialized && value === null && expirationSelect !== null) {
124+
value = expirationSelect === 'custom' ? expirationCustom : expirationSelect;
125+
initialized = true;
126+
}
127+
128+
// Only update value after user interaction
129+
if (hasUserInteracted && !isSameDay(new Date(expirationSelect), new Date(value))) {
113130
value = expirationSelect === 'custom' ? expirationCustom : expirationSelect;
114131
}
115132
}
@@ -126,13 +143,15 @@
126143
{options}
127144
id="preset"
128145
label={selectorLabel}
129-
bind:value={expirationSelect} />
146+
bind:value={expirationSelect}
147+
on:change={() => (hasUserInteracted = true)} />
130148

131149
{#if expirationSelect === 'custom'}
132150
<InputDateTime
133151
required
134152
type="date"
135153
id="expire"
136154
label={dateSelectorLabel}
137-
bind:value={expirationCustom} />
155+
bind:value={expirationCustom}
156+
on:change={() => (hasUserInteracted = true)} />
138157
{/if}

src/lib/components/git/deploymentDomains.svelte

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
import { Link } from '$lib/elements';
44
import { Button } from '$lib/elements/forms';
55
import type { Models } from '@appwrite.io/console';
6-
import { IconExternalLink, IconQrcode } from '@appwrite.io/pink-icons-svelte';
7-
import { ActionMenu, Icon, Layout, Popover, Tag, Typography } from '@appwrite.io/pink-svelte';
6+
import { IconExclamation, IconExternalLink, IconQrcode } from '@appwrite.io/pink-icons-svelte';
7+
import {
8+
ActionMenu,
9+
Icon,
10+
Layout,
11+
Popover,
12+
Tag,
13+
Tooltip,
14+
Typography
15+
} from '@appwrite.io/pink-svelte';
816
import { regionalProtocol } from '$routes/(console)/project-[region]-[project]/store';
917
1018
let {
@@ -34,9 +42,19 @@
3442
<Link external href={`${$regionalProtocol}${sortedDomains[0]?.domain}`} variant="muted">
3543
<Layout.Stack gap="xxs" direction="row" alignItems="center">
3644
<Trim alternativeTrim>
37-
<Typography.Text variant="m-400" color="--fgcolor-neutral-primary">
38-
{sortedDomains[0]?.domain}
39-
</Typography.Text>
45+
<Layout.Stack gap="xxs" direction="row" alignItems="flex-end">
46+
<Typography.Text variant="m-400" color="--fgcolor-neutral-primary">
47+
{sortedDomains[0]?.domain}
48+
</Typography.Text>
49+
50+
{#if sortedDomains[0]?.status !== 'verified'}
51+
<Tooltip>
52+
<Icon icon={IconExclamation} size="s" color="--bgcolor-warning" />
53+
54+
<div slot="tooltip">Not verified</div>
55+
</Tooltip>
56+
{/if}
57+
</Layout.Stack>
4058
</Trim>
4159
</Layout.Stack>
4260
</Link>

src/lib/helpers/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ export type TableRootProp = {
6060
selectedAll: boolean;
6161
selectedNone: boolean;
6262
selectedSome: boolean;
63-
columns: Array<PinkColumn> | number;
64-
columnsMap: Record<PinkColumn['id'], PinkColumn>;
63+
// columns: Array<Column> | number;
64+
columns: Record<PinkColumn['id'], PinkColumn>;
65+
// columnsMap: Record<PinkColumn['id'], PinkColumn>;
6566
toggle: (id: string) => void;
6667
toggleAll: () => void;
6768
addAvailableId: (id: string) => void;

src/lib/stores/billing.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ export async function checkForUsageLimit(org: Organization) {
377377
const members = org.total;
378378
const plan = get(currentPlan);
379379
const membersOverflow =
380-
members > plan.addons.seats.limit ? members - (plan.addons.seats.limit || members) : 0;
380+
// nested null checks needed: GitHub Education plan have empty addons.
381+
members > plan.addons.seats?.limit ? members - (plan.addons.seats?.limit || members) : 0;
381382

382383
if (resources.some((r) => r.value >= 100) || membersOverflow > 0) {
383384
readOnly.set(true);

src/routes/(console)/onboarding/create-organization/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
message: e.message
4545
});
4646
} finally {
47-
isLoading = false;
4847
if (organization) {
4948
loadAvailableRegions(organization?.$id).then();
5049
await goto(`${base}/organization-${organization.$id}`);
5150
}
51+
isLoading = false;
5252
}
5353
}
5454
</script>

0 commit comments

Comments
 (0)