Skip to content

Commit

Permalink
feat: populate encryption-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Nov 5, 2023
1 parent 943ce42 commit 71589c1
Showing 1 changed file with 93 additions and 12 deletions.
105 changes: 93 additions & 12 deletions src/popups/inbox/EncryptionSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ layout-popup-navigate(
template(
v-slot:content
)
settings-editor-form-fieldset(
:fieldsets="fieldsets"
)

template(
v-slot:actions
Expand All @@ -32,11 +35,101 @@ layout-popup-navigate(
********************************************************************** -->

<script lang="ts">
// PROJECT: COMPONENTS
import {
default as SettingsEditorFormFieldset,
Fieldset as FormFieldset,
FieldsetFieldType as FormFieldsetFieldType,
FieldsetFieldDataToggle as FormFieldsetFieldDataToggle
} from "@/components/popups/sidebar/SettingsEditorFormFieldset.vue";

export default {
name: "EncryptionSettings",

components: { SettingsEditorFormFieldset },

emits: ["close"],

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

fieldsets: [
{
id: "local",
title: "End-to-end encryption (on what I send)",

fields: [
{
id: "messages",
type: FormFieldsetFieldType.Toggle,
label: "Sent messages:",

data: {
value: {
inner: true // TODO: save somewhere
}
} as FormFieldsetFieldDataToggle
},

{
id: "files",
type: FormFieldsetFieldType.Toggle,
label: "Shared files:",

data: {
value: {
inner: true // TODO: save somewhere
}
} as FormFieldsetFieldDataToggle
},

{
id: "calls",
type: FormFieldsetFieldType.Toggle,
label: "Video calls:",

data: {
value: {
inner: true // TODO: save somewhere
}
} as FormFieldsetFieldDataToggle
}
],

notes: [
"End-to-end encryption is enabled by default on all private communications with all users. It is heavily recommended to leave all options enabled.",
"Using end-to-end encryption guarantees that no one other than you and the intended recipient can access the content you send (eg. messages, files and calls). Not even the server administrator.",
"If you are experiencing issues sending content to the other user, you can disable some or all encryption. Doing so will not disable encryption between this app and your server."
]
},

{
id: "remote",
title: "End-to-end encryption (on what I receive)",

fields: [
{
id: "request",
type: FormFieldsetFieldType.Toggle,
label: "Please encrypt:",

data: {
value: {
inner: true // TODO: save somewhere
}
} as FormFieldsetFieldDataToggle
}
],

notes: [
"You can ask the other party not to encrypt content they send to you, even if they support end-to-end encryption. Leave this enabled, unless you are experiencing issues eg. receiving messages."
]
}
] as Array<FormFieldset>
};
},

methods: {
// --> EVENT LISTENERS <--

Expand All @@ -46,15 +139,3 @@ export default {
}
};
</script>

<!-- **********************************************************************
STYLE
********************************************************************** -->

<style lang="scss">
$c: ".p-encryption-settings";

.p-encryption-settings {
/* TODO */
}
</style>

0 comments on commit 71589c1

Please sign in to comment.