mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Merge pull request #108 from appwrite/fix-qa-v3
feat: sort enabled OAuths and fixes from QA
This commit is contained in:
7 files changed
+19
-23
No files matched your search
@@ -6,6 +6,8 @@
|
||||
import { sdkForConsole } from '$lib/stores/sdk';
|
||||
import type { Provider } from '$lib/stores/oauth-providers';
|
||||
import { onMount } from 'svelte';
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
|
||||
export let provider: Provider;
|
||||
|
||||
@@ -33,15 +35,14 @@
|
||||
secret,
|
||||
enabled
|
||||
);
|
||||
provider.enabled = enabled;
|
||||
provider.appId = appId;
|
||||
provider.secret = secret;
|
||||
addNotification({
|
||||
type: 'success',
|
||||
message: `${provider.name} authentication has been ${
|
||||
provider.enabled ? 'enabled' : 'disabled'
|
||||
}`
|
||||
});
|
||||
provider = null;
|
||||
invalidate(Dependencies.PROJECT);
|
||||
} catch ({ message }) {
|
||||
error = message;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
import type { Provider } from '$lib/stores/oauth-providers';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { onMount } from 'svelte';
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
|
||||
export let provider: Provider;
|
||||
|
||||
@@ -31,15 +33,14 @@
|
||||
secret,
|
||||
enabled
|
||||
);
|
||||
provider.enabled = enabled;
|
||||
provider.appId = appId;
|
||||
provider.secret = secret;
|
||||
addNotification({
|
||||
type: 'success',
|
||||
message: `${provider.name} authentication has been ${
|
||||
provider.enabled ? 'enabled' : 'disabled'
|
||||
}`
|
||||
});
|
||||
provider = null;
|
||||
invalidate(Dependencies.PROJECT);
|
||||
} catch ({ message }) {
|
||||
error = message;
|
||||
}
|
||||
|
||||
@@ -34,15 +34,13 @@
|
||||
secret,
|
||||
enabled
|
||||
);
|
||||
provider.enabled = enabled;
|
||||
provider.appId = appId;
|
||||
provider.secret = secret;
|
||||
addNotification({
|
||||
type: 'success',
|
||||
message: `${provider.name} authentication has been ${
|
||||
provider.enabled ? 'enabled' : 'disabled'
|
||||
}`
|
||||
});
|
||||
provider = null;
|
||||
invalidate(Dependencies.PROJECT);
|
||||
} catch ({ message }) {
|
||||
error = message;
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
import type { Provider } from '$lib/stores/oauth-providers';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { onMount } from 'svelte';
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
|
||||
export let provider: Provider;
|
||||
|
||||
@@ -32,16 +34,14 @@
|
||||
secret,
|
||||
enabled
|
||||
);
|
||||
provider.enabled = enabled;
|
||||
provider.appId = appId;
|
||||
provider.secret = secret;
|
||||
|
||||
addNotification({
|
||||
type: 'success',
|
||||
message: `${provider.name} authentication has been ${
|
||||
provider.enabled ? 'enabled' : 'disabled'
|
||||
}`
|
||||
});
|
||||
provider = null;
|
||||
invalidate(Dependencies.PROJECT);
|
||||
} catch ({ message }) {
|
||||
error = message;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
import type { Provider } from '$lib/stores/oauth-providers';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { onMount } from 'svelte';
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
|
||||
export let provider: Provider;
|
||||
|
||||
@@ -34,15 +36,14 @@
|
||||
appId,
|
||||
secret
|
||||
);
|
||||
provider.enabled = enabled;
|
||||
provider.appId = appId;
|
||||
provider.secret = secret;
|
||||
addNotification({
|
||||
type: 'success',
|
||||
message: `${provider.name} authentication has been ${
|
||||
provider.enabled ? 'enabled' : 'disabled'
|
||||
}`
|
||||
});
|
||||
provider = null;
|
||||
invalidate(Dependencies.PROJECT);
|
||||
} catch ({ message }) {
|
||||
error = message;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<section class="common-section">
|
||||
<h2 class="heading-level-6 common-section">OAuth2 Providers</h2>
|
||||
<ul class="grid-box common-section">
|
||||
{#each $OAuthProviders.providers as provider}
|
||||
{#each $OAuthProviders.providers.sort( (a, b) => (a.enabled === b.enabled ? 0 : a.enabled ? -1 : 1) ) as provider}
|
||||
<button
|
||||
class="card u-flex u-flex-vertical u-cross-center"
|
||||
on:click={() => {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { Alert } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { FormItem, FormList, InputText } from '$lib/elements/forms';
|
||||
import { WizardStep } from '$lib/layout';
|
||||
@@ -46,11 +45,7 @@
|
||||
</script>
|
||||
|
||||
<WizardStep {beforeSubmit}>
|
||||
<svelte:fragment slot="title">Register your Flutter app</svelte:fragment>
|
||||
<Alert type="warning">
|
||||
Note: If you are building your Flutter application for multiple devices, you will have to
|
||||
follow this process for each different device.
|
||||
</Alert>
|
||||
<svelte:fragment slot="title">Register your Apple app</svelte:fragment>
|
||||
|
||||
<FormList isCommonSection>
|
||||
<FormItem>
|
||||
|
||||
Reference in new issue
Block a user