diff --git a/src/routes/console/project-[project]/auth/auth0OAuth.svelte b/src/routes/console/project-[project]/auth/(providers)/auth0OAuth.svelte
similarity index 95%
rename from src/routes/console/project-[project]/auth/auth0OAuth.svelte
rename to src/routes/console/project-[project]/auth/(providers)/auth0OAuth.svelte
index 51a25c834..0607180a5 100644
--- a/src/routes/console/project-[project]/auth/auth0OAuth.svelte
+++ b/src/routes/console/project-[project]/auth/(providers)/auth0OAuth.svelte
@@ -5,9 +5,10 @@
import type { Provider } from '$lib/stores/oauth-providers';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { updateOAuth } from './updateOAuth';
+ import { updateOAuth } from '../updateOAuth';
export let provider: Provider;
+ export let show = false;
let appId: string = null;
let enabled: boolean = null;
@@ -38,7 +39,7 @@
: provider.secret;
-
+
{provider.name} OAuth2 Settings
diff --git a/src/routes/console/project-[project]/auth/authentikOAuth.svelte b/src/routes/console/project-[project]/auth/(providers)/authentikOAuth.svelte
similarity index 95%
rename from src/routes/console/project-[project]/auth/authentikOAuth.svelte
rename to src/routes/console/project-[project]/auth/(providers)/authentikOAuth.svelte
index 7df8877a5..f7d6dcd37 100644
--- a/src/routes/console/project-[project]/auth/authentikOAuth.svelte
+++ b/src/routes/console/project-[project]/auth/(providers)/authentikOAuth.svelte
@@ -5,9 +5,10 @@
import type { Provider } from '$lib/stores/oauth-providers';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { updateOAuth } from './updateOAuth';
+ import { updateOAuth } from '../updateOAuth';
export let provider: Provider;
+ export let show = false;
let appId: string = null;
let enabled: boolean = null;
@@ -38,7 +39,7 @@
: provider.secret;
-
+
{provider.name} OAuth2 Settings
diff --git a/src/routes/console/project-[project]/auth/gitlabOAuth.svelte b/src/routes/console/project-[project]/auth/(providers)/gitlabOAuth.svelte
similarity index 95%
rename from src/routes/console/project-[project]/auth/gitlabOAuth.svelte
rename to src/routes/console/project-[project]/auth/(providers)/gitlabOAuth.svelte
index e93d4ae8f..95f80675e 100644
--- a/src/routes/console/project-[project]/auth/gitlabOAuth.svelte
+++ b/src/routes/console/project-[project]/auth/(providers)/gitlabOAuth.svelte
@@ -5,9 +5,10 @@
import type { Provider } from '$lib/stores/oauth-providers';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { updateOAuth } from './updateOAuth';
+ import { updateOAuth } from '../updateOAuth';
export let provider: Provider;
+ export let show = false;
let appId: string = null;
let enabled: boolean = null;
@@ -36,7 +37,7 @@
clientSecret && endpoint ? JSON.stringify({ clientSecret, endpoint }) : provider.secret;
-
+
{provider.name} OAuth2 Settings
diff --git a/src/routes/console/project-[project]/auth/googleOAuth.svelte b/src/routes/console/project-[project]/auth/(providers)/googleOAuth.svelte
similarity index 95%
rename from src/routes/console/project-[project]/auth/googleOAuth.svelte
rename to src/routes/console/project-[project]/auth/(providers)/googleOAuth.svelte
index c06c99b6f..defd59038 100644
--- a/src/routes/console/project-[project]/auth/googleOAuth.svelte
+++ b/src/routes/console/project-[project]/auth/(providers)/googleOAuth.svelte
@@ -5,9 +5,10 @@
import type { Provider } from '$lib/stores/oauth-providers';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { updateOAuth } from './updateOAuth';
+ import { updateOAuth } from '../updateOAuth';
export let provider: Provider;
+ export let show = false;
const projectId = $page.params.project;
@@ -34,7 +35,7 @@
};
-
+
{provider.name} OAuth2 Settings
diff --git a/src/routes/console/project-[project]/auth/mainOAuth.svelte b/src/routes/console/project-[project]/auth/(providers)/mainOAuth.svelte
similarity index 94%
rename from src/routes/console/project-[project]/auth/mainOAuth.svelte
rename to src/routes/console/project-[project]/auth/(providers)/mainOAuth.svelte
index f8c11649e..184fcd00c 100644
--- a/src/routes/console/project-[project]/auth/mainOAuth.svelte
+++ b/src/routes/console/project-[project]/auth/(providers)/mainOAuth.svelte
@@ -5,9 +5,10 @@
import type { Provider } from '$lib/stores/oauth-providers';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { updateOAuth } from './updateOAuth';
+ import { updateOAuth } from '../updateOAuth';
export let provider: Provider;
+ export let show = false;
const projectId = $page.params.project;
@@ -34,7 +35,7 @@
};
-
+
{provider.name} OAuth2 Settings
diff --git a/src/routes/console/project-[project]/auth/microsoftOAuth.svelte b/src/routes/console/project-[project]/auth/(providers)/microsoftOAuth.svelte
similarity index 95%
rename from src/routes/console/project-[project]/auth/microsoftOAuth.svelte
rename to src/routes/console/project-[project]/auth/(providers)/microsoftOAuth.svelte
index 266713e8e..7fd451af5 100644
--- a/src/routes/console/project-[project]/auth/microsoftOAuth.svelte
+++ b/src/routes/console/project-[project]/auth/(providers)/microsoftOAuth.svelte
@@ -5,9 +5,10 @@
import type { Provider } from '$lib/stores/oauth-providers';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { updateOAuth } from './updateOAuth';
+ import { updateOAuth } from '../updateOAuth';
export let provider: Provider;
+ export let show = false;
let appId: string = null;
let enabled: boolean = null;
@@ -37,7 +38,7 @@
clientSecret && tenantID ? JSON.stringify({ clientSecret, tenantID }) : provider.secret;
-
+
{provider.name} OAuth2 Settings
diff --git a/src/routes/console/project-[project]/auth/oidcOAuth.svelte b/src/routes/console/project-[project]/auth/(providers)/oidcOAuth.svelte
similarity index 96%
rename from src/routes/console/project-[project]/auth/oidcOAuth.svelte
rename to src/routes/console/project-[project]/auth/(providers)/oidcOAuth.svelte
index 719759e14..f00f07e30 100644
--- a/src/routes/console/project-[project]/auth/oidcOAuth.svelte
+++ b/src/routes/console/project-[project]/auth/(providers)/oidcOAuth.svelte
@@ -5,11 +5,12 @@
import type { Provider } from '$lib/stores/oauth-providers';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { updateOAuth } from './updateOAuth';
+ import { updateOAuth } from '../updateOAuth';
const projectId = $page.params.project;
export let provider: Provider;
+ export let show = false;
let appId: string = null;
let enabled: boolean = null;
@@ -60,7 +61,7 @@
: provider.secret;
-
+
{provider.name} OAuth2 Settings
diff --git a/src/routes/console/project-[project]/auth/oktaOAuth.svelte b/src/routes/console/project-[project]/auth/(providers)/oktaOAuth.svelte
similarity index 95%
rename from src/routes/console/project-[project]/auth/oktaOAuth.svelte
rename to src/routes/console/project-[project]/auth/(providers)/oktaOAuth.svelte
index b9e640f8d..6e23ca60c 100644
--- a/src/routes/console/project-[project]/auth/oktaOAuth.svelte
+++ b/src/routes/console/project-[project]/auth/(providers)/oktaOAuth.svelte
@@ -5,11 +5,12 @@
import type { Provider } from '$lib/stores/oauth-providers';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { updateOAuth } from './updateOAuth';
+ import { updateOAuth } from '../updateOAuth';
const projectId = $page.params.project;
export let provider: Provider;
+ export let show = false;
let appId: string = null;
let enabled: boolean = null;
@@ -42,7 +43,7 @@
: provider.secret;
-
+
{provider.name} OAuth2 Settings
diff --git a/src/routes/console/project-[project]/auth/settings/+page.svelte b/src/routes/console/project-[project]/auth/settings/+page.svelte
index fea2bad07..610733117 100644
--- a/src/routes/console/project-[project]/auth/settings/+page.svelte
+++ b/src/routes/console/project-[project]/auth/settings/+page.svelte
@@ -14,6 +14,7 @@
import { project } from '../../store';
const projectId = $page.params.project;
+ let showProvider = false;
$: {
authMethods.load($project);
@@ -74,6 +75,7 @@
class="card u-flex u-flex-vertical u-cross-center u-width-full-line"
on:click={() => {
selectedProvider = provider;
+ showProvider = true;
trackEvent(`click_select_provider`, {
provider: provider.key.toLowerCase()
});
@@ -99,9 +101,13 @@
{/if}
-{#if selectedProvider}
+{#if selectedProvider && showProvider}
(selectedProvider = null)} />
+ bind:show={showProvider}
+ on:close={() => {
+ selectedProvider = null;
+ showProvider = false;
+ }} />
{/if}
diff --git a/src/routes/console/project-[project]/functions/function-[function]/+layout.svelte b/src/routes/console/project-[project]/functions/function-[function]/+layout.svelte
index d693ef604..8ae5bc6d4 100644
--- a/src/routes/console/project-[project]/functions/function-[function]/+layout.svelte
+++ b/src/routes/console/project-[project]/functions/function-[function]/+layout.svelte
@@ -5,7 +5,7 @@
import { Dependencies } from '$lib/constants';
import { invalidate, goto } from '$app/navigation';
import { registerCommands } from '$lib/commandCenter';
- import { execute, func, showCreateDeployment } from './store';
+ import { func, showCreateDeployment } from './store';
import { project } from '../../store';
import type { Models } from '@appwrite.io/console';
import Execute from './execute.svelte';
@@ -147,4 +147,4 @@
-
+
diff --git a/src/routes/console/project-[project]/functions/function-[function]/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/+page.svelte
index 1462e407d..aa0c3c17b 100644
--- a/src/routes/console/project-[project]/functions/function-[function]/+page.svelte
+++ b/src/routes/console/project-[project]/functions/function-[function]/+page.svelte
@@ -25,7 +25,7 @@
TableRow,
TableScroll
} from '$lib/elements/table';
- import { deploymentList, execute, func, proxyRuleList } from './store';
+ import { deploymentList, execute, func, proxyRuleList, showFunctionExecute } from './store';
import { Container, ContainerHeader } from '$lib/layout';
import { app } from '$lib/stores/app';
import { calculateSize, humanFileSize } from '$lib/helpers/sizeConvertion';
@@ -151,7 +151,10 @@
diff --git a/src/routes/console/project-[project]/functions/function-[function]/execute.svelte b/src/routes/console/project-[project]/functions/function-[function]/execute.svelte
index 57d52063d..aea981107 100644
--- a/src/routes/console/project-[project]/functions/function-[function]/execute.svelte
+++ b/src/routes/console/project-[project]/functions/function-[function]/execute.svelte
@@ -15,9 +15,8 @@
import Label from '$lib/elements/forms/label.svelte';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
- import { ExecutionMethod, type Models } from '@appwrite.io/console';
-
- export let selectedFunction: Models.Function = null;
+ import { showFunctionExecute, execute } from './store';
+ import { ExecutionMethod } from '@appwrite.io/console';
let path = '/';
let method = ExecutionMethod.GET;
@@ -34,13 +33,8 @@
{ label: 'OPTIONS', value: ExecutionMethod.OPTIONS }
];
- let show = false;
let submitting = false;
- $: if (selectedFunction && !show) {
- show = true;
- }
-
const handleSubmit = async () => {
submitting = true;
try {
@@ -51,7 +45,7 @@
}
await sdk.forProject.functions.createExecution(
- selectedFunction.$id,
+ $execute.$id,
body,
true,
path,
@@ -60,7 +54,7 @@
);
if (!$page.url?.toString()?.includes('/executions')) {
await goto(
- `${base}/console/project-${$page.params.project}/functions/function-${selectedFunction.$id}/executions`
+ `${base}/console/project-${$page.params.project}/functions/function-${$execute.$id}/executions`
);
}
invalidate(Dependencies.EXECUTIONS);
@@ -79,8 +73,8 @@
};
function close() {
- selectedFunction = null;
- show = false;
+ $execute = null;
+ $showFunctionExecute = false;
}
afterNavigate(close);
@@ -89,10 +83,9 @@
Manually execute your function.
- {#if selectedFunction?.version !== 'v3'}
+ {#if $execute?.version !== 'v3'}
Customizable execution data now available for functions v3.0
diff --git a/src/routes/console/project-[project]/functions/function-[function]/executions/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/executions/+page.svelte
index 6db3add0d..0b14ea74f 100644
--- a/src/routes/console/project-[project]/functions/function-[function]/executions/+page.svelte
+++ b/src/routes/console/project-[project]/functions/function-[function]/executions/+page.svelte
@@ -19,19 +19,16 @@
import { log } from '$lib/stores/logs';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { func } from '../store';
+ import { func, execute, showFunctionExecute } from '../store';
import type { Models } from '@appwrite.io/console';
import { organization } from '$lib/stores/organization';
import { getServiceLimit, showUsageRatesModal } from '$lib/stores/billing';
import { project } from '$routes/console/project-[project]/store';
import Create from '../create.svelte';
- import Execute from '../execute.svelte';
import { abbreviateNumber } from '$lib/helpers/numbers';
export let data;
- let selectedFunction: Models.Function = null;
-
onMount(() => {
return sdk.forConsole.client.subscribe('console', (response) => {
if (response.events.includes('functions.*.executions.*')) {
@@ -54,7 +51,10 @@
title="Executions"
buttonText="Execute now"
buttonEvent="execute_function"
- buttonMethod={() => (selectedFunction = $func)}>
+ buttonMethod={() => {
+ $execute = $func;
+ $showFunctionExecute = true;
+ }}>
The {tier} plan has limits
@@ -169,7 +169,3 @@
{/if}
-
-
-
-
diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/executeFunction.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/executeFunction.svelte
index 112bc2758..ba4d81ea3 100644
--- a/src/routes/console/project-[project]/functions/function-[function]/settings/executeFunction.svelte
+++ b/src/routes/console/project-[project]/functions/function-[function]/settings/executeFunction.svelte
@@ -2,7 +2,7 @@
import { CardGrid, Heading, SvgIcon } from '$lib/components';
import { Button } from '$lib/elements/forms';
import { toLocaleDateTime } from '$lib/helpers/date';
- import { execute, func } from '../store';
+ import { execute, func, showFunctionExecute } from '../store';
@@ -26,6 +26,11 @@
-
+
diff --git a/src/routes/console/project-[project]/functions/function-[function]/store.ts b/src/routes/console/project-[project]/functions/function-[function]/store.ts
index c08ec380a..0bc01a1d4 100644
--- a/src/routes/console/project-[project]/functions/function-[function]/store.ts
+++ b/src/routes/console/project-[project]/functions/function-[function]/store.ts
@@ -12,6 +12,8 @@ export const proxyRuleList = derived(
($page) => $page.data.proxyRuleList as Models.ProxyRuleList
);
export const execute: Writable = writable();
+export const showFunctionExecute: Writable = writable(false);
+
export const repositories: Writable<{
search: string;
installationId: string;
diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte
index 4175ca7ce..648548e50 100644
--- a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte
+++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte
@@ -33,14 +33,19 @@
TableRowLink
} from '$lib/elements/table';
import { toLocaleDate } from '$lib/helpers/date';
- import { bytesToSize, calculateSize } from '$lib/helpers/sizeConvertion';
+ import {
+ bytesToSize,
+ calculateSize,
+ humanFileSize,
+ sizeToBytes
+ } from '$lib/helpers/sizeConvertion';
import { Container, ContainerHeader } from '$lib/layout';
import type { Models } from '@appwrite.io/console';
import { addNotification } from '$lib/stores/notifications';
import { uploader } from '$lib/stores/uploader';
import { wizard } from '$lib/stores/wizard';
import { tooltip } from '$lib/actions/tooltip';
- import { showUsageRatesModal } from '$lib/stores/billing';
+ import { getServiceLimit, showUsageRatesModal } from '$lib/stores/billing';
import { sdk } from '$lib/stores/sdk.js';
import Create from './create-file/create.svelte';
import DeleteFile from './deleteFile.svelte';
@@ -81,6 +86,10 @@
trackError(error, Submit.FileDelete);
}
}
+
+ $: maxFileSize = isCloud
+ ? humanFileSize(sizeToBytes(getServiceLimit('fileSize'), 'MB', 1000))
+ : null;
@@ -105,10 +114,12 @@
{#if tier === 'Starter'}
- You are limited to {limit} GB of storage on the {tier} plan.
+ You are limited to {limit} GB of total storage and {Math.floor(
+ parseInt(maxFileSize.value)
+ )}{maxFileSize.unit} on the {tier} plan.
- for addtional storage.
+ for additional storage.
{:else}
diff --git a/src/routes/console/wizard/cloudOrganizationChangeTier/confirmDetails.svelte b/src/routes/console/wizard/cloudOrganizationChangeTier/confirmDetails.svelte
index aa1c4bf8b..cc487c579 100644
--- a/src/routes/console/wizard/cloudOrganizationChangeTier/confirmDetails.svelte
+++ b/src/routes/console/wizard/cloudOrganizationChangeTier/confirmDetails.svelte
@@ -2,7 +2,7 @@
import { Box, CreditCardBrandImage } from '$lib/components';
import { CouponInput } from '$lib/components/billing';
import { BillingPlan } from '$lib/constants';
- import { FormList, InputTextarea } from '$lib/elements/forms';
+ import { FormList, InputSelect, InputTextarea } from '$lib/elements/forms';
import { toLocaleDate } from '$lib/helpers/date';
import { formatCurrency } from '$lib/helpers/numbers';
import { WizardStep } from '$lib/layout';
@@ -10,7 +10,12 @@
import { plansInfo } from '$lib/stores/billing';
import { organization } from '$lib/stores/organization';
import { sdk } from '$lib/stores/sdk';
- import { changeOrganizationFinalAction, changeOrganizationTier, isUpgrade } from './store';
+ import {
+ changeOrganizationFinalAction,
+ changeOrganizationTier,
+ feedbackDowngradeOptions,
+ isUpgrade
+ } from './store';
const plan = $plansInfo.get($changeOrganizationTier.billingPlan);
const collaboratorPrice = plan?.addons.member?.price ?? 0;
@@ -28,7 +33,6 @@
status: null,
credits: null
};
- let comment: string = null;
async function fetchCard() {
try {
@@ -51,16 +55,22 @@
Change confirmation
- Your feedback is important to us and helps us improve the services Appwrite offer. If
- there is a specific reason you chose to change your plan at this time, please let us
- know.
+ Your feedback is important to us and helps us improve the services Appwrite offers.
+ Please let us know if there is a specific reason for changing your plan.
+
+ placeholder="Enter feedback"
+ bind:value={$changeOrganizationTier.feedbackMessage} />
{:else}
diff --git a/src/routes/console/wizard/cloudOrganizationChangeTier/store.ts b/src/routes/console/wizard/cloudOrganizationChangeTier/store.ts
index f9f97b578..846dbabcc 100644
--- a/src/routes/console/wizard/cloudOrganizationChangeTier/store.ts
+++ b/src/routes/console/wizard/cloudOrganizationChangeTier/store.ts
@@ -23,6 +23,7 @@ export const changeOrganizationTier = writable<{
};
taxId?: string;
feedbackMessage?: string;
+ feedbackDowngradeReason?: string;
couponCode?: string;
}>({
billingPlan: BillingPlan.PRO,
@@ -32,3 +33,38 @@ export const changeOrganizationTier = writable<{
billingAddressId: null,
taxId: null
});
+
+export const feedbackDowngradeOptions = [
+ {
+ value: 'availableFeatures',
+ label: "The available features don't meet my needs"
+ },
+ {
+ value: 'traction',
+ label: "My project isn't getting traction"
+ },
+ {
+ value: 'bugs',
+ label: 'I experienced bugs or unexpected outages while using the console'
+ },
+ {
+ value: 'starter',
+ label: 'The Starter plan is enough for my projects'
+ },
+ {
+ value: 'budget',
+ label: "I don't have the budget"
+ },
+ {
+ value: 'tryOut',
+ label: 'I just wanted to try it out'
+ },
+ {
+ value: 'alternative',
+ label: 'I found an alternative/competitor to meet my needs'
+ },
+ {
+ value: 'other',
+ label: 'Other'
+ }
+];
diff --git a/vite.config.ts b/vite.config.ts
index 58800bff3..de1c825dd 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -35,8 +35,10 @@ const testConfig = defineConfig({
globals: true,
pool: 'threads',
setupFiles: ['./tests/unit/setup.ts'],
- deps: {
- inline: ['@analytics/type-utils']
+ server: {
+ deps: {
+ inline: ['@analytics/type-utils']
+ }
}
}
});