From 32714fcfa579c05fc5f9bbe67d82c0d2788539f3 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 21 Feb 2023 02:34:13 +0000 Subject: [PATCH 01/22] update password history limit component --- src/lib/actions/analytics.ts | 1 + .../auth/security/+page.svelte | 2 + .../security/updatePasswordHistory.svelte | 64 +++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte diff --git a/src/lib/actions/analytics.ts b/src/lib/actions/analytics.ts index 357b5ff55..501da65d5 100644 --- a/src/lib/actions/analytics.ts +++ b/src/lib/actions/analytics.ts @@ -141,6 +141,7 @@ export enum Submit { TeamUpdateName = 'submit_team_update_name', AuthLimitUpdate = 'submit_auth_limit_update', AuthStatusUpdate = 'submit_auth_status_update', + AuthPasswordHistoryUpdate = 'submit_auth_password_history_limit_update', SessionsLengthUpdate = 'submit_sessions_length_update', SessionsLimitUpdate = 'submit_sessions_limit_update', SessionDelete = 'submit_session_delete', diff --git a/src/routes/console/project-[project]/auth/security/+page.svelte b/src/routes/console/project-[project]/auth/security/+page.svelte index beea9ce44..904d7a71f 100644 --- a/src/routes/console/project-[project]/auth/security/+page.svelte +++ b/src/routes/console/project-[project]/auth/security/+page.svelte @@ -1,5 +1,6 @@ + +
+ + Password History +

+ Maximum nubmer of password history to save for a user. 0 for disabling the password + history. +

+ +
    + +
+
+ + + + +
+
From 42f484db57bd308e264bdea5f10888024cad782b Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 21 Feb 2023 09:18:38 +0545 Subject: [PATCH 02/22] remove unused code --- .../auth/security/updatePasswordHistory.svelte | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte index 1bd239ff9..f4496612a 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte @@ -3,15 +3,12 @@ import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; import { CardGrid, Heading } from '$lib/components'; import { Dependencies } from '$lib/constants'; - import { Button, Form, InputNumber, InputSelect } from '$lib/elements/forms'; - import { createTimeUnitPair } from '$lib/helpers/unit'; + import { Button, Form, InputNumber } from '$lib/elements/forms'; import { addNotification } from '$lib/stores/notifications'; import { sdkForConsole } from '$lib/stores/sdk'; import { project } from '../../store'; const projectId = $project.$id; - const { value, unit, baseValue, units } = createTimeUnitPair($project.authDuration); - const options = units.map((v) => ({ label: v.name, value: v.name })); let passwordHistory = $project.authPasswordHistory ?? 0; async function updatePasswordHistoryLimit() { From a2020ca25f8ba5b18beaac0df23a6acbdcebbc72 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 21 Feb 2023 09:31:35 +0545 Subject: [PATCH 03/22] password dictonary UI --- src/lib/actions/analytics.ts | 1 + .../auth/security/+page.svelte | 2 + .../security/updatePasswordDictionary.svelte | 68 +++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte diff --git a/src/lib/actions/analytics.ts b/src/lib/actions/analytics.ts index 501da65d5..397e0d60d 100644 --- a/src/lib/actions/analytics.ts +++ b/src/lib/actions/analytics.ts @@ -142,6 +142,7 @@ export enum Submit { AuthLimitUpdate = 'submit_auth_limit_update', AuthStatusUpdate = 'submit_auth_status_update', AuthPasswordHistoryUpdate = 'submit_auth_password_history_limit_update', + AuthPasswordDictionaryUpdate = 'submit_auth_password_dictionary_update', SessionsLengthUpdate = 'submit_sessions_length_update', SessionsLimitUpdate = 'submit_sessions_limit_update', SessionDelete = 'submit_session_delete', diff --git a/src/routes/console/project-[project]/auth/security/+page.svelte b/src/routes/console/project-[project]/auth/security/+page.svelte index 904d7a71f..c9c411910 100644 --- a/src/routes/console/project-[project]/auth/security/+page.svelte +++ b/src/routes/console/project-[project]/auth/security/+page.svelte @@ -1,5 +1,6 @@ + +
+ + Password Dictionary + + + + +

+ When enabled it checks the user's password against the dictionary of most commonly + used password. It uses 10 K most common passwords list. +

+
+ + + + +
+
From e3cad8e5106a9ad1642ebdc5a1cf2849cf705472 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 21 Feb 2023 10:43:22 +0545 Subject: [PATCH 04/22] Update src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte Co-authored-by: Carla --- .../auth/security/updatePasswordHistory.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte index f4496612a..2471c24e0 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte @@ -45,7 +45,7 @@ Password History

- Maximum nubmer of password history to save for a user. 0 for disabling the password + Maximum number of passwords saved per user. Use 0 to disable the password history.

From 09898293997a02048e97eb554b545a93cef0b59d Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 21 Feb 2023 08:40:41 +0000 Subject: [PATCH 05/22] review feedbacks --- .../security/updatePasswordDictionary.svelte | 9 ++++++-- .../security/updatePasswordHistory.svelte | 21 ++++++++++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte index 95c826f50..839b0f2fe 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte @@ -6,10 +6,15 @@ import { Button, Form, FormList, InputNumber, InputSwitch } from '$lib/elements/forms'; import { addNotification } from '$lib/stores/notifications'; import { sdkForConsole } from '$lib/stores/sdk'; + import { onMount } from 'svelte'; import { project } from '../../store'; const projectId = $project.$id; - let passwordDictionary = $project.authPasswordDictionary ?? 0; + let passwordDictionary = $project.authPasswordDictionary ?? false; + + onMount(() => { + passwordDictionary = $project.authPasswordDictionary ?? false; + }); async function updatePasswordDictionary() { try { @@ -56,7 +61,7 @@ used password. It uses 10 K most common passwords list. + >10K most common passwords list.

diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte index 2471c24e0..dcd1b9da6 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte @@ -4,13 +4,19 @@ import { CardGrid, Heading } from '$lib/components'; import { Dependencies } from '$lib/constants'; import { Button, Form, InputNumber } from '$lib/elements/forms'; + import FormList from '$lib/elements/forms/formList.svelte'; import { addNotification } from '$lib/stores/notifications'; import { sdkForConsole } from '$lib/stores/sdk'; + import { onMount } from 'svelte'; import { project } from '../../store'; const projectId = $project.$id; let passwordHistory = $project.authPasswordHistory ?? 0; + onMount(() => { + passwordHistory = $project.authPasswordHistory ?? 0; + }); + async function updatePasswordHistoryLimit() { try { const path = '/projects/' + projectId + '/auth/password-history'; @@ -44,14 +50,19 @@
Password History -

- Maximum number of passwords saved per user. Use 0 to disable the password +

+ Maximum number of passwords saved per user. Maximum is 20. Use 0 to disable the password history.

-
    - -
+ + +
From 3fc32ccc9f1aa765cfd3c55d8a0d12eb171852af Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 21 Feb 2023 14:40:00 +0545 Subject: [PATCH 06/22] update link --- .../auth/security/updatePasswordDictionary.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte index 839b0f2fe..755afe6c7 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte @@ -58,7 +58,9 @@

When enabled it checks the user's password against the dictionary of most commonly - used password. It uses 10K most common passwords list. From c72fd1e2f8c73f056c4f30ac2639c1e43462a278 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 21 Feb 2023 14:40:39 +0545 Subject: [PATCH 07/22] remove unused import --- .../auth/security/updatePasswordDictionary.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte index 755afe6c7..ba64f6b80 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte @@ -3,7 +3,7 @@ import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; import { CardGrid, Heading } from '$lib/components'; import { Dependencies } from '$lib/constants'; - import { Button, Form, FormList, InputNumber, InputSwitch } from '$lib/elements/forms'; + import { Button, Form, FormList, InputSwitch } from '$lib/elements/forms'; import { addNotification } from '$lib/stores/notifications'; import { sdkForConsole } from '$lib/stores/sdk'; import { onMount } from 'svelte'; From f8e46aaeaa11e989f44ce349f150c4d473c206eb Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 21 Feb 2023 14:43:52 +0545 Subject: [PATCH 08/22] remove on mount not required --- .../auth/security/updatePasswordDictionary.svelte | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte index ba64f6b80..458504f2b 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte @@ -6,16 +6,11 @@ import { Button, Form, FormList, InputSwitch } from '$lib/elements/forms'; import { addNotification } from '$lib/stores/notifications'; import { sdkForConsole } from '$lib/stores/sdk'; - import { onMount } from 'svelte'; import { project } from '../../store'; const projectId = $project.$id; let passwordDictionary = $project.authPasswordDictionary ?? false; - onMount(() => { - passwordDictionary = $project.authPasswordDictionary ?? false; - }); - async function updatePasswordDictionary() { try { const path = '/projects/' + projectId + '/auth/password-dictionary'; From 4d7070124562047aa210917de51b48687b8244c8 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 21 Feb 2023 14:44:04 +0545 Subject: [PATCH 09/22] remove on mount not required --- .../auth/security/updatePasswordHistory.svelte | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte index dcd1b9da6..8d5cca34f 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte @@ -7,16 +7,11 @@ import FormList from '$lib/elements/forms/formList.svelte'; import { addNotification } from '$lib/stores/notifications'; import { sdkForConsole } from '$lib/stores/sdk'; - import { onMount } from 'svelte'; import { project } from '../../store'; const projectId = $project.$id; let passwordHistory = $project.authPasswordHistory ?? 0; - onMount(() => { - passwordHistory = $project.authPasswordHistory ?? 0; - }); - async function updatePasswordHistoryLimit() { try { const path = '/projects/' + projectId + '/auth/password-history'; From 0d3aec91f175bc357987f23a44645e79c16878d5 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 28 Feb 2023 10:52:37 +0545 Subject: [PATCH 10/22] update ui and copy --- .../security/updatePasswordDictionary.svelte | 6 ++--- .../security/updatePasswordHistory.svelte | 24 +++++++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte index 458504f2b..734817ad0 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordDictionary.svelte @@ -52,13 +52,13 @@ label="Password Dictionary" />

- When enabled it checks the user's password against the dictionary of most commonly - used password. It uses 10K most common passwords list. + >10k most commonly used passwords.

diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte index 8d5cca34f..09f8b8be0 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte @@ -3,7 +3,7 @@ import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; import { CardGrid, Heading } from '$lib/components'; import { Dependencies } from '$lib/constants'; - import { Button, Form, InputNumber } from '$lib/elements/forms'; + import { Button, Form, InputNumber, InputSwitch } from '$lib/elements/forms'; import FormList from '$lib/elements/forms/formList.svelte'; import { addNotification } from '$lib/stores/notifications'; import { sdkForConsole } from '$lib/stores/sdk'; @@ -11,9 +11,13 @@ const projectId = $project.$id; let passwordHistory = $project.authPasswordHistory ?? 0; + let passwordHistoryEnabled = ($project.authPasswordHistory ?? 0) != 0; async function updatePasswordHistoryLimit() { try { + if (!passwordHistoryEnabled) { + passwordHistory = 0; + } const path = '/projects/' + projectId + '/auth/password-history'; const uri = new URL(sdkForConsole.client.config.endpoint + path); await sdkForConsole.client.call( @@ -45,17 +49,27 @@ Password History -

- Maximum number of passwords saved per user. Maximum is 20. Use 0 to disable the password - history. -

+ + + +

+ Enabling this option prevents users from reusing recent passwords by comparing the + new password with their password history. +

+

+ Set the maximum number of passwords saved per user. Maximum 20 passwords. +

From 15215537d19ced2840999e168a8af713bb8bf025 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 1 Mar 2023 11:04:03 +0545 Subject: [PATCH 11/22] design fix and sdk updated --- package-lock.json | 20 ++++++------- package.json | 2 +- src/lib/actions/analytics.ts | 2 +- src/lib/components/permissions/row.svelte | 2 +- src/lib/components/permissions/team.svelte | 2 +- src/lib/components/permissions/user.svelte | 2 +- src/lib/layout/activity.svelte | 2 +- src/lib/layout/logs.svelte | 2 +- src/lib/layout/usage.svelte | 2 +- src/lib/stores/auth-methods.ts | 2 +- src/lib/stores/logs.ts | 2 +- src/lib/stores/oauth-providers.ts | 2 +- src/lib/stores/organization.ts | 2 +- src/lib/stores/project-services.ts | 2 +- src/lib/stores/projects.ts | 2 +- src/lib/stores/sdk.ts | 2 +- src/lib/stores/uploader.ts | 2 +- src/lib/stores/user.ts | 2 +- src/routes/auth/magic-url/+page.svelte | 2 +- .../account/activity/[[page]]/+page.ts | 2 +- .../account/organizations/[[page]]/+page.ts | 2 +- .../account/sessions/[[page]]/+page.svelte | 2 +- src/routes/console/createOrganization.svelte | 2 +- src/routes/console/onboarding/+page.svelte | 2 +- .../[[page]]/+page.ts | 2 +- .../createProject.svelte | 2 +- .../deleteMember.svelte | 2 +- .../members/[[page]]/+page.svelte | 2 +- .../members/[[page]]/+page.ts | 2 +- .../auth/[[page]]/+page.svelte | 2 +- .../project-[project]/auth/[[page]]/+page.ts | 2 +- .../project-[project]/auth/createTeam.svelte | 2 +- .../project-[project]/auth/createUser.svelte | 2 +- .../security/updatePasswordDictionary.svelte | 16 +++------- .../security/updatePasswordHistory.svelte | 29 ++++++++----------- .../auth/teams/[[page]]/+page.svelte | 2 +- .../auth/teams/[[page]]/+page.ts | 2 +- .../team-[team]/activity/[[page]]/+page.ts | 2 +- .../teams/team-[team]/deleteMembership.svelte | 2 +- .../auth/teams/team-[team]/deleteTeam.svelte | 2 +- .../team-[team]/members/[[page]]/+page.svelte | 2 +- .../team-[team]/members/[[page]]/+page.ts | 2 +- .../auth/teams/team-[team]/store.ts | 2 +- .../auth/usage/[[period]]/+page.ts | 2 +- .../user-[user]/activity/[[page]]/+page.ts | 2 +- .../auth/user-[user]/deleteMembership.svelte | 2 +- .../memberships/[[page]]/+page.svelte | 2 +- .../auth/user-[user]/store.ts | 2 +- .../databases/[[page]]/+page.svelte | 2 +- .../databases/[[page]]/+page.ts | 2 +- .../project-[project]/databases/create.svelte | 2 +- .../database-[database]/[[page]]/+page.svelte | 2 +- .../database-[database]/[[page]]/+page.ts | 2 +- .../collection-[collection]/[[page]]/+page.ts | 2 +- .../activity/[[page]]/+page.ts | 2 +- .../attributes/boolean.svelte | 2 +- .../attributes/datetime.svelte | 2 +- .../attributes/email.svelte | 2 +- .../attributes/enum.svelte | 2 +- .../attributes/float.svelte | 2 +- .../attributes/integer.svelte | 2 +- .../attributes/ip.svelte | 2 +- .../attributes/string.svelte | 2 +- .../attributes/url.svelte | 2 +- .../createDocument.svelte | 2 +- .../activity/[[page]]/+page.ts | 2 +- .../document-[document]/attribute.svelte | 2 +- .../attributes/boolean.svelte | 2 +- .../attributes/datetime.svelte | 2 +- .../attributes/enum.svelte | 2 +- .../attributes/integer.svelte | 2 +- .../attributes/string.svelte | 2 +- .../document-[document]/attributes/url.svelte | 2 +- .../document-[document]/document.svelte | 2 +- .../document-[document]/store.ts | 2 +- .../indexes/+page.svelte | 2 +- .../indexes/deleteIndex.svelte | 2 +- .../indexes/overviewIndex.svelte | 2 +- .../collection-[collection]/store.ts | 2 +- .../usage/[[period]]/+page.ts | 2 +- .../database-[database]/create.svelte | 2 +- .../databases/database-[database]/store.ts | 2 +- .../usage/[[period]]/+page.ts | 2 +- .../databases/usage/[[period]]/+page.ts | 2 +- .../functions/[[page]]/+page.ts | 2 +- .../functions/createFunction.svelte | 2 +- .../functions/createVariable.svelte | 2 +- .../function-[function]/[[page]]/+page.svelte | 2 +- .../function-[function]/[[page]]/+page.ts | 2 +- .../function-[function]/activate.svelte | 2 +- .../function-[function]/delete.svelte | 2 +- .../function-[function]/execute.svelte | 2 +- .../executions/[[page]]/+page.svelte | 2 +- .../executions/[[page]]/+page.ts | 2 +- .../function-[function]/settings/+page.svelte | 2 +- .../functions/function-[function]/store.ts | 2 +- .../usage/[[period]]/+page.ts | 2 +- .../functions/wizard/step5.svelte | 2 +- .../functions/wizard/store.ts | 2 +- .../project-[project]/overview/+layout.svelte | 2 +- .../overview/keys/[key]/store.ts | 2 +- .../overview/keys/wizard/store.ts | 2 +- .../overview/platforms/[platform]/store.ts | 2 +- .../overview/platforms/wizard/store.ts | 2 +- .../project-[project]/overview/store.ts | 2 +- .../settings/domains/[[page]]/+page.svelte | 2 +- .../settings/domains/delete.svelte | 2 +- .../settings/domains/wizard/store.ts | 2 +- .../settings/webhooks/[webhook]/store.ts | 2 +- .../settings/webhooks/wizard/store.ts | 2 +- .../storage/[[page]]/+page.svelte | 2 +- .../storage/[[page]]/+page.ts | 2 +- .../bucket-[bucket]/[[page]]/+page.svelte | 2 +- .../storage/bucket-[bucket]/[[page]]/+page.ts | 2 +- .../storage/bucket-[bucket]/create.svelte | 2 +- .../storage/bucket-[bucket]/deleteFile.svelte | 2 +- .../bucket-[bucket]/file-[file]/store.ts | 2 +- .../bucket-[bucket]/settings/+page.svelte | 2 +- .../storage/bucket-[bucket]/store.ts | 2 +- .../bucket-[bucket]/usage/[[period]]/+page.ts | 2 +- .../project-[project]/storage/create.svelte | 2 +- .../storage/usage/[[period]]/+page.ts | 2 +- src/routes/console/project-[project]/store.ts | 2 +- src/routes/register/+page.svelte | 2 +- 124 files changed, 147 insertions(+), 160 deletions(-) diff --git a/package-lock.json b/package-lock.json index e62b412ee..059554800 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "0.0.1", "dependencies": { "@analytics/google-analytics": "^1.0.5", + "@appwrite.io/console": "^0.0.2-preview-0.0", "@appwrite.io/pink": "^0.0.4", - "@aw-labs/appwrite-console": "^13.1.0", "@popperjs/core": "^2.11.6", "@sentry/svelte": "^7.36.0", "@sentry/tracing": "^7.36.0", @@ -145,6 +145,15 @@ "resolved": "https://registry.npmjs.org/@analytics/type-utils/-/type-utils-0.6.0.tgz", "integrity": "sha512-1Yw7u/COtxx06BfwlI+kVhsa/upKYzmCNrT4c8QDeCY2KMYlnijkUjtHiPU08HxyTIVB5j6d75O0YWVIHwQS8g==" }, + "node_modules/@appwrite.io/console": { + "version": "0.0.2-preview-0.0", + "resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-0.0.2-preview-0.0.tgz", + "integrity": "sha512-to9Kvrqd1HY17fzTIODtlImsVNev3sPTETZ5BL3IhrjLJH0sh9u36gnm5MMJ9kKX8WGb3S6x8jFbZI1Fr2pXmA==", + "dependencies": { + "cross-fetch": "3.1.5", + "isomorphic-form-data": "2.0.0" + } + }, "node_modules/@appwrite.io/pink": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/@appwrite.io/pink/-/pink-0.0.4.tgz", @@ -160,15 +169,6 @@ "resolved": "https://registry.npmjs.org/@appwrite.io/pink-icons/-/pink-icons-0.0.3.tgz", "integrity": "sha512-GFOodekDck6xX7OAZuI1mo7F87ThEZ9Gt0xMsgTR79zkWcnBRq0+J89pFWRPAtFNEVMPQLVHuu6s8S4UleHwtQ==" }, - "node_modules/@aw-labs/appwrite-console": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@aw-labs/appwrite-console/-/appwrite-console-13.1.0.tgz", - "integrity": "sha512-1FyKke5b3vx+D3VfNYd3YnFhzUOlsj9bD+KTRLWA4WRItb55thFVZJMWQQ4XnZtDiLPuJAn2XjbMSfMr+9XYwg==", - "dependencies": { - "cross-fetch": "3.1.5", - "isomorphic-form-data": "2.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", diff --git a/package.json b/package.json index 5bcbe6ed6..95d3605c7 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "dependencies": { "@analytics/google-analytics": "^1.0.5", "@appwrite.io/pink": "^0.0.4", - "@aw-labs/appwrite-console": "^13.1.0", + "@appwrite.io/console": "^0.0.2-preview-0.0", "@popperjs/core": "^2.11.6", "@sentry/svelte": "^7.36.0", "@sentry/tracing": "^7.36.0", diff --git a/src/lib/actions/analytics.ts b/src/lib/actions/analytics.ts index 397e0d60d..3d9c8b63a 100644 --- a/src/lib/actions/analytics.ts +++ b/src/lib/actions/analytics.ts @@ -3,7 +3,7 @@ import googleAnalytics from '@analytics/google-analytics'; import { get } from 'svelte/store'; import { page } from '$app/stores'; import { user } from '$lib/stores/user'; -import { AppwriteException } from '@aw-labs/appwrite-console'; +import { AppwriteException } from '@appwrite.io/console'; import { ENV, MODE, VARS } from '$lib/system'; const analytics = Analytics({ diff --git a/src/lib/components/permissions/row.svelte b/src/lib/components/permissions/row.svelte index e4d369af2..28e355852 100644 --- a/src/lib/components/permissions/row.svelte +++ b/src/lib/components/permissions/row.svelte @@ -1,7 +1,7 @@ - + Password Dictionary diff --git a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte index 3461c0782..57c155ad9 100644 --- a/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte +++ b/src/routes/console/project-[project]/auth/security/updatePasswordHistory.svelte @@ -6,7 +6,7 @@ import { Button, Form, InputNumber, InputSwitch } from '$lib/elements/forms'; import FormList from '$lib/elements/forms/formList.svelte'; import { addNotification } from '$lib/stores/notifications'; - import { sdkForConsole } from '$lib/stores/sdk'; + import { sdk } from '$lib/stores/sdk'; import { project } from '../../store'; const projectId = $project.$id; @@ -16,7 +16,7 @@ async function updatePasswordHistoryLimit() { try { - await sdkForConsole.projects.updateAuthPasswordHistory( + await sdk.forConsole.projects.updateAuthPasswordHistory( projectId, passwordHistoryEnabled ? passwordHistory : 0 ); @@ -37,7 +37,7 @@ } - + Password History From de99e840ebf9bf00c539113dd8d73b8f1c23fad3 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 28 Mar 2023 14:25:57 +0545 Subject: [PATCH 18/22] Update src/lib/actions/analytics.ts --- src/lib/actions/analytics.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/actions/analytics.ts b/src/lib/actions/analytics.ts index 4ca6fbe02..04d74c94a 100644 --- a/src/lib/actions/analytics.ts +++ b/src/lib/actions/analytics.ts @@ -1,6 +1,5 @@ import { page } from '$app/stores'; import { user } from '$lib/stores/user'; -import { AppwriteException } from '@appwrite.io/console'; import { ENV, MODE, VARS } from '$lib/system'; import googleAnalytics from '@analytics/google-analytics'; import { AppwriteException } from '@appwrite.io/console'; From 2aaf15fe50eef6f01726381ed8ee9a9a5319b6b0 Mon Sep 17 00:00:00 2001 From: tglide <26071571+TGlide@users.noreply.github.com> Date: Tue, 28 Mar 2023 17:47:33 +0100 Subject: [PATCH 19/22] fix: limit sidenav transition --- src/lib/layout/navigation.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/layout/navigation.svelte b/src/lib/layout/navigation.svelte index bd2a9fbae..15790203b 100644 --- a/src/lib/layout/navigation.svelte +++ b/src/lib/layout/navigation.svelte @@ -163,7 +163,7 @@ {#if subNavigation} -
+
From 0bbb649283332e7f321b0e0a7c44b1f3928a88ee Mon Sep 17 00:00:00 2001 From: tglide <26071571+TGlide@users.noreply.github.com> Date: Tue, 28 Mar 2023 17:53:03 +0100 Subject: [PATCH 20/22] feat: keep sidenav open on mobile subnav back btn --- src/lib/layout/shell.svelte | 10 +++++----- .../collection-[collection]/subNavigation.svelte | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/layout/shell.svelte b/src/lib/layout/shell.svelte index 059b320e2..0a80b7f84 100644 --- a/src/lib/layout/shell.svelte +++ b/src/lib/layout/shell.svelte @@ -1,17 +1,17 @@