Skip to content

Commit

Permalink
chore: remove fixtures and placeholders from edit-profile
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Feb 18, 2025
1 parent ff55b80 commit fb0082a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 122 deletions.
75 changes: 1 addition & 74 deletions src/components/popups/sidebar/EditProfileAuthentication.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
FieldsetFieldDataButton as FormFieldsetFieldDataButton,
FieldsetControlActionType as FormFieldsetControlActionType,

Check warning on line 33 in src/components/popups/sidebar/EditProfileAuthentication.vue

View workflow job for this annotation

GitHub Actions / test

'FormFieldsetControlActionType' is defined but never used
FieldsetControlActionDataButton as FormFieldsetControlActionDataButton,

Check warning on line 34 in src/components/popups/sidebar/EditProfileAuthentication.vue

View workflow job for this annotation

GitHub Actions / test

'FormFieldsetControlActionDataButton' is defined but never used
FieldsetControlIconType as FormFieldsetControlIconType,
FieldsetOptionAside as FormFieldsetOptionAside
} from "@/components/form/FormSettingsEditor.vue";

Expand Down Expand Up @@ -70,80 +69,8 @@ export default {
}
],

controls: [
{
id: "recovery-email",
label: "Recovery email:",
value: "(none)", // TODO: fetch this from somewhere

actions: [
{
type: FormFieldsetControlActionType.Button,

data: {
text: "Edit",
disabled: true
} as FormFieldsetControlActionDataButton
}
]
}
],

notes: [
"Your password is what keeps your account secure. If you forget it, you can still recover it from your recovery email. Make sure to keep it up-to-date."
],

options: {
aside: FormFieldsetOptionAside.Fixed
}
},

{
id: "mfa",
title: "Multi-factor authentication",

fields: [
{
id: "token",
type: FormFieldsetFieldType.Button,
label: "Token:",

data: {
text: "Configure MFA…",
disabled: true
} as FormFieldsetFieldDataButton
}
],

controls: [
{
id: "status",
label: "Status:",
value: "Disabled",
icon: FormFieldsetControlIconType.StatusDisabled
},

{
id: "recovery-phone",
label: "Recovery phone:",
value: "(none)", // TODO: fetch this from somewhere

actions: [
{
type: FormFieldsetControlActionType.Button,

data: {
text: "Edit",
disabled: true
} as FormFieldsetControlActionDataButton
}
]
}
],

notes: [
"Multi-factor authentication adds an extra layer of security to your account, by asking for a temporary code generated by an app, upon login.",
"In the event that you are unable to generate MFA tokens, you can still use your recovery phone number to login to your account."
"Your password is what keeps your account secure. If you forget it, you can still recover it with the help of the server administrator."
],

options: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ import {
VERSION_REVISION
} from "@/broker/context";

// CONSTANTS
// TODO: import this from the JS SDK?
// TODO: from local OMEMO library version tag
const OMEMO_VERSION = "0.0.0";

export default {
name: "EditProfileEncryptionDeviceCurrent",

Expand All @@ -78,7 +73,7 @@ export default {
platform: "web",
system: VERSION_SYSTEM,
client: `${VERSION_NAME} ${VERSION_REVISION}`,
security: `OMEMO v${OMEMO_VERSION}`
security: "OMEMO"
},

details: [
Expand Down
27 changes: 3 additions & 24 deletions src/components/popups/sidebar/EditProfileEncryptionDeviceOther.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,37 +72,16 @@ export default {
] as Array<DataTableColumn>,

rows: [
// TODO: from dynamic data (those are fixtures)

{
// TODO: add actual data
/* {
selected: false,

columns: {
name: "Unknown Device #1",
device: "(none)",
hash: "1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣"
}
},

{
selected: false,

columns: {
name: "Unknown Device #2",
device: "(none)",
hash: "1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣"
}
},

{
selected: false,

columns: {
name: "Unknown Device #3",
device: "(none)",
hash: "1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣"
}
}
} */
] as Array<DataTableRow>,

sizes: { name: "40%", device: "20%", hash: "40%" } as DataTableSizes,
Expand Down
43 changes: 25 additions & 18 deletions src/components/popups/sidebar/EditProfileIdentity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { JID } from "@prose-im/prose-sdk-js";
import {
default as FormSettingsEditor,
Fieldset as FormFieldset,
FieldsetFieldAside as FormFieldsetFieldAside,
FieldsetFieldType as FormFieldsetFieldType,
FieldsetFieldAsideType as FormFieldsetFieldAsideType,
FieldsetFieldDataInput as FormFieldsetFieldDataInput,
Expand All @@ -37,6 +38,14 @@ import {
// PROJECT: POPUPS
import { FormIdentity as ProfileFormIdentity } from "@/popups/sidebar/EditProfile.vue";

// CONSTANTS
const ASIDE_NONE: FormFieldsetFieldAside = {
type: FormFieldsetFieldAsideType.Label,
color: "grey",
icon: "exclamationmark.circle.fill",
label: "None set"
};

export default {
name: "EditProfileIdentity",

Expand All @@ -54,11 +63,9 @@ export default {
}
},

data() {
return {
// --> DATA <--

fieldsets: [
computed: {
fieldsets(): Array<FormFieldset> {
return [
{
id: "full_name",
title: "Full name",
Expand All @@ -72,7 +79,9 @@ export default {
data: {
value: this.form.nameFirst,
placeholder: "Enter your first name…"
} as FormFieldsetFieldDataInput
} as FormFieldsetFieldDataInput,

aside: !this.form.nameFirst.inner ? ASIDE_NONE : undefined
},

{
Expand All @@ -83,7 +92,9 @@ export default {
data: {
value: this.form.nameLast,
placeholder: "Enter your last name…"
} as FormFieldsetFieldDataInput
} as FormFieldsetFieldDataInput,

aside: !this.form.nameLast.inner ? ASIDE_NONE : undefined
}
],

Expand Down Expand Up @@ -137,12 +148,7 @@ export default {
placeholder: "Enter your email address…"
} as FormFieldsetFieldDataInput,

aside: {
type: FormFieldsetFieldAsideType.Label,
color: "green",
icon: "checkmark.seal.fill",
label: "Verified"
}
aside: !this.form.email.inner ? ASIDE_NONE : undefined
},

{
Expand All @@ -153,21 +159,22 @@ export default {
data: {
value: this.form.phone,
placeholder: "Enter your phone number…"
} as FormFieldsetFieldDataInput
} as FormFieldsetFieldDataInput,

aside: !this.form.phone.inner ? ASIDE_NONE : undefined
}
],

notes: [
"Your email address and phone number are public. They are visible to all team members and contacts. They will not be available to other users.",
"Make sure that your email address is verified, for account security purposes."
"Your email address and phone number are public. They are visible to all team members and contacts. They will not be available to other users."
],

options: {
aside: FormFieldsetOptionAside.Fixed
}
}
] as Array<FormFieldset>
};
];
}
}
};
</script>

0 comments on commit fb0082a

Please sign in to comment.