Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/nmc-app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ on:
- stable26
- stable27
- stable28
- stable29
- nmc/optimized-sharing
increment:
description: 'Release increment'
required: true
Expand Down
10 changes: 7 additions & 3 deletions l10n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"Read and write": "Kann bearbeiten",
"File drop (upload only)": "Sammelbox",
"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.",
"Advanced": "Erweiterte",
"Set password": "Passwortschutz",
"Advanced settings": "Erweiterte Einstellungen",
"Set password": "Passwort setzen",
"Your shares": "Ihre Freigaben",
"Manage access": "Zugriff verwalten",
"Here you can see who has access to your file/folder.": "Hier sehen Sie wer Zugriff auf Ihre Datei/Ihren Ordner hat.",
Expand All @@ -27,6 +27,9 @@
"Link to \"{fileName}\" was sent.": "Link zu \"{fileName}\" gesendet.",
"To": "An",
"Links to Copy": "Links zum Kopieren",
"Anyone with the link can": "Jeder mit dem Link kann",
"only view": "nur anzeigen",
"edit": "bearbeiten",
"Anyone with the link can edit": "Jeder mit dem Link kann bearbeiten",
"Anyone with the link can only view": "Jeder mit dem Link kann nur anzeigen",
"Anyone with the link can file drop": "Jeder mit dem Link kann Dateien hinzufügen",
Expand All @@ -39,7 +42,8 @@
"Resharing is allowed": "Weiterteilen ist erlaubt",
"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.",
"Share updated": "Freigabe aktualisiert",
"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."
"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.",
"Deny download": "Download verhindern"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
10 changes: 7 additions & 3 deletions l10n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"Read and write": "Kann bearbeiten",
"File drop (upload only)": "Sammelbox",
"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.",
"Advanced": "Erweiterte",
"Set password": "Passwortschutz",
"Advanced settings": "Erweiterte Einstellungen",
"Set password": "Passwort setzen",
"Your shares": "Ihre Freigaben",
"Manage access": "Zugriff verwalten",
"Here you can see who has access to your file/folder.": "Hier sehen Sie wer Zugriff auf Ihre Datei/Ihren Ordner hat.",
Expand All @@ -27,6 +27,9 @@
"Link to \"{fileName}\" was sent.": "Link zu \"{fileName}\" gesendet.",
"To": "An",
"Links to Copy": "Links zum Kopieren",
"Anyone with the link can": "Jeder mit dem Link kann",
"only view": "nur anzeigen",
"edit": "bearbeiten",
"Anyone with the link can edit": "Jeder mit dem Link kann bearbeiten",
"Anyone with the link can only view": "Jeder mit dem Link kann nur anzeigen",
"Anyone with the link can file drop": "Jeder mit dem Link kann Dateien hinzufügen",
Expand All @@ -39,7 +42,8 @@
"Resharing is allowed": "Weiterteilen ist erlaubt",
"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.",
"Share updated": "Freigabe aktualisiert",
"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."
"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.",
"Deny download": "Download verhindern"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
10 changes: 7 additions & 3 deletions l10n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"Read and write": "Read and write",
"File drop (upload only)": "File drop (upload only)",
"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.",
"Advanced": "Advanced",
"Set password": "Set password",
"Advanced settings": "Advanced settings",
"Set password": "Passwort setzen",
"Your shares": "Your shares",
"Manage access": "Manage Access",
"Here you can see who has access to your file/folder.": "Here you can see who has access to your file/folder.",
Expand All @@ -27,6 +27,9 @@
"Link to \"{fileName}\" was sent.": "Link to \"{fileName}\" was sent.",
"To": "To",
"Links to Copy": "Links to Copy",
"Anyone with the link can": "Anyone with the link can",
"only view": "only view",
"edit": "edit",
"Anyone with the link can edit": "Anyone with the link can edit",
"Anyone with the link can only view": "Anyone with the link can only view",
"Anyone with the link can file drop": "Anyone with the link can file drop",
Expand All @@ -39,7 +42,8 @@
"Resharing is allowed": "Resharing is allowed",
"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.",
"Share updated": "Share updated",
"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."
"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.",
"Deny download": "Deny download"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
10 changes: 7 additions & 3 deletions l10n/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"Read and write": "Read and write",
"File drop (upload only)": "File drop (upload only)",
"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.",
"Advanced": "Advanced",
"Set password": "Set password",
"Advanced settings": "Advanced settings",
"Set password": "Passwort setzen",
"Your shares": "Your shares",
"Manage access": "Manage Access",
"Here you can see who has access to your file/folder.": "Here you can see who has access to your file/folder.",
Expand All @@ -27,6 +27,9 @@
"Link to \"{fileName}\" was sent.": "Link to \"{fileName}\" was sent.",
"To": "To",
"Links to Copy": "Links to Copy",
"Anyone with the link can": "Anyone with the link can",
"only view": "only view",
"edit": "edit",
"Anyone with the link can edit": "Anyone with the link can edit",
"Anyone with the link can only view": "Anyone with the link can only view",
"Anyone with the link can file drop": "Anyone with the link can file drop",
Expand All @@ -39,7 +42,8 @@
"Resharing is allowed": "Resharing is allowed",
"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.",
"Share updated": "Share updated",
"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."
"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.",
"Deny download": "Deny download"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
3 changes: 2 additions & 1 deletion src/components/SharingInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div v-if="canReshare" class="sharing-search">
<SharingInputDetailsLink :file-info="fileInfo"
:disabled="!isValidValue"
:share.sync="newShare"

