Skip to content
Closed
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
6 changes: 5 additions & 1 deletion l10n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"translations": {
"Sharing": "Teilen",
"Add link": "Link erstellen",
"Share": "Teilen",
"Read only": "Nur lesen",
"Can edit": "Kann bearbeiten",
"File drop": "Sammelbox",
Expand All @@ -14,14 +15,17 @@
"Advanced": "Erweiterte",
"Set password": "Passwortschutz",
"Your shares": "Ihre Freigaben",
"Links sent per E-mail": "Links per E-mail versandt",
"Links to Copy": "Links zum Kopieren",
"No shares created yet.": "Noch keine Freigaben erstellt.",
"Advanced permissions": "Erweiterte Berechtigungen",
"Allow resharing": "Weiterteilen erlauben",
"Set download limit": "Downloads begrenzen",
"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.",
"Manage Access": "Zugriff verwalten"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
6 changes: 5 additions & 1 deletion l10n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"translations": {
"Sharing": "Teilen",
"Add link": "Link erstellen",
"Share": "Teilen",
"Read only": "Nur lesen",
"Can edit": "Kann bearbeiten",
"File drop": "Sammelbox",
Expand All @@ -14,14 +15,17 @@
"Advanced": "Erweiterte",
"Set password": "Passwortschutz",
"Your shares": "Ihre Freigaben",
"Links sent per E-mail": "Links per E-mail versandt",
"Links to Copy": "Links zum Kopieren",
"No shares created yet.": "Noch keine Freigaben erstellt.",
"Advanced permissions": "Erweiterte Berechtigungen",
"Allow resharing": "Weiterteilen erlauben",
"Set download limit": "Downloads begrenzen",
"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.",
"Manage Access": "Zugriff verwalten"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
6 changes: 5 additions & 1 deletion l10n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"translations": {
"Sharing": "Sharing",
"Add link": "Add link",
"Share": "Share",
"Read only": "Read only",
"Can edit": "Can edit",
"File drop": "File drop",
Expand All @@ -14,14 +15,17 @@
"Advanced": "Advanced",
"Set password": "Set password",
"Your shares": "Your shares",
"Links sent per E-mail": "Links sent per E-mail",
"Links to Copy": "Links to Copy",
"No shares created yet.": "No shares created yet.",
"Advanced permissions": "Advanced permissions",
"Allow resharing": "Allow resharing",
"Set download limit": "Set download limit",
"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.",
"Manage Access": "Manage Access"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
6 changes: 5 additions & 1 deletion l10n/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"translations": {
"Sharing": "Sharing",
"Add link": "Add link",
"Share": "Share",
"Read only": "Read only",
"Can edit": "Can edit",
"File drop": "File drop",
Expand All @@ -14,14 +15,17 @@
"Advanced": "Advanced",
"Set password": "Set password",
"Your shares": "Your shares",
"Links sent per E-mail": "Links sent per E-mail",
"Links to Copy": "Links to Copy",
"No shares created yet.": "No shares created yet.",
"Advanced permissions": "Advanced permissions",
"Allow resharing": "Allow resharing",
"Set download limit": "Set download limit",
"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.",
"Manage Access": "Manage Access"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
58 changes: 58 additions & 0 deletions src/components/AddAllEmailsButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
e``<template>
<div>
<NcButton id="addlink_button" type="secondary" @click.prevent.stop="addMultipleEmailShares">
{{ t('nmcsharing', 'Add All Emails') }}
</NcButton>
</div>
</template>

<script>
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import SharesMixin from '../mixins/SharesMixin.js'

export default {
name: 'AddAllEmailsButton',
components: {
NcButton,
},
mixins: [SharesMixin],
props: {
isLoading: {
type: Boolean,
default: false,
required: true,
},
fileInfo: {
type: Object,
default: () => { },
required: true,
},
filteredEmailArr: {
type: Array,
default: () => [],
required: true,
},
// On button click, we will submit the multiple email shares defined by user
// passing callback function as a prop for async $emit
onSubmit: {
type: Function,
required: true,
},
},
methods: {
async addMultipleEmailShares() {
for (const emailObj of this.filteredEmailArr) {
await this.onSubmit(emailObj)
this.$emit('add-share', emailObj)
}
},
},
}
</script>

<style lang="scss" scoped>
button#addlink_button {
font-size: 1rem;
margin-bottom: 24px;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<NcButton id="addlink_button" type="secondary" @click.prevent.stop="onNewLinkShare">
{{ t('nmcsharing', 'Add link') }}
{{ t('nmcsharing', 'Share') }}
</NcButton>
</div>
</template>
Expand All @@ -13,15 +13,19 @@ import { showError, showSuccess } from '@nextcloud/dialogs'
import SharesMixin from '../mixins/SharesMixin.js'

export default {
name: 'AddLinkButton',
name: 'OpenSharingModalButton',
components: {
NcButton,
},
mixins: [SharesMixin],
props: {
fileInfo: {
type: Object,
default: () => {},
default: () => { },
required: true,
},
isLoading: {
type: Boolean,
required: true,
},
},
Expand Down Expand Up @@ -62,7 +66,7 @@ export default {
this.onSyncError('pending', message)
throw data
} finally {
this.loading = false
// this.loading = false
}
},
},
Expand Down
38 changes: 11 additions & 27 deletions src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,7 @@
-->

<template>
<li :class="{'sharing-entry--share': share}" class="sharing-entry sharing-entry__link">
<NcAvatar :is-no-user="true"
class="sharing-entry__avatar">
<template #icon>
<span class="icon"
:class="{
'icon-default': !share,
'icon-user': isEmailShareType,
'icon-link': isLinkShareType}" />
</template>
</NcAvatar>
<li :class="{ 'sharing-entry--share': share }" class="sharing-entry sharing-entry__link">
<div class="sharing-entry__desc" @click.prevent="toggleQuickShareSelect">
<span class="sharing-entry__title" :title="title">
{{ title }}
Expand All @@ -47,9 +37,7 @@
</div>

<!-- clipboard -->
<NcActions v-if="share && !isEmailShareType && share.token"
ref="copyButton"
class="sharing-entry__copy">
<NcActions v-if="share && !isEmailShareType && share.token" ref="copyButton" class="sharing-entry__copy">
<NcActionLink :href="shareLink"
target="_blank"
:title="copyLinkTooltip"
Expand All @@ -74,9 +62,7 @@
:force-menu="true"
@close="onNewLinkShare">
<!-- pending data menu -->
<NcActionText v-if="errors.pending"
icon="icon-error"
:class="{ error: errors.pending}">
<NcActionText v-if="errors.pending" icon="icon-error" :class="{ error: errors.pending }">
{{ errors.pending }}
</NcActionText>
<NcActionText v-else icon="icon-info">
Expand Down Expand Up @@ -143,9 +129,7 @@
@close="onMenuClose">
<template v-if="share">
<template v-if="share.canEdit && canReshare">
<NcActionButton icon="icon-edit"
:disabled="saving"
@click.prevent="openSharingDetails">
<NcActionButton icon="icon-edit" :disabled="saving" @click.prevent="openSharingDetails">
{{ t('nmcsharing', 'Advanced permissions') }}
</NcActionButton>
</template>
Expand All @@ -159,7 +143,7 @@
:share="share" /> -->

<!-- external legacy sharing via url (social...) -->
<NcActionLink v-for="({icon, url, name}, index) in externalLegacyLinkActions"
<NcActionLink v-for="({ icon, url, name }, index) in externalLegacyLinkActions"

Check warning on line 146 in src/components/SharingEntryLink.vue

View workflow job for this annotation

GitHub Actions / eslint

Variable 'index' is already declared in the upper scope

Check warning on line 146 in src/components/SharingEntryLink.vue

View workflow job for this annotation

GitHub Actions / eslint

Variable 'index' is already declared in the upper scope
:key="index"
:href="url(shareLink)"
:icon="icon"
Expand Down Expand Up @@ -192,7 +176,6 @@
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink.js'
import NcActionText from '@nextcloud/vue/dist/Components/NcActionText.js'
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'

import QuickShareSelect from './SharingEntryQuickShareSelect.vue'

Expand All @@ -210,7 +193,6 @@
NcActionInput,
NcActionLink,
NcActionText,
NcAvatar,
QuickShareSelect,
},

Expand Down Expand Up @@ -267,7 +249,7 @@
label: this.share.label.trim(),
})
}
return t('files_sharing', 'Share link ({label})', {
return t('files_sharing', 'Link {label}', {
label: this.share.label.trim(),
})
}
Expand Down Expand Up @@ -333,8 +315,8 @@
},
async set(enabled) {
// TODO: directly save after generation to make sure the share is always protected
Vue.set(this.share, 'password', enabled ? await GeneratePassword() : '')

Check warning on line 318 in src/components/SharingEntryLink.vue

View workflow job for this annotation

GitHub Actions / eslint

Caution: `Vue` also has a named export `set`. Check if you meant to write `import {set} from 'vue'` instead

Check warning on line 318 in src/components/SharingEntryLink.vue

View workflow job for this annotation

GitHub Actions / eslint

Caution: `Vue` also has a named export `set`. Check if you meant to write `import {set} from 'vue'` instead
Vue.set(this.share, 'newPassword', this.share.password)

Check warning on line 319 in src/components/SharingEntryLink.vue

View workflow job for this annotation

GitHub Actions / eslint

Caution: `Vue` also has a named export `set`. Check if you meant to write `import {set} from 'vue'` instead

Check warning on line 319 in src/components/SharingEntryLink.vue

View workflow job for this annotation

GitHub Actions / eslint

Caution: `Vue` also has a named export `set`. Check if you meant to write `import {set} from 'vue'` instead
},
},

