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
1 change: 1 addition & 0 deletions l10n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"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.",
"Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Bitte beachten sie, dass bei einem internen teilen, also dem Teilen an andere MagentaCLOUD Nutzer, die Sammelbox nicht verfügbar ist.",
"Advanced settings": "Erweiterte Einstellungen",
"Set password": "Passwort setzen",
"Your shares": "Ihre Freigaben",
Expand Down
1 change: 1 addition & 0 deletions l10n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"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.",
"Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Bitte beachten sie, dass bei einem internen teilen, also dem Teilen an andere MagentaCLOUD Nutzer, die Sammelbox nicht verfügbar ist.",
"Advanced settings": "Erweiterte Einstellungen",
"Set password": "Passwort setzen",
"Your shares": "Ihre Freigaben",
Expand Down
3 changes: 2 additions & 1 deletion l10n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"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.",
"Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.",
"Advanced settings": "Advanced settings",
"Set password": "Passwort setzen",
"Set password": "Set password",
"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 Down
3 changes: 2 additions & 1 deletion l10n/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"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.",
"Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.",
"Advanced settings": "Advanced settings",
"Set password": "Passwort setzen",
"Set password": "Set password",
"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 Down
2 changes: 1 addition & 1 deletion src/views/SharingPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export default {
}
if (isUser && isEmail) {
return 'MIXED'
}
}
}
if (isUser) {
return 'USER'
Expand Down
43 changes: 21 additions & 22 deletions src/views/SharingPopupDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,23 @@
<p v-if="allowsFileDrop" class="sharing_permission-desc">
{{ t('nmcsharing', 'With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.') }}
</p>
<p v-if="isMixedShare">
{{ t('nmcsharing', 'Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.') }}
</p>
</div>
</div>
<div class="sharingTabDetailsView__advanced-control">
<strong>{{ t('nmcsharing', 'Advanced settings') }}</strong>
</div>
<div v-if="advancedSectionAccordionExpanded" class="sharingTabDetailsView__advanced">
<section>
<NcCheckboxRadioSwitch v-if="isPublicShare || isMixedShare"
<NcCheckboxRadioSwitch v-if="isPublicShare || isMixedShare"
:disabled="canChangeHideDownload"
:checked.sync="share.hideDownload"
@update:checked="queueUpdate('hideDownload')">
{{ t('nmcsharing', 'Deny download') }}
</NcCheckboxRadioSwitch>
<template v-if="isPublicShare || isMixedShare">
<template v-if="isPublicShare || isMixedShare">
<NcCheckboxRadioSwitch :checked.sync="isPasswordProtected" :disabled="isPasswordEnforced">
{{ t('nmcsharing', 'Set password') }}
</NcCheckboxRadioSwitch>
Expand All @@ -83,26 +86,25 @@
? t('files_sharing', 'Expiration date (enforced)')
: t('files_sharing', 'Set expiration date') }}
</NcCheckboxRadioSwitch>
<NcDateTimePickerNative v-if="hasExpirationDate"
id="share-date-picker"
:value="new Date(share.expireDate)"
<NcDateTimePickerNative id="share-date-picker"
:value="defaultExpiryDate"
:min="dateTomorrow"
:max="dateMaxEnforced"
:hide-label="true"
:disabled="isExpiryDateEnforced"
:placeholder="t('files_sharing', 'Expiration date')"
type="date"
@input="onExpirationChange" />
<NcCheckboxRadioSwitch v-if="isEmailShare || isMixedShare" :checked.sync="writeNoteToRecipientIsChecked">
<NcCheckboxRadioSwitch v-if="isEmailShare || isMixedShare" :checked.sync="writeNoteToRecipientIsChecked">
{{ t('files_sharing', 'Note to recipient') }}
</NcCheckboxRadioSwitch>
<template v-if="writeNoteToRecipientIsChecked && (isEmailShare || isMixedShare)">
<template v-if="writeNoteToRecipientIsChecked && (isEmailShare || isMixedShare)">
<textarea :value="mutableShare.note" @input="mutableShare.note = $event.target.value" />
</template>
<DownloadLimit v-if="(isLinkShare || isEmailShare || isMixedShare) && !isNewShare && !isFolder"
<DownloadLimit v-if="(isLinkShare || isEmailShare || isMixedShare) && !isNewShare && !isFolder"
:share="share"
:file-info="fileInfo" />
<NcCheckboxRadioSwitch v-if="(!isPublicShare || isMixedShare) && resharingAllowedGlobal"
<NcCheckboxRadioSwitch v-if="(!isPublicShare || isMixedShare) && resharingAllowedGlobal"
:checked.sync="allowResharingIsChecked">
{{ t('nmcsharing', 'Allow resharing') }}
</NcCheckboxRadioSwitch>
Expand Down Expand Up @@ -147,7 +149,7 @@ import {
import DownloadLimit from '../components/DownloadLimit.vue'

export default {
name: 'SharingInputDetailsTab',
name: 'SharingPopupDetailsTab',
components: {
EyeIcon,
PencilIcon,
Expand Down Expand Up @@ -290,12 +292,10 @@ export default {
*/
hasExpirationDate: {
get() {
return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced
return true
},
set(enabled) {
this.share.expireDate = enabled
? this.formatDateToString(this.defaultExpiryDate)
: ''
set() {
this.share.expireDate = this.formatDateToString(this.defaultExpiryDate)
},
},
/**
Expand Down Expand Up @@ -342,7 +342,7 @@ export default {
} else if (this.isPublicShare && this.config.isDefaultExpireDateEnabled) {
return new Date(this.config.defaultExpirationDate)
}
return new Date(new Date().setDate(new Date().getDate() + 1))
return new Date(new Date().setFullYear(new Date().getFullYear() + 1))
},
isUserShare() {
return this.share.type === this.SHARE_TYPES.SHARE_TYPE_USER
Expand Down Expand Up @@ -465,7 +465,7 @@ export default {
* @return {boolean}
*/
isMixedShare() {
return this.shareType === 'MIXED';
return this.shareType === 'MIXED'
},
canChangeHideDownload() {
const hasDisabledDownload = (shareAttribute) => shareAttribute.key === 'download' && shareAttribute.scope === 'permissions' && shareAttribute.enabled === false
Expand Down Expand Up @@ -508,9 +508,8 @@ export default {
beforeMount() {
this.initializePermissions()
this.initializeAttributes()
console.log(this.shareType)
// console.debug('shareSentIn', this.share)
// console.debug('config', this.config)
console.debug('shareSentIn', this.share)
console.debug('config', this.config)
},

methods: {
Expand Down Expand Up @@ -594,7 +593,7 @@ export default {
async saveShareSettings() {
const permissionsAndAttributes = ['permissions', 'attributes', 'note', 'expireDate']
const publicShareAttributes = ['label', 'password', 'hideDownload']
if (this.isPublicShare || this.isMixedShare) {
if (this.isPublicShare || this.isMixedShare) {
permissionsAndAttributes.push(...publicShareAttributes)
}
const sharePermissionsSet = parseInt(this.sharingPermission)
Expand All @@ -614,7 +613,7 @@ export default {
if (this.allowResharingIsChecked && !this.canReshare && this.resharingAllowedGlobal) {
this.share.permissions |= ATOMIC_PERMISSIONS.SHARE
// remove SHARE permission if internal share, 'Allow resharing' is unchecked and it initially had SHARE permission
} else if ((!this.isPublicShare || this.isMixedShare) && this.canReshare && !this.allowResharingIsChecked) {
} else if ((!this.isPublicShare || this.isMixedShare) && this.canReshare && !this.allowResharingIsChecked) {
this.share.permissions = this.share.permissions & ~ATOMIC_PERMISSIONS.SHARE
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/SharingPopupLinkList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import SharingEntryLink from '../components/SharingEntryLink.vue'
import AddLinkButton from '../components/AddLinkButton.vue'

export default {
name: 'SharingLinkListPopup',
name: 'SharingPopupLinkList',

components: {
SharingEntryLink,
Expand Down
Loading