Skip to content

Commit

Permalink
Settings v2 home, identities, MFA, sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
louischan-oursky committed Oct 7, 2024
2 parents e4d3e30 + 624ad32 commit 71f1f62
Show file tree
Hide file tree
Showing 193 changed files with 45,740 additions and 9,092 deletions.
35 changes: 19 additions & 16 deletions .make-lint-translation-keys-expect
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ resources/authgear/templates/en/web/authflowv2/__country_input.html:10:21: trans
resources/authgear/templates/en/web/authflowv2/__csrf_error_page_layout.html:28:18: template translation is forbidden: `page-content`
resources/authgear/templates/en/web/authflowv2/__dialog.html:27:14: template translation is forbidden: `dialog-attr`
resources/authgear/templates/en/web/authflowv2/__direct_access_disable_page_frame.html:7:16: template translation is forbidden: `page-content`
resources/authgear/templates/en/web/authflowv2/__error.html:134:18: template translation is forbidden: `authflowv2/__error_account`
resources/authgear/templates/en/web/authflowv2/__error.html:166:20: template translation is forbidden: `authflowv2/__error_account`
resources/authgear/templates/en/web/authflowv2/__error.html:135:18: template translation is forbidden: `authflowv2/__error_account`
resources/authgear/templates/en/web/authflowv2/__error.html:170:20: template translation is forbidden: `authflowv2/__error_account`
resources/authgear/templates/en/web/authflowv2/__locale_input.html:6:16: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/__locale_input.html:10:21: translation key not defined: "%s %s"
resources/authgear/templates/en/web/authflowv2/__new_password_field.html:53:33: translation key not defined: "%s %s"
resources/authgear/templates/en/web/authflowv2/__new_password_field.html:77:38: translation key not defined: "%s %s"
resources/authgear/templates/en/web/authflowv2/__new_password_field.html:54:33: translation key not defined: "%s %s"
resources/authgear/templates/en/web/authflowv2/__new_password_field.html:79:38: translation key not defined: "%s %s"
resources/authgear/templates/en/web/authflowv2/__page_frame.html:12:18: template translation is forbidden: `page-content`
resources/authgear/templates/en/web/authflowv2/__password_field.html:21:20: translation key not defined: "%s %s"
resources/authgear/templates/en/web/authflowv2/__password_input.html:31:31: template translation is forbidden: `v2.component.password-input.default.placeholder-password`
resources/authgear/templates/en/web/authflowv2/__password_input.html:33:31: template translation is forbidden: `v2.component.password-input.default.placeholder-new-password`
resources/authgear/templates/en/web/authflowv2/__password_input.html:35:31: template translation is forbidden: `v2.component.password-input.default.placeholder-confirm-password`
resources/authgear/templates/en/web/authflowv2/__settings_page_frame.html:17:15: template translation is forbidden: `page-navbar`
resources/authgear/templates/en/web/authflowv2/__settings_page_frame.html:19:18: template translation is forbidden: `page-content`
resources/authgear/templates/en/web/authflowv2/__settings_radio.html:16:16: translation key not defined: "radio-%s-%s"
Expand All @@ -26,18 +29,18 @@ resources/authgear/templates/en/web/authflowv2/forgot_password.html:159:26: temp
resources/authgear/templates/en/web/authflowv2/layout.html:5:14: template translation is forbidden: `widget`
resources/authgear/templates/en/web/authflowv2/login.html:252:37: translation key not defined: "%s-icon"
resources/authgear/templates/en/web/authflowv2/settings_layout.html:3:14: template translation is forbidden: `widget`
resources/authgear/templates/en/web/authflowv2/settings_profile.html:29:18: template translation is forbidden: `__settings_profile_item`
resources/authgear/templates/en/web/authflowv2/settings_profile.html:51:18: template translation is forbidden: `__settings_profile_item`
resources/authgear/templates/en/web/authflowv2/settings_profile.html:68:22: translation key not defined: "__settings_profile_date_item"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:70:18: template translation is forbidden: `__settings_profile_item`
resources/authgear/templates/en/web/authflowv2/settings_profile.html:87:22: translation key not defined: "__settings_profile_address_item"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:89:18: template translation is forbidden: `__settings_profile_item`
resources/authgear/templates/en/web/authflowv2/settings_profile.html:107:18: template translation is forbidden: `__settings_profile_item`
resources/authgear/templates/en/web/authflowv2/settings_profile.html:123:23: translation key not defined: "__settings_profile_locale_item"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:125:18: template translation is forbidden: `__settings_profile_item`
resources/authgear/templates/en/web/authflowv2/settings_profile.html:174:22: invalid translation key: "$label"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_gender.html:57:33: translation key not defined: "__settings_gender_edit_custom_gender_input"
resources/authgear/templates/en/web/authflowv2/settings_oob_otp.html:39:31: translation key not defined: "/settings/mfa/new_oob_otp_%s"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:139:22: translation key not defined: "custom-attribute-label-%s"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:140:20: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:144:21: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:196:22: invalid translation key: "$label"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:6:18: translation key not defined: "custom-attribute-label-%s"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:7:16: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:11:17: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:91:30: translation key not defined: "custom-attribute-enum-label-%s-%s"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:92:28: invalid translation key: "$enum_label_key"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:95:28: invalid translation key: "$enum_label_key"
resources/authgear/templates/en/web/authflowv2/signup.html:91:26: translation key not defined: "v2.page.signup.continue.subtitle-%v"
resources/authgear/templates/en/web/authflowv2/signup.html:264:35: translation key not defined: "%s-icon"
41 errors found
44 errors found
exit status 1
3 changes: 3 additions & 0 deletions authui/src/authflowv2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { DialogController } from "./authflowv2/dialog";
import { BotProtectionStandalonePageController } from "./authflowv2/botprotection/botProtectionStandalonePage";
import { ImagePickerController } from "./imagepicker";
import { SelectInputController } from "./authflowv2/selectInput";
import { AccountDeletionController } from "./accountdeletion";

