Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/privacy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-05-19 10:18:33 +0300
committerGitHub <noreply@github.com>2021-05-19 10:18:33 +0300
commitd9d1d86b3e7cdd3156d52cec233e9f8cde33f2f6 (patch)
treef268336ec6f08cd7a82d5db955fd44545318b846 /src
parent88267915f92a152cd28f81c0e4e4ba59c1ae25f9 (diff)
parent2f78db1416ad86406294a36696c421f0bc4cb1a5 (diff)
Merge pull request #623 from nextcloud/bugfix/noid/encryption-details
Diffstat (limited to 'src')
-rw-r--r--src/components/Encryption.vue67
1 files changed, 52 insertions, 15 deletions
diff --git a/src/components/Encryption.vue b/src/components/Encryption.vue
index bd80fc1..cfb045d 100644
--- a/src/components/Encryption.vue
+++ b/src/components/Encryption.vue
@@ -21,8 +21,14 @@
<template>
<div class="who-has-access">
- <!-- eslint-disable-next-line vue/no-v-html -->
- <p v-show="!isEditing" v-html="label" />
+ <div class="encryption-details">
+ <!-- eslint-disable vue/no-v-html -->
+ <p v-for="label in labels"
+ v-show="!isEditing"
+ :key="label"
+ v-html="label" />
+ <!--eslint-enable-->
+ </div>
<Actions v-if="$is_admin && !isEditing">
<ActionButton icon="icon-rename" @click.stop.prevent="openEditFullDiskEncryptionForm" />
</Actions>
@@ -66,25 +72,49 @@ export default {
return {
fullDiskEncryptionEnabled: false,
serverSideEncryptionEnabled: false,
+ homeStorageEncryptionEnabled: false,
+ masterKeyEncryptionEnabled: false,
isEditing: false,
isSavingChanges: false,
}
},
computed: {
- label() {
- if (!this.serverSideEncryptionEnabled && !this.fullDiskEncryptionEnabled) {
- return this.$t('privacy', 'Your files are not protected by encryption.')
- } else if (this.serverSideEncryptionEnabled && !this.fullDiskEncryptionEnabled) {
- return this.$t('privacy', 'Your files are encrypted with {linkopen}server-side-encryption ↗{linkclose}.')
- .replace('{linkopen}', '<a href="https://nextcloud.com/blog/encryption-in-nextcloud/" target="_blank" title="" rel="noreferrer noopener">')
- .replace('{linkclose}', '</a>')
- } else if (!this.serverSideEncryptionEnabled && this.fullDiskEncryptionEnabled) {
- return this.$t('privacy', 'This server is protected with full-disk-encryption.')
- } else {
- return this.$t('privacy', 'Your files are encrypted with {linkopen}server-side-encryption ↗{linkclose}. Additionally, this server is protected with full-disk-encryption.')
- .replace('{linkopen}', '<a href="https://nextcloud.com/blog/encryption-in-nextcloud/" target="_blank" title="" rel="noreferrer noopener">')
- .replace('{linkclose}', '</a>')
+ labels() {
+ const labels = []
+
+ const addLabel = (text) => labels.push(text
+ .replace('{linkopen}', '<a href="https://nextcloud.com/blog/encryption-in-nextcloud/" target="_blank" title="" rel="noreferrer noopener">')
+ .replace('{linkclose}', '</a>'))
+
+ if (this.serverSideEncryptionEnabled) {
+ if (this.homeStorageEncryptionEnabled) {
+ if (this.masterKeyEncryptionEnabled) {
+ addLabel(this.$t('privacy', 'Your home storage is encrypted using {linkopen}server-side-encryption ↗{linkclose} with a master key.'))
+ addLabel(this.$t('privacy', 'Your files on external storages may be encrypted using {linkopen}server-side-encryption ↗{linkclose} with a master key based on their configuration.'))
+ } else {
+ addLabel(this.$t('privacy', 'Your home storage is encrypted using {linkopen}server-side-encryption ↗{linkclose} with an individual user key.'))
+ addLabel(this.$t('privacy', 'Your files on external storages may be encrypted using {linkopen}server-side-encryption ↗{linkclose} with an invididual key based on their configuration.'))
+ }
+ } else {
+ if (this.masterKeyEncryptionEnabled) {
+ addLabel(this.$t('privacy', 'Your files on external storages may be encrypted using {linkopen}server-side-encryption ↗{linkclose} with a master key based on their configuration.'))
+ } else {
+ addLabel(this.$t('privacy', 'Your files on external storages may be encrypted using {linkopen}server-side-encryption ↗{linkclose} with an invididual key based on their configuration.'))
+ }
+ }
+ }
+
+ if (this.fullDiskEncryptionEnabled && this.serverSideEncryptionEnabled) {
+ labels.push(this.$t('privacy', 'Additionally, this server is protected with full-disk-encryption.'))
+ } else if (this.fullDiskEncryptionEnabled && !this.serverSideEncryptionEnabled) {
+ labels.push(this.$t('privacy', 'This server is protected with full-disk-encryption.'))
}
+
+ if (labels.length === 0) {
+ labels.push(this.$t('privacy', 'Your files are not protected by encryption.'))
+ }
+
+ return labels
},
},
/**
@@ -95,6 +125,8 @@ export default {
mounted() {
this.fullDiskEncryptionEnabled = loadState('privacy', 'fullDiskEncryptionEnabled')
this.serverSideEncryptionEnabled = loadState('privacy', 'serverSideEncryptionEnabled')
+ this.homeStorageEncryptionEnabled = loadState('privacy', 'homeStorageEncryptionEnabled')
+ this.masterKeyEncryptionEnabled = loadState('privacy', 'masterKeyEncryptionEnabled')
},
methods: {
/**
@@ -134,3 +166,8 @@ export default {
},
}
</script>
+<style>
+.encryption-details {
+ margin-right: 20px;
+}
+</style>