Skip to content

Commit 6982ae6

Browse files
committed
fix: small ui fixes
1 parent 2df7df2 commit 6982ae6

File tree

3 files changed

+22
-48
lines changed

3 files changed

+22
-48
lines changed

src/lib/components/progressbar/ProgressBar.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
flex-direction: row;
6767
gap: 2px;
6868
margin-top: 1rem;
69+
overflow: hidden;
6970
}
7071
7172
&__content {

src/routes/(console)/organization-[organization]/+page.svelte

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -144,26 +144,11 @@
144144

145145
{#if isCloud && $currentPlan?.projects && $currentPlan?.projects > 0 && data.organization.projects.length > 0 && $canWriteProjects && (projectsToArchive.length > 0 || data.projects.total > $currentPlan.projects)}
146146
<Alert.Inline
147-
title={projectsToArchive.length > 0
148-
? `${projectsToArchive.length} projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`
149-
: `Your organization has exceeded the project limit. Projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`}>
150-
<Typography.Text>
151-
{#if projectsToArchive.length > 0}
152-
{#each projectsToArchive as project, index}{@const text = `<b>${project.name}</b>`}
153-
{@html text}{index == projectsToArchive.length - 2
154-
? ', and '
155-
: index < projectsToArchive.length - 1
156-
? ', '
157-
: ''}
158-
{/each}
159-
will be archived
160-
{/if}
161-
</Typography.Text>
147+
title={`${projectsToArchive.length} projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`}>
148+
<Typography.Text>Upgrade your plan to restore archived projects</Typography.Text>
162149
<svelte:fragment slot="actions">
163-
<Button secondary size="s" on:click={() => (showSelectProject = true)}>
164-
Manage projects
165-
</Button>
166150
<Button
151+
compact
167152
size="s"
168153
href={$upgradeURL}
169154
on:click={() => {

src/routes/(console)/organization-[organization]/billing/planSummary.svelte

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
import { BillingPlan } from '$lib/constants';
1111
import { Click, trackEvent } from '$lib/actions/analytics';
1212
import {
13-
Divider,
1413
Typography,
1514
Expandable as ExpandableTable,
1615
Icon,
17-
Layout
16+
Layout,
17+
Divider
1818
} from '@appwrite.io/pink-svelte';
1919
import { humanFileSize } from '$lib/helpers/sizeConvertion';
2020
import { formatNum } from '$lib/helpers/string';
@@ -146,7 +146,7 @@
146146
id: 'base-plan',
147147
expandable: false,
148148
cells: {
149-
item: 'Base plan',
149+
item: currentPlan?.price === 0 ? 'Free plan' : 'Base plan',
150150
usage: '',
151151
price: formatCurrency(currentPlan?.price || 0)
152152
},
@@ -286,28 +286,14 @@
286286
{
287287
id: `project-${project.projectId}-usage-details`,
288288
cells: {
289-
item: `<a href="${base}/project-${project.region}-${project.projectId}/settings/usage" style="text-decoration: underline; color: var(--fgcolor-accent-neutral);">Usage details</a>`,
289+
item: `<a href="/console/project-${String(project.region || 'default')}-${project.projectId}/settings/usage" style="text-decoration: underline; color: var(--fgcolor-accent-neutral);">Usage details</a>`,
290290
usage: '',
291291
price: ''
292292
}
293293
}
294294
]
295295
}));
296-
const noProjects =
297-
projectsList && projectsList.length === 0
298-
? [
299-
{
300-
id: 'no-projects',
301-
expandable: false,
302-
cells: {
303-
item: 'No projects found',
304-
usage: '',
305-
price: formatCurrency(0)
306-
},
307-
children: []
308-
}
309-
]
310-
: [];
296+
const noProjects = [];
311297
return [base, ...addons, ...projects, ...noProjects];
312298
}
313299
@@ -321,17 +307,21 @@
321307

322308
{#if $organization}
323309
<EstimatedCard>
324-
<Typography.Title size="s">{currentPlan.name} plan</Typography.Title>
325-
326-
<Typography.Text color="--fgcolor-neutral-primary">
327-
Next payment of <span class="text u-bold">{formatCurrency(totalAmount)}</span>
328-
will occur on
329-
<span class="text u-bold">{toLocaleDate($organization?.billingNextInvoiceDate)}</span>.
330-
</Typography.Text>
331-
310+
<Typography.Title size="s" gap="s">{currentPlan.name} plan</Typography.Title>
311+
312+
{#if currentPlan?.price > 0}
313+
<Typography.Text color="--fgcolor-neutral-secondary">
314+
Next payment of <span class="text --fgcolor-neutral-primary u-bold"
315+
>{formatCurrency(totalAmount)}</span>
316+
will occur on
317+
<span class="text --fgcolor-neutral-primary u-bold"
318+
>{toLocaleDate($organization?.billingNextInvoiceDate)}</span
319+
>.
320+
</Typography.Text>
321+
{/if}
332322
<Divider />
333323
<div class="billing-cycle-header">
334-
<Typography.Text color="--fgcolor-neutral-primary" variant="m-500">
324+
<Typography.Text color="--fgcolor-neutral-secondary" variant="m-500">
335325
Current billing cycle ({new Date(
336326
$organization?.billingCurrentInvoiceDate
337327
).toLocaleDateString('en', { day: 'numeric', month: 'short' })}-{new Date(
@@ -575,8 +565,6 @@
575565
display: flex;
576566
justify-content: space-between;
577567
align-items: flex-start;
578-
margin-bottom: 0.5rem;
579-
margin-top: 1rem;
580568
}
581569
582570
:global(.card-only-on-desktop) {

0 commit comments

Comments
 (0)