axios.defaults.withCredentials = true;

Expand Down Expand Up @@ -134,4 +135,6 @@ Stimulus.register("bot-protection", BotProtectionController);
Stimulus.register("bot-protection-dialog", BotProtectionDialogController);
Stimulus.register("select-input", SelectInputController);

Stimulus.register("account-deletion", AccountDeletionController);

injectCSSAttrs(document.documentElement);
4 changes: 4 additions & 0 deletions authui/src/authflowv2/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
/* --color-primary-theme-lighter: #d8e6fd; */
/* --color-primary-theme-lighter-alt: #f5f9fe; */

/* destructive */
--color-destructive-primary: #ff295b;
--color-destructive-dark: #c4003d;

/* Neutral colors is tonal palette */
/* https://m3.material.io/styles/color/system/how-the-system-works#395813c8-b314-48d1-bb55-266f421eb3a4 */
/* neutral */
Expand Down
5 changes: 5 additions & 0 deletions authui/src/authflowv2/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
@import "./components/dialog.css";
@import "./components/watermark.css";
@import "./components/settings-content.css";
@import "./components/settings-headline.css";
@import "./components/settings-title.css";
@import "./components/settings-description.css";
@import "./components/settings-item.css";
Expand All @@ -41,3 +42,7 @@
@import "./components/settings-user-profile-pic.css";
@import "./components/select-input.css";
@import "./components/direct-access-layout.css";
@import "./components/settings-link-button.css";
@import "./components/settings-text-color.css";
@import "./components/settings-action-item.css";
@import "./components/settings-dialog.css";
2 changes: 1 addition & 1 deletion authui/src/authflowv2/components/body-text.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
--body-text__letter-spacing--sm: var(
--typography-body-small__letter-spacing
);
--body-text__font-weight--sm: var(--typography-body-medium__font-weight);
--body-text__font-weight--sm: var(--typography-body-small__font-weight);

/* sm link */
--body-text__font-family--link-sm: var(
Expand Down
7 changes: 7 additions & 0 deletions authui/src/authflowv2/components/primary-button.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,11 @@
.primary-btn--success {
background-color: var(--color-success);
}

.primary-btn--destructive {
@apply primary-btn;
--primary-btn__bg-color: var(--color-destructive-primary);
--primary-btn__bg-color--hover: var(--color-destructive-dark);
--primary-btn__bg-color--active: var(--color-destructive-dark);
}
}
115 changes: 115 additions & 0 deletions authui/src/authflowv2/components/settings-action-item.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
@layer components {
:root {
--settings-action-item__description-color: var(--body-text__text-color);
--settings-action-item__description-font-family: var(
--body-text__font-family--md
);
--settings-action-item__description-font-size: var(
--body-text__font-size--md
);
--settings-action-item__description-line-height: var(
--body-text__line-height--md
);
--settings-action-item__description-letter-spacing: var(
--body-text__letter-spacing--md
);
--settings-action-item__description-font-weight: var(
--body-text__font-weight--md
);

--settings-action-item__icon-color--pale: var(--color-neutral-200);
}

.settings-action-item__container {
@apply flex;
--settings-action-item-padding-x: 0.5rem;
--settings-action-item-padding-y: 1rem;
color: var(--settings-item__text-color);
border-color: var(--settings-item__border-color);
border-bottom-width: 1px;
border-style: solid;

--icon-placeholder-display: none;
--icon-size: 1.5rem;
&.settings-action-item__container-with-icon {
--icon-placeholder-display: block;
}
}

.settings-action-item__container {
&.settings-action-item__container-with-extra-content {
.settings-action-item__content-container {
@apply pb-2;
}
}
}

.settings-action-item__content-container {
@apply block;
@apply px-[var(--settings-action-item-padding-x)];
@apply py-[var(--settings-action-item-padding-y)];
}

.settings-action-item__label-container {
@apply flex gap-x-2;
}

.settings-action-item__description-container {
@apply text-start;
@apply flex gap-x-2 items-center justify-start;
@apply mt-1;
&::before {
content: "";
width: var(--icon-size);
display: var(--icon-placeholder-display);
}

color: var(--settings-action-item__description-color);
font-family: var(--settings-action-item__description-font-family);
font-size: var(--settings-action-item__description-font-size);
line-height: var(--settings-action-item__description-line-height);
letter-spacing: var(--settings-action-item__description-letter-spacing);
font-weight: var(--settings-action-item__description-font-weight);
}

.settings-action-item__extra-content-container {
@apply flex gap-x-2 items-center;
@apply px-[var(--settings-action-item-padding-x)];
@apply pb-[var(--settings-action-item-padding-y)];
&::before {
content: "";
width: var(--icon-size);
display: var(--icon-placeholder-display);
}
}

.settings-action-item__icon {
@apply settings-item-icon;
}

.settings-action-item__action-button-container {
@apply py-[var(--settings-action-item-padding-y)];
}

.settings-action-item__arrow-container {
@apply flex flex-none items-center;
@apply py-[var(--settings-action-item-padding-y)];
}

.settings-action-item__label {
@apply settings-item__label;
@apply break-all;
}

.settings-action-item__icon--pale {
@apply settings-item-icon;
line-height: normal;
color: var(--settings-action-item__icon-color--pale);
}

.settings-action-item__icon--pale {
@apply settings-item-icon;
line-height: normal;
color: var(--settings-action-item__icon-color--pale);
}
}
7 changes: 7 additions & 0 deletions authui/src/authflowv2/components/settings-description.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
--typography-title-medium__font-weight
);
--settings-description__text-color: var(--color-neutral-400);

--settings-description__text-color--primary: var(--color-link);
}
:root.dark {
--settings-description__text-color: var(--color-neutral-200);
Expand All @@ -27,4 +29,9 @@
font-weight: var(--settings-description__font-weight);
color: var(--settings-description__text-color);
}

.settings-description--primary-color {
@apply settings-description;
color: var(--settings-description__text-color--primary);
}
}
15 changes: 15 additions & 0 deletions authui/src/authflowv2/components/settings-dialog.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@layer components {
:root {
--settings-dialog__description-text--highlight-color: var(
--color-neutral-700
);
}

.settings-dialog {
@apply p-8 tablet:p-10;
}

.settings-dialog__description-text--highlight {
color: var(--settings-dialog__description-text--highlight-color);
}
}
30 changes: 30 additions & 0 deletions authui/src/authflowv2/components/settings-headline.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@layer components {
:root {
--settings-headlien__font-family: var(
--typography-headline-small__font-family
);
--settings-headline__font-size: var(--typography-headline-small__font-size);
--settings-headline__line-height: var(
--typography-headline-small__line-height
);
--settings-headline__letter-spacing: var(
--typography-headline-small__letter-spacing
);
--settings-headline__font-weight: var(
--typography-headline-small__font-weight
);
--settings-headline__text-color: var(--color-neutral-700);
}
:root.dark {
--settings-headline__text-color: var(--color-neutral-100);
}

.settings-headline {
font-family: var(--settings-headline__font-family);
font-size: var(--settings-headline__font-size);
line-height: var(--settings-headline__line-height);
letter-spacing: var(--settings-headline__letter-spacing);
font-weight: var(--settings-headline__font-weight);
color: var(--settings-headline__text-color);
}
}
40 changes: 34 additions & 6 deletions authui/src/authflowv2/components/settings-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@
--settings-item__ring-width--active: var(--settings-item__ring-width);
--settings-item__ring-color--active: var(--settings-item__ring-color);

--settings-item__note-font-family: var(
--typography-body-medium__font-family
);
--settings-item__note-font-size: var(--typography-body-medium__font-size);
--settings-item__note-line-height: var(
--typography-body-medium__line-height
);
--settings-item__note-letter-spacing: var(
--typography-body-medium__letter-spacing
);
--settings-item__note-font-weight: var(
--typography-body-medium__font-weight
);

--settings-item__forward-arrow-font-size: 1.125rem;

--settings-item__forward-arrow-color: var(--color-neutral-200);
Expand All @@ -44,8 +58,7 @@
}

.settings-item {
@apply grid;
@apply gap-x-2;
@apply grid gap-x-2 gap-y-1;
@apply items-center text-start;

background-color: var(--settings-item__bg-color);
Expand Down Expand Up @@ -79,6 +92,13 @@
grid-template-columns: var(--settings-item__grid-col-icon-width) auto 1.125rem;
}

&.with-note {
grid-template-areas:
"icon title arrow"
". note arrow";
grid-template-columns: var(--settings-item__grid-col-icon-width) auto 1.125rem;
}

&:hover {
background-color: var(--settings-item__bg-color--hover);
color: var(--settings-item__text-color--hover);
Expand All @@ -96,19 +116,27 @@
}
}

.settings-item > .settings-item_icon-container {
.settings-item_icon-container {
grid-area: icon;
@apply flex items-center;
}
.settings-item > .settings-item__label {
.settings-item__label {
grid-area: title;
}
.settings-item > .settings-item__description {
.settings-item__content {
grid-area: content;
}
.settings-item > .settings-item__forward_arrow {
.settings-item__forward_arrow {
grid-area: arrow;
}
.settings-item__note {
grid-area: note;
font-family: var(--settings-item__note-font-family);
font-size: var(--settings-item__note-font-size);
line-height: var(--settings-item__note-line-height);
letter-spacing: var(--settings-item__note-letter-spacing);
font-weight: var(--settings-item__note-font-weight);
}
}

.settings-item__label {
Expand Down
Loading

0 comments on commit 71f1f62

Please sign in to comment.