Skip to content

Commit 51d3377

Browse files
authored
Merge branch 'main' into fix-preferences
2 parents 6c96787 + 11c324d commit 51d3377

File tree

8 files changed

+74
-36
lines changed

8 files changed

+74
-36
lines changed
76.7 KB
Loading
64.6 KB
Loading
Binary file not shown.
Binary file not shown.

src/routes/(console)/bottomAlerts.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,43 @@ import {
66
setMobileSingleAlertLayout
77
} from '$lib/stores/bottom-alerts';
88

9-
import CSVImportDark from '$lib/images/promos/csv-import-placeholder-dark.png';
10-
import CSVImportLight from '$lib/images/promos/csv-import-placeholder-light.png';
9+
import BulkApiDark from '$lib/images/promos/bulk-api-dark.png';
10+
import BulkApiLight from '$lib/images/promos/bulk-api-light.png';
1111

1212
const listOfPromotions: BottomModalAlertItem[] = [];
1313

1414
if (isCloud) {
15-
const csvImportPromo: BottomModalAlertItem = {
16-
id: 'modal:csv_import_announcement',
15+
const bulkApiPromo: BottomModalAlertItem = {
16+
id: 'modal:bulk_api_announcement',
1717
src: {
18-
dark: CSVImportDark,
19-
light: CSVImportLight
18+
dark: BulkApiDark,
19+
light: BulkApiLight
2020
},
21-
title: 'Introducing CSV import',
21+
title: 'Introducing Bulk API',
2222
message:
23-
"We're introducing a new way to populate your Appwrite databases: document imports from CSV files.",
23+
'A new Appwrite Databases feature, explicitly designed to handle heavy write workloads.',
2424
plan: 'free',
2525
importance: 8,
26-
scope: 'everywhere',
26+
scope: 'project',
2727
cta: {
2828
text: 'Read announcement',
29-
link: () => 'https://appwrite.io/blog/post/announcing-csv-imports',
29+
link: () => 'https://appwrite.io/blog/post/announcing-bulk-api',
3030
external: true,
3131
hideOnClick: true
3232
},
3333
show: true
3434
};
3535

36-
listOfPromotions.push(csvImportPromo);
36+
listOfPromotions.push(bulkApiPromo);
3737

3838
setMobileSingleAlertLayout({
39-
title: csvImportPromo.title,
40-
message: csvImportPromo.message,
39+
title: bulkApiPromo.title,
40+
message: bulkApiPromo.message,
4141
enabled: true,
4242
cta: {
43-
link: csvImportPromo.cta.link,
44-
external: csvImportPromo.cta.external,
45-
hideOnClick: csvImportPromo.cta.hideOnClick
43+
link: bulkApiPromo.cta.link,
44+
external: bulkApiPromo.cta.external,
45+
hideOnClick: bulkApiPromo.cta.hideOnClick
4646
}
4747
});
4848
}

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

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
import { toLocaleDate } from '$lib/helpers/date';
88
import { isTabSelected } from '$lib/helpers/load';
99
import { Cover } from '$lib/layout';
10-
import { daysLeftInTrial, getServiceLimit, plansInfo, readOnly } from '$lib/stores/billing';
10+
import {
11+
daysLeftInTrial,
12+
getServiceLimit,
13+
plansInfo,
14+
readOnly,
15+
tierToPlan
16+
} from '$lib/stores/billing';
1117
import { members, newMemberModal, type Organization } from '$lib/stores/organization';
1218
import {
1319
canSeeBilling,
@@ -114,14 +120,25 @@
114120
{/if}
115121

116122
{#if $isOwner}
117-
<Button
118-
secondary
119-
size="s"
120-
on:click={() => newMemberModal.set(true)}
121-
disabled={areMembersLimited}>
122-
<Icon icon={IconPlus} size="s" slot="start" />
123-
Invite
124-
</Button>
123+
<Tooltip disabled={!areMembersLimited} placement="bottom-end">
124+
<div>
125+
<Button
126+
secondary
127+
size="s"
128+
on:click={() => newMemberModal.set(true)}
129+
disabled={areMembersLimited}>
130+
<Icon icon={IconPlus} size="s" slot="start" />
131+
Invite
132+
</Button>
133+
</div>
134+
<div slot="tooltip">
135+
{organization?.billingPlan === BillingPlan.FREE
136+
? 'Upgrade to add more members'
137+
: `You've reached the members limit for the ${
138+
tierToPlan(organization?.billingPlan)?.name
139+
} plan`}
140+
</div>
141+
</Tooltip>
125142
{/if}
126143
</Layout.Stack>
127144
</div>

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

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@
3131
Icon,
3232
Typography,
3333
Popover,
34-
ActionMenu
34+
ActionMenu,
35+
Tooltip
3536
} from '@appwrite.io/pink-svelte';
37+
import { BillingPlan } from '$lib/constants';
38+
import { tierToPlan } from '$lib/stores/billing';
3639
3740
export let data;
3841
@@ -41,6 +44,13 @@
4144
let showEdit = false;
4245
let showDropdown = [];
4346
47+
// Calculate if button should be disabled and tooltip should show
48+
$: memberCount = data.organizationMembers?.total ?? 0;
49+
$: isFreeWithMembers = $organization?.billingPlan === BillingPlan.FREE && memberCount >= 1;
50+
$: isButtonDisabled = isCloud
51+
? isFreeWithMembers || !$currentPlan?.addons?.seats?.supported
52+
: false;
53+
4454
const resend = async (member: Models.Membership) => {
4555
try {
4656
await sdk.forConsole.teams.createMembership(
@@ -70,14 +80,25 @@
7080
<Container>
7181
<Layout.Stack direction="row" justifyContent="space-between">
7282
<Typography.Title>Members</Typography.Title>
73-
<ConsoleButton
74-
size="s"
75-
event="create_user"
76-
on:click={() => newMemberModal.set(true)}
77-
disabled={isCloud ? !$currentPlan?.addons?.seats?.supported : false}>
78-
<Icon size="s" icon={IconPlus} slot="start" />
79-
<span class="text">Invite</span>
80-
</ConsoleButton>
83+
<Tooltip disabled={!isButtonDisabled} placement="bottom-end">
84+
<div>
85+
<ConsoleButton
86+
size="s"
87+
event="create_user"
88+
on:click={() => newMemberModal.set(true)}
89+
disabled={isButtonDisabled}>
90+
<Icon size="s" icon={IconPlus} slot="start" />
91+
<span class="text">Invite</span>
92+
</ConsoleButton>
93+
</div>
94+
<div slot="tooltip">
95+
{$organization?.billingPlan === BillingPlan.FREE
96+
? 'Upgrade to add more members'
97+
: `You've reached the members limit for the ${
98+
tierToPlan($organization?.billingPlan)?.name
99+
} plan`}
100+
</div>
101+
</Tooltip>
81102
</Layout.Stack>
82103

83104
<Table.Root

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@
158158
</Layout.Stack>
159159
</button>
160160
<Typography.Text color="--fgcolor-neutral-tertiary">
161-
Indicate whether this attribute is encrypted. Encrypted attributes
162-
cannot be queried.
161+
Protect attribute against data leaks for best privacy compliance.
162+
Encrypted attributes cannot be queried.
163163
</Typography.Text>
164164
</Layout.Stack>
165165

0 commit comments

Comments
 (0)