Check warning on line 27 in src/components/SharingInput.vue

View workflow job for this annotation

GitHub Actions / eslint

Unexpected mutation of "newShare" prop
@open-sharing-details-all="openDetails" />
<NcSelect ref="select"
v-model="value"
Expand All @@ -43,7 +43,8 @@
</template>
</NcSelect>
<div class="button-group">
<NcButton type="primary" class="button-send"
<NcButton type="primary"
class="button-send"
:disabled="!isValidValue"
@click="sendSharing">
{{ t('nmcsharing', 'Send') }}
Expand Down
109 changes: 82 additions & 27 deletions src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
@@ -1,29 +1,49 @@
<template>
<div class="sharingTabDetailsView">
<h2 class="sharingTabDetailsView__header" style="margin-bottom: 0;">
{{ t('nmcsharing', 'Permissions') }}
</h2>
<span class="header-permissions">
<ChevronLeftIcon :size="24" class="back-button" @click="$emit('close-sharing-details')" />

<h2 class="sharingTabDetailsView__header" style="margin-bottom: 0;">
{{ t('nmcsharing', 'Permissions') }}
</h2>
</span>

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

<div class="sharingTabDetailsView__quick-permissions">
<div>
<NcCheckboxRadioSwitch :checked.sync="sharingPermission"
:disabled="!isPermissionEditAllowed"
:value="bundledPermissions.READ_ONLY.toString()"
name="sharing_permission_radio"
type="radio"
@update:checked="toggleCustomPermissions">
{{ t('nmcsharing', 'Read only') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch :checked.sync="sharingPermission"
:disabled="!isPermissionEditAllowed"
:value="isFolder ? bundledPermissions.ALL.toString() : bundledPermissions.ALL_FILE.toString()"
name="sharing_permission_radio"
type="radio"
@update:checked="toggleCustomPermissions">
{{ isFolder ? t('nmcsharing', 'Read, write and upload') : t('nmcsharing', 'Read and write') }}
</NcCheckboxRadioSwitch>
<span class="checkbox-text">
<NcCheckboxRadioSwitch :checked.sync="sharingPermission"
:disabled="!isPermissionEditAllowed"
:value="bundledPermissions.READ_ONLY.toString()"
class="checkbox-switch"
name="sharing_permission_radio"
type="radio"
@update:checked="toggleCustomPermissions">
{{ t('nmcsharing', 'Anyone with the link can') }}
{{ t('nmcsharing', ' ') }}
<strong>
{{ t('nmcsharing', 'only view') }}
</strong>
</NcCheckboxRadioSwitch>
<EyeIcon :size="16" />
</span>
<span class="checkbox-text">
<NcCheckboxRadioSwitch :checked.sync="sharingPermission"
:disabled="!isPermissionEditAllowed"
:value="isFolder ? bundledPermissions.ALL.toString() : bundledPermissions.ALL_FILE.toString()"
class="checkbox-switch"
name="sharing_permission_radio"
type="radio"
@update:checked="toggleCustomPermissions">
{{ t('nmcsharing', 'Anyone with the link can') }}
{{ t('nmcsharing', ' ') }}
<strong>
{{ t('nmcsharing', 'edit') }}
</strong>
</NcCheckboxRadioSwitch>
<PencilIcon :size="16" />
</span>
<NcCheckboxRadioSwitch v-if="allowsFileDrop"
:checked.sync="sharingPermission"
:value="bundledPermissions.FILE_DROP.toString()"
Expand All @@ -38,20 +58,15 @@
</div>
</div>
<div class="sharingTabDetailsView__advanced-control">
<button id="btn-advanced"
type="button"
:class="{ open: advancedSectionAccordionExpanded }"
@click="advancedSectionAccordionExpanded = !advancedSectionAccordionExpanded">
{{ t('nmcsharing', 'Advanced') }}
</button>
<strong>{{ t('nmcsharing', 'Advanced settings') }}</strong>
</div>
<div v-if="advancedSectionAccordionExpanded" class="sharingTabDetailsView__advanced">
<section>
<NcCheckboxRadioSwitch v-if="isPublicShare"
:disabled="canChangeHideDownload"
:checked.sync="share.hideDownload"

Check warning on line 67 in src/views/SharingDetailsTab.vue

View workflow job for this annotation

GitHub Actions / eslint

Unexpected mutation of "share" prop
@update:checked="queueUpdate('hideDownload')">
{{ t('files_sharing', 'Hide download') }}
{{ t('nmcsharing', 'Deny download') }}
</NcCheckboxRadioSwitch>
<template v-if="isPublicShare">
<NcCheckboxRadioSwitch :checked.sync="isPasswordProtected" :disabled="isPasswordEnforced">
Expand Down Expand Up @@ -117,6 +132,10 @@
</template>

<script>
import EyeIcon from 'vue-material-design-icons/EyeCircleOutline.vue'
import PencilIcon from 'vue-material-design-icons/Pencil.vue'
import ChevronLeftIcon from 'vue-material-design-icons/ChevronLeftCircleOutline.vue'

import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcInputField from '@nextcloud/vue/dist/Components/NcInputField.js'
import NcDateTimePickerNative from '@nextcloud/vue/dist/Components/NcDateTimePickerNative.js'
Expand All @@ -143,6 +162,9 @@
export default {
name: 'SharingDetailsTab',
components: {
EyeIcon,
PencilIcon,
ChevronLeftIcon,
NcButton,
NcInputField,
NcDateTimePickerNative,
Expand Down Expand Up @@ -256,7 +278,7 @@
},
},
/**
* Can the sharee download files or only view them ?
* Can the share download files or only view them ?
*/
canDownload: {
get() {
Expand Down Expand Up @@ -288,7 +310,7 @@
return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced
},
set(enabled) {
this.share.expireDate = enabled

Check warning on line 313 in src/views/SharingDetailsTab.vue

View workflow job for this annotation

GitHub Actions / eslint

Unexpected mutation of "share" prop
? this.formatDateToString(this.defaultExpiryDate)
: ''
},
Expand Down Expand Up @@ -461,7 +483,7 @@
return null
}

const expirationTime = moment(this.share.passwordExpirationTime)

Check warning on line 486 in src/views/SharingDetailsTab.vue

View workflow job for this annotation

GitHub Actions / eslint

The global property or function moment was deprecated in Nextcloud 18.0.0

if (expirationTime.diff(moment()) < 0) {
return false
Expand Down Expand Up @@ -769,11 +791,44 @@
</script>

<style lang="scss">
.header-permissions {
margin-top: -14px;
display: flex;
flex-direction: row;
align-items: center;

.back-button {
padding: 4px;

&:hover {
color: var(--telekom-color-primary-hovered);
background-color: initial;
cursor: pointer;
}
}

}

.checkbox-text {
display: flex;
flex-direction: row;
align-items: center;

.checkbox-switch {
margin-right: -8px;
}
}

.sharingTabDetailsView {
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 1rem;
padding-top: 0;

.sharingPopup__fileinfo {
color: var(--telekom-color-ui-regular);
}

&__header {
font-weight: bold;
Expand Down
Loading
Loading