Expand All @@ -343,9 +325,9 @@
return null
}

const expirationTime = moment(this.share.passwordExpirationTime)

Check warning on line 328 in src/components/SharingEntryLink.vue

View workflow job for this annotation

GitHub Actions / eslint

The global property or function moment was deprecated in Nextcloud 18.0.0

Check warning on line 328 in src/components/SharingEntryLink.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) {

Check warning on line 330 in src/components/SharingEntryLink.vue

View workflow job for this annotation

GitHub Actions / eslint

The global property or function moment was deprecated in Nextcloud 18.0.0

Check warning on line 330 in src/components/SharingEntryLink.vue

View workflow job for this annotation

GitHub Actions / eslint

The global property or function moment was deprecated in Nextcloud 18.0.0
return false
}

Expand Down Expand Up @@ -563,7 +545,7 @@
this.pending = false
component.open = true

// Nothing is enforced, creating share directly
// Nothing is enforced, creating share directly
} else {
const share = new Share(shareDefaults)
await this.pushNewLinkShare(share)
Expand Down Expand Up @@ -783,6 +765,7 @@
color: var(--color-text-maxcontrast);
}
}

&__title {
text-overflow: ellipsis;
overflow: hidden;
Expand Down Expand Up @@ -815,8 +798,9 @@
// but only the first one
.action-item {
margin-left: auto;
~ .action-item,
~ .sharing-entry__loading {

~.action-item,
~.sharing-entry__loading {
margin-left: 0;
}
}
Expand Down
Loading
Loading