Skip to content

Commit 5dfd208

Browse files
add translations, back button and styles for link and email permission views
1 parent b967a85 commit 5dfd208

6 files changed

Lines changed: 188 additions & 65 deletions

File tree

l10n/de.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"Read and write": "Kann bearbeiten",
1414
"File drop (upload only)": "Sammelbox",
1515
"With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.": "Bei der Sammelbox ist nur das Hochladen erlaubt. Nur Sie sehen Dateien und Ordner die hochgeladen worden sind.",
16-
"Advanced": "Erweiterte",
17-
"Set password": "Passwortschutz",
16+
"Advanced settings": "Erweiterte Einstellungen",
17+
"Set password": "Passwort setzen",
1818
"Your shares": "Ihre Freigaben",
1919
"Manage access": "Zugriff verwalten",
2020
"Here you can see who has access to your file/folder.": "Hier sehen Sie wer Zugriff auf Ihre Datei/Ihren Ordner hat.",
@@ -27,6 +27,9 @@
2727
"Link to \"{fileName}\" was sent.": "Link zu \"{fileName}\" gesendet.",
2828
"To": "An",
2929
"Links to Copy": "Links zum Kopieren",
30+
"Anyone with the link can": "Jeder mit dem Link kann",
31+
"only view": "nur anzeigen",
32+
"edit": "bearbeiten",
3033
"Anyone with the link can edit": "Jeder mit dem Link kann bearbeiten",
3134
"Anyone with the link can only view": "Jeder mit dem Link kann nur anzeigen",
3235
"Anyone with the link can file drop": "Jeder mit dem Link kann Dateien hinzufügen",
@@ -39,7 +42,8 @@
3942
"Resharing is allowed": "Weiterteilen ist erlaubt",
4043
"You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.": "Sie können Links erstellen oder Freigaben per Mail versenden. Wenn Sie MagentaCLOUD Nutzer einladen, bieten sich Ihnen mehr Möglichkeiten der Zusammenarbeit.",
4144
"Share updated": "Freigabe aktualisiert",
42-
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "Diese Freigabe ist auf {limit} Downloads beschränkt. Es sind noch {downloadsLeft} Downloads zugelassen."
45+
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "Diese Freigabe ist auf {limit} Downloads beschränkt. Es sind noch {downloadsLeft} Downloads zugelassen.",
46+
"Deny download": "Download verhindern"
4347
},
4448
"pluralForm": "nplurals=2; plural=(n != 1);"
4549
}

l10n/de_DE.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"Read and write": "Kann bearbeiten",
1414
"File drop (upload only)": "Sammelbox",
1515
"With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.": "Bei der Sammelbox ist nur das Hochladen erlaubt. Nur Sie sehen Dateien und Ordner die hochgeladen worden sind.",
16-
"Advanced": "Erweiterte",
17-
"Set password": "Passwortschutz",
16+
"Advanced settings": "Erweiterte Einstellungen",
17+
"Set password": "Passwort setzen",
1818
"Your shares": "Ihre Freigaben",
1919
"Manage access": "Zugriff verwalten",
2020
"Here you can see who has access to your file/folder.": "Hier sehen Sie wer Zugriff auf Ihre Datei/Ihren Ordner hat.",
@@ -27,6 +27,9 @@
2727
"Link to \"{fileName}\" was sent.": "Link zu \"{fileName}\" gesendet.",
2828
"To": "An",
2929
"Links to Copy": "Links zum Kopieren",
30+
"Anyone with the link can": "Jeder mit dem Link kann",
31+
"only view": "nur anzeigen",
32+
"edit": "bearbeiten",
3033
"Anyone with the link can edit": "Jeder mit dem Link kann bearbeiten",
3134
"Anyone with the link can only view": "Jeder mit dem Link kann nur anzeigen",
3235
"Anyone with the link can file drop": "Jeder mit dem Link kann Dateien hinzufügen",
@@ -39,7 +42,8 @@
3942
"Resharing is allowed": "Weiterteilen ist erlaubt",
4043
"You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.": "Sie können Links erstellen oder Freigaben per Mail versenden. Wenn Sie MagentaCLOUD Nutzer einladen, bieten sich Ihnen mehr Möglichkeiten der Zusammenarbeit.",
4144
"Share updated": "Freigabe aktualisiert",
42-
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "Diese Freigabe ist auf {limit} Downloads beschränkt. Es sind noch {downloadsLeft} Downloads zugelassen."
45+
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "Diese Freigabe ist auf {limit} Downloads beschränkt. Es sind noch {downloadsLeft} Downloads zugelassen.",
46+
"Deny download": "Download verhindern"
4347
},
4448
"pluralForm": "nplurals=2; plural=(n != 1);"
4549
}

l10n/en.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"Read and write": "Read and write",
1414
"File drop (upload only)": "File drop (upload only)",
1515
"With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.": "With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.",
16-
"Advanced": "Advanced",
17-
"Set password": "Set password",
16+
"Advanced settings": "Advanced settings",
17+
"Set password": "Passwort setzen",
1818
"Your shares": "Your shares",
1919
"Manage access": "Manage Access",
2020
"Here you can see who has access to your file/folder.": "Here you can see who has access to your file/folder.",
@@ -27,6 +27,9 @@
2727
"Link to \"{fileName}\" was sent.": "Link to \"{fileName}\" was sent.",
2828
"To": "To",
2929
"Links to Copy": "Links to Copy",
30+
"Anyone with the link can": "Anyone with the link can",
31+
"only view": "only view",
32+
"edit": "edit",
3033
"Anyone with the link can edit": "Anyone with the link can edit",
3134
"Anyone with the link can only view": "Anyone with the link can only view",
3235
"Anyone with the link can file drop": "Anyone with the link can file drop",
@@ -39,7 +42,8 @@
3942
"Resharing is allowed": "Resharing is allowed",
4043
"You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.": "You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.",
4144
"Share updated": "Share updated",
42-
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed."
45+
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.",
46+
"Deny download": "Deny download"
4347
},
4448
"pluralForm": "nplurals=2; plural=(n != 1);"
4549
}

l10n/en_GB.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"Read and write": "Read and write",
1414
"File drop (upload only)": "File drop (upload only)",
1515
"With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.": "With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.",
16-
"Advanced": "Advanced",
17-
"Set password": "Set password",
16+
"Advanced settings": "Advanced settings",
17+
"Set password": "Passwort setzen",
1818
"Your shares": "Your shares",
1919
"Manage access": "Manage Access",
2020
"Here you can see who has access to your file/folder.": "Here you can see who has access to your file/folder.",
@@ -27,6 +27,9 @@
2727
"Link to \"{fileName}\" was sent.": "Link to \"{fileName}\" was sent.",
2828
"To": "To",
2929
"Links to Copy": "Links to Copy",
30+
"Anyone with the link can": "Anyone with the link can",
31+
"only view": "only view",
32+
"edit": "edit",
3033
"Anyone with the link can edit": "Anyone with the link can edit",
3134
"Anyone with the link can only view": "Anyone with the link can only view",
3235
"Anyone with the link can file drop": "Anyone with the link can file drop",
@@ -39,7 +42,8 @@
3942
"Resharing is allowed": "Resharing is allowed",
4043
"You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.": "You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.",
4144
"Share updated": "Share updated",
42-
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed."
45+
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.",
46+
"Deny download": "Deny download"
4347
},
4448
"pluralForm": "nplurals=2; plural=(n != 1);"
4549
}

src/views/SharingDetailsTab.vue

Lines changed: 82 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,49 @@
11
<template>
22
<div class="sharingTabDetailsView">
3-
<h2 class="sharingTabDetailsView__header" style="margin-bottom: 0;">
4-
{{ t('nmcsharing', 'Permissions') }}
5-
</h2>
3+
<span class="header-permissions">
4+
<ChevronLeftIcon :size="24" class="back-button" @click="$emit('close-sharing-details')" />
5+
6+
<h2 class="sharingTabDetailsView__header" style="margin-bottom: 0;">
7+
{{ t('nmcsharing', 'Permissions') }}
8+
</h2>
9+
</span>
610

711
<span class="sharingPopup__fileinfo">{{ fileInfo.name }} ⸱ {{ size }}</span>
812

913
<div class="sharingTabDetailsView__quick-permissions">
1014
<div>
11-
<NcCheckboxRadioSwitch :checked.sync="sharingPermission"
12-
:disabled="!isPermissionEditAllowed"
13-
:value="bundledPermissions.READ_ONLY.toString()"
14-
name="sharing_permission_radio"
15-
type="radio"
16-
@update:checked="toggleCustomPermissions">
17-
{{ t('nmcsharing', 'Read only') }}
18-
</NcCheckboxRadioSwitch>
19-
<NcCheckboxRadioSwitch :checked.sync="sharingPermission"
20-
:disabled="!isPermissionEditAllowed"
21-
:value="isFolder ? bundledPermissions.ALL.toString() : bundledPermissions.ALL_FILE.toString()"
22-
name="sharing_permission_radio"
23-
type="radio"
24-
@update:checked="toggleCustomPermissions">
25-
{{ isFolder ? t('nmcsharing', 'Read, write and upload') : t('nmcsharing', 'Read and write') }}
26-
</NcCheckboxRadioSwitch>
15+
<span class="checkbox-text">
16+
<NcCheckboxRadioSwitch :checked.sync="sharingPermission"
17+
:disabled="!isPermissionEditAllowed"
18+
:value="bundledPermissions.READ_ONLY.toString()"
19+
class="checkbox-switch"
20+
name="sharing_permission_radio"
21+
type="radio"
22+
@update:checked="toggleCustomPermissions">
23+
{{ t('nmcsharing', 'Anyone with the link can') }}
24+
{{t('nmcsharing', ' ')}}
25+
<strong>
26+
{{ t('nmcsharing', 'only view') }}
27+
</strong>
28+
</NcCheckboxRadioSwitch>
29+
<EyeIcon :size="16" />
30+
</span>
31+
<span class="checkbox-text">
32+
<NcCheckboxRadioSwitch :checked.sync="sharingPermission"
33+
:disabled="!isPermissionEditAllowed"
34+
:value="isFolder ? bundledPermissions.ALL.toString() : bundledPermissions.ALL_FILE.toString()"
35+
class="checkbox-switch"
36+
name="sharing_permission_radio"
37+
type="radio"
38+
@update:checked="toggleCustomPermissions">
39+
{{ t('nmcsharing', 'Anyone with the link can') }}
40+
{{ t('nmcsharing', ' ') }}
41+
<strong>
42+
{{ t('nmcsharing', 'edit') }}
43+
</strong>
44+
</NcCheckboxRadioSwitch>
45+
<PencilIcon :size="16" />
46+
</span>
2747
<NcCheckboxRadioSwitch v-if="allowsFileDrop"
2848
:checked.sync="sharingPermission"
2949
:value="bundledPermissions.FILE_DROP.toString()"
@@ -38,20 +58,15 @@
3858
</div>
3959
</div>
4060
<div class="sharingTabDetailsView__advanced-control">
41-
<button id="btn-advanced"
42-
type="button"
43-
:class="{ open: advancedSectionAccordionExpanded }"
44-
@click="advancedSectionAccordionExpanded = !advancedSectionAccordionExpanded">
45-
{{ t('nmcsharing', 'Advanced') }}
46-
</button>
61+
<strong>{{ t('nmcsharing', 'Advanced settings') }}</strong>
4762
</div>
4863
<div v-if="advancedSectionAccordionExpanded" class="sharingTabDetailsView__advanced">
4964
<section>
5065
<NcCheckboxRadioSwitch v-if="isPublicShare"
5166
:disabled="canChangeHideDownload"
5267
:checked.sync="share.hideDownload"
5368
@update:checked="queueUpdate('hideDownload')">
54-
{{ t('files_sharing', 'Hide download') }}
69+
{{ t('nmcsharing', 'Deny download') }}
5570
</NcCheckboxRadioSwitch>
5671
<template v-if="isPublicShare">
5772
<NcCheckboxRadioSwitch :checked.sync="isPasswordProtected" :disabled="isPasswordEnforced">
@@ -117,6 +132,10 @@
117132
</template>
118133

119134
<script>
135+
import EyeIcon from 'vue-material-design-icons/EyeCircleOutline.vue'
136+
import PencilIcon from 'vue-material-design-icons/Pencil.vue'
137+
import ChevronLeftIcon from 'vue-material-design-icons/ChevronLeftCircleOutline.vue'
138+
120139
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
121140
import NcInputField from '@nextcloud/vue/dist/Components/NcInputField.js'
122141
import NcDateTimePickerNative from '@nextcloud/vue/dist/Components/NcDateTimePickerNative.js'
@@ -143,6 +162,9 @@ import DownloadLimit from '../components/DownloadLimit.vue'
143162
export default {
144163
name: 'SharingDetailsTab',
145164
components: {
165+
EyeIcon,
166+
PencilIcon,
167+
ChevronLeftIcon,
146168
NcButton,
147169
NcInputField,
148170
NcDateTimePickerNative,
@@ -256,7 +278,7 @@ export default {
256278
},
257279
},
258280
/**
259-
* Can the sharee download files or only view them ?
281+
* Can the share download files or only view them ?
260282
*/
261283
canDownload: {
262284
get() {
@@ -769,11 +791,44 @@ export default {
769791
</script>
770792

771793
<style lang="scss">
794+
.header-permissions {
795+
margin-top: -14px;
796+
display: flex;
797+
flex-direction: row;
798+
align-items: center;
799+
800+
.back-button {
801+
padding: 4px;
802+
803+
&:hover {
804+
color: var(--telekom-color-primary-hovered);
805+
background-color: initial;
806+
cursor: pointer;
807+
}
808+
}
809+
810+
}
811+
812+
.checkbox-text {
813+
display: flex;
814+
flex-direction: row;
815+
align-items: center;
816+
817+
.checkbox-switch {
818+
margin-right: -8px;
819+
}
820+
}
821+
772822
.sharingTabDetailsView {
773823
display: flex;
774824
flex-direction: column;
775825
align-items: flex-start;
776826
padding: 1rem;
827+
padding-top: 0;
828+
829+
.sharingPopup__fileinfo {
830+
color: var(--telekom-color-ui-regular);
831+
}
777832
778833
&__header {
779834
font-weight: bold;

0 commit comments

Comments
 (0)