aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/l10n/cs.js2
-rw-r--r--apps/files_sharing/l10n/cs.json2
-rw-r--r--apps/files_sharing/l10n/it.js2
-rw-r--r--apps/files_sharing/l10n/it.json2
-rw-r--r--apps/files_sharing/l10n/sr.js2
-rw-r--r--apps/files_sharing/l10n/sr.json2
-rw-r--r--apps/files_sharing/l10n/uk.js2
-rw-r--r--apps/files_sharing/l10n/uk.json2
-rw-r--r--apps/files_sharing/src/components/SharingEntryLink.vue38
9 files changed, 35 insertions, 19 deletions
diff --git a/apps/files_sharing/l10n/cs.js b/apps/files_sharing/l10n/cs.js
index f216d185224..8753dc54d64 100644
--- a/apps/files_sharing/l10n/cs.js
+++ b/apps/files_sharing/l10n/cs.js
@@ -185,6 +185,7 @@ OC.L10N.register(
"Set default folder for accepted shares" : "Nastavit výchozí složku pro přijatá sdílení",
"Reset" : "Vrátit na výchozí hodnoty",
"Reset folder to system default" : "Resetovat složku na systémovou výchozí",
+ "Share expiration: {date}" : "Skončení platnosti sdílení: {date}",
"Share Expiration" : "Skončení platnosti sdílení",
"group" : "skupina",
"conversation" : "konverzace",
@@ -309,6 +310,7 @@ OC.L10N.register(
"Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Sdílení, která nejsou součástí interních nebo externích sdílení. Toto mohou být sdílení z aplikací nebo jiných zdrojů.",
"Share with accounts, teams, federated cloud IDs" : "Nasdílejte účtům, týmům, identifikátorům v rámci federovaného cloudu",
"Share with accounts and teams" : "Nasdílet účtům a týmům",
+ "Federated cloud ID" : "Identifikátor v rámci federovaného cloudu",
"Email, federated cloud ID" : "E-mail, identif. federovaného cloudu",
"Unable to load the shares list" : "Nedaří se načíst seznam sdílení",
"Expires {relativetime}" : "Platnost končí {relativetime}",
diff --git a/apps/files_sharing/l10n/cs.json b/apps/files_sharing/l10n/cs.json
index de776d1f283..50059aea129 100644
--- a/apps/files_sharing/l10n/cs.json
+++ b/apps/files_sharing/l10n/cs.json
@@ -183,6 +183,7 @@
"Set default folder for accepted shares" : "Nastavit výchozí složku pro přijatá sdílení",
"Reset" : "Vrátit na výchozí hodnoty",
"Reset folder to system default" : "Resetovat složku na systémovou výchozí",
+ "Share expiration: {date}" : "Skončení platnosti sdílení: {date}",
"Share Expiration" : "Skončení platnosti sdílení",
"group" : "skupina",
"conversation" : "konverzace",
@@ -307,6 +308,7 @@
"Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Sdílení, která nejsou součástí interních nebo externích sdílení. Toto mohou být sdílení z aplikací nebo jiných zdrojů.",
"Share with accounts, teams, federated cloud IDs" : "Nasdílejte účtům, týmům, identifikátorům v rámci federovaného cloudu",
"Share with accounts and teams" : "Nasdílet účtům a týmům",
+ "Federated cloud ID" : "Identifikátor v rámci federovaného cloudu",
"Email, federated cloud ID" : "E-mail, identif. federovaného cloudu",
"Unable to load the shares list" : "Nedaří se načíst seznam sdílení",
"Expires {relativetime}" : "Platnost končí {relativetime}",
diff --git a/apps/files_sharing/l10n/it.js b/apps/files_sharing/l10n/it.js
index be78bc7fce6..ade501b3d13 100644
--- a/apps/files_sharing/l10n/it.js
+++ b/apps/files_sharing/l10n/it.js
@@ -185,6 +185,7 @@ OC.L10N.register(
"Set default folder for accepted shares" : "Imposta cartella predefinita per condivisioni accettate",
"Reset" : "Ripristina",
"Reset folder to system default" : "Ripristina la cartella alla predefinita di sistema",
+ "Share expiration: {date}" : "Scadenza condivisione: {date}",
"Share Expiration" : "Scadenza Condivisione",
"group" : "gruppo",
"conversation" : "conversazione",
@@ -309,6 +310,7 @@ OC.L10N.register(
"Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Condivisioni che non fanno parte delle condivisioni interne o esterne. Possono essere condivisioni da app o altre fonti.",
"Share with accounts, teams, federated cloud IDs" : "Condividi con account, team, ID cloud federati",
"Share with accounts and teams" : "Condividi con account e team",
+ "Federated cloud ID" : "ID cloud federato",
"Email, federated cloud ID" : "E-mail, ID cloud federato",
"Unable to load the shares list" : "Impossibile caricare l'elenco delle condivisioni",
"Expires {relativetime}" : "Scade il {relativetime}",
diff --git a/apps/files_sharing/l10n/it.json b/apps/files_sharing/l10n/it.json
index 3ac41b2d53d..f87b0a5cd74 100644
--- a/apps/files_sharing/l10n/it.json
+++ b/apps/files_sharing/l10n/it.json
@@ -183,6 +183,7 @@
"Set default folder for accepted shares" : "Imposta cartella predefinita per condivisioni accettate",
"Reset" : "Ripristina",
"Reset folder to system default" : "Ripristina la cartella alla predefinita di sistema",
+ "Share expiration: {date}" : "Scadenza condivisione: {date}",
"Share Expiration" : "Scadenza Condivisione",
"group" : "gruppo",
"conversation" : "conversazione",
@@ -307,6 +308,7 @@
"Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Condivisioni che non fanno parte delle condivisioni interne o esterne. Possono essere condivisioni da app o altre fonti.",
"Share with accounts, teams, federated cloud IDs" : "Condividi con account, team, ID cloud federati",
"Share with accounts and teams" : "Condividi con account e team",
+ "Federated cloud ID" : "ID cloud federato",
"Email, federated cloud ID" : "E-mail, ID cloud federato",
"Unable to load the shares list" : "Impossibile caricare l'elenco delle condivisioni",
"Expires {relativetime}" : "Scade il {relativetime}",
diff --git a/apps/files_sharing/l10n/sr.js b/apps/files_sharing/l10n/sr.js
index 6fe45426dc5..413fccb634c 100644
--- a/apps/files_sharing/l10n/sr.js
+++ b/apps/files_sharing/l10n/sr.js
@@ -185,6 +185,7 @@ OC.L10N.register(
"Set default folder for accepted shares" : "Подесите подразумевани фолдер за прихваћена дељења",
"Reset" : "Ресетуј",
"Reset folder to system default" : "Vratite fasciklu na podrazumevane vrednosti sistema",
+ "Share expiration: {date}" : "Дељење истиче: {date} ",
"Share Expiration" : "Истицање дељења",
"group" : "група",
"conversation" : "разговор",
@@ -309,6 +310,7 @@ OC.L10N.register(
"Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Дељења која нису део интерних или спољних дељења. Ово могу бити дељења из апликација или осталих извора.",
"Share with accounts, teams, federated cloud IDs" : "Дели са налозима, тимовима, ID-јевима здруженог облака",
"Share with accounts and teams" : "Дељење са налозима и тимовима",
+ "Federated cloud ID" : "ИД Здруженог облака",
"Email, federated cloud ID" : "И-мејл, ID здруженог облака",
"Unable to load the shares list" : "Неуспело учитавање листе дељења",
"Expires {relativetime}" : "Истиче {relativetime}",
diff --git a/apps/files_sharing/l10n/sr.json b/apps/files_sharing/l10n/sr.json
index 5a3ea2dadd3..a9bd75ab333 100644
--- a/apps/files_sharing/l10n/sr.json
+++ b/apps/files_sharing/l10n/sr.json
@@ -183,6 +183,7 @@
"Set default folder for accepted shares" : "Подесите подразумевани фолдер за прихваћена дељења",
"Reset" : "Ресетуј",
"Reset folder to system default" : "Vratite fasciklu na podrazumevane vrednosti sistema",
+ "Share expiration: {date}" : "Дељење истиче: {date} ",
"Share Expiration" : "Истицање дељења",
"group" : "група",
"conversation" : "разговор",
@@ -307,6 +308,7 @@
"Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Дељења која нису део интерних или спољних дељења. Ово могу бити дељења из апликација или осталих извора.",
"Share with accounts, teams, federated cloud IDs" : "Дели са налозима, тимовима, ID-јевима здруженог облака",
"Share with accounts and teams" : "Дељење са налозима и тимовима",
+ "Federated cloud ID" : "ИД Здруженог облака",
"Email, federated cloud ID" : "И-мејл, ID здруженог облака",
"Unable to load the shares list" : "Неуспело учитавање листе дељења",
"Expires {relativetime}" : "Истиче {relativetime}",
diff --git a/apps/files_sharing/l10n/uk.js b/apps/files_sharing/l10n/uk.js
index 3cde1e83f93..f1d8ed89a22 100644
--- a/apps/files_sharing/l10n/uk.js
+++ b/apps/files_sharing/l10n/uk.js
@@ -184,6 +184,7 @@ OC.L10N.register(
"Set default folder for accepted shares" : "Встановити типовий каталог для прийнятих спільних ресурсів",
"Reset" : "Скидання",
"Reset folder to system default" : "Відновити типові системні налаштування для каталогу",
+ "Share expiration: {date}" : "У спільному доступі до: {date}",
"Share Expiration" : "Термін дії спільного ресурсу:",
"group" : "група",
"conversation" : "розмова",
@@ -308,6 +309,7 @@ OC.L10N.register(
"Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Спільні ресурси, що не є ані внутрішніми, ані зовнішніми спільними ресурсами, наприклад, спільні ресурси, створені застосунками чи іншими ресурсами.",
"Share with accounts, teams, federated cloud IDs" : "Поділитися з користувачами, командами, об'єднаними хмарами",
"Share with accounts and teams" : "Поділитися з користувачами або командами",
+ "Federated cloud ID" : "Ідентифікатор об'єднаної хмари",
"Email, federated cloud ID" : "Ел. пошта, ID об'єднаної хмари",
"Unable to load the shares list" : "Не вдалося завантажити список спільних ресурсів",
"Expires {relativetime}" : "Термін дії закінчується {relativetime}",
diff --git a/apps/files_sharing/l10n/uk.json b/apps/files_sharing/l10n/uk.json
index 742fc80c355..395814ab6f4 100644
--- a/apps/files_sharing/l10n/uk.json
+++ b/apps/files_sharing/l10n/uk.json
@@ -182,6 +182,7 @@
"Set default folder for accepted shares" : "Встановити типовий каталог для прийнятих спільних ресурсів",
"Reset" : "Скидання",
"Reset folder to system default" : "Відновити типові системні налаштування для каталогу",
+ "Share expiration: {date}" : "У спільному доступі до: {date}",
"Share Expiration" : "Термін дії спільного ресурсу:",
"group" : "група",
"conversation" : "розмова",
@@ -306,6 +307,7 @@
"Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Спільні ресурси, що не є ані внутрішніми, ані зовнішніми спільними ресурсами, наприклад, спільні ресурси, створені застосунками чи іншими ресурсами.",
"Share with accounts, teams, federated cloud IDs" : "Поділитися з користувачами, командами, об'єднаними хмарами",
"Share with accounts and teams" : "Поділитися з користувачами або командами",
+ "Federated cloud ID" : "Ідентифікатор об'єднаної хмари",
"Email, federated cloud ID" : "Ел. пошта, ID об'єднаної хмари",
"Unable to load the shares list" : "Не вдалося завантажити список спільних ресурсів",
"Expires {relativetime}" : "Термін дії закінчується {relativetime}",
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue
index 781626a1ec9..702b876306f 100644
--- a/apps/files_sharing/src/components/SharingEntryLink.vue
+++ b/apps/files_sharing/src/components/SharingEntryLink.vue
@@ -223,13 +223,14 @@
</template>
<script>
+import { showError, showSuccess } from '@nextcloud/dialogs'
import { emit } from '@nextcloud/event-bus'
+import { t } from '@nextcloud/l10n'
+import moment from '@nextcloud/moment'
import { generateUrl, getBaseUrl } from '@nextcloud/router'
-import { showError, showSuccess } from '@nextcloud/dialogs'
import { ShareType } from '@nextcloud/sharing'
-import VueQrcode from '@chenfengyuan/vue-qrcode'
-import moment from '@nextcloud/moment'
+import VueQrcode from '@chenfengyuan/vue-qrcode'
import NcActionButton from '@nextcloud/vue/components/NcActionButton'
import NcActionCheckbox from '@nextcloud/vue/components/NcActionCheckbox'
import NcActionInput from '@nextcloud/vue/components/NcActionInput'
@@ -258,7 +259,7 @@ import GeneratePassword from '../utils/GeneratePassword.ts'
import Share from '../models/Share.ts'
import SharesMixin from '../mixins/SharesMixin.js'
import ShareDetails from '../mixins/ShareDetails.js'
-import { getLoggerBuilder } from '@nextcloud/logger'
+import logger from '../services/logger.ts'
export default {
name: 'SharingEntryLink',
@@ -313,10 +314,6 @@ export default {
ExternalLegacyLinkActions: OCA.Sharing.ExternalLinkActions.state,
ExternalShareActions: OCA.Sharing.ExternalShareActions.state,
- logger: getLoggerBuilder()
- .setApp('files_sharing')
- .detectUser()
- .build(),
// tracks whether modal should be opened or not
showQRCode: false,
@@ -330,6 +327,8 @@ export default {
* @return {string}
*/
title() {
+ const l10nOptions = { escape: false /* no escape as this string is already escaped by Vue */ }
+
// if we have a valid existing share (not pending)
if (this.share && this.share.id) {
if (!this.isShareOwner && this.share.ownerDisplayName) {
@@ -337,26 +336,26 @@ export default {
return t('files_sharing', '{shareWith} by {initiator}', {
shareWith: this.share.shareWith,
initiator: this.share.ownerDisplayName,
- })
+ }, l10nOptions)
}
return t('files_sharing', 'Shared via link by {initiator}', {
initiator: this.share.ownerDisplayName,
- })
+ }, l10nOptions)
}
if (this.share.label && this.share.label.trim() !== '') {
if (this.isEmailShareType) {
if (this.isFileRequest) {
return t('files_sharing', 'File request ({label})', {
label: this.share.label.trim(),
- })
+ }, l10nOptions)
}
return t('files_sharing', 'Mail share ({label})', {
label: this.share.label.trim(),
- })
+ }, l10nOptions)
}
return t('files_sharing', 'Share link ({label})', {
label: this.share.label.trim(),
- })
+ }, l10nOptions)
}
if (this.isEmailShareType) {
if (!this.share.shareWith || this.share.shareWith.trim() === '') {
@@ -391,6 +390,7 @@ export default {
}
return null
},
+
passwordExpirationTime() {
if (this.share.passwordExpirationTime === null) {
return null
@@ -613,7 +613,7 @@ export default {
* @param {boolean} shareReviewComplete if the share was reviewed
*/
async onNewLinkShare(shareReviewComplete = false) {
- this.logger.debug('onNewLinkShare called (with this.share)', this.share)
+ logger.debug('onNewLinkShare called (with this.share)', this.share)
// do not run again if already loading
if (this.loading) {
return
@@ -628,7 +628,7 @@ export default {
shareDefaults.expiration = this.formatDateToString(this.config.defaultExpirationDate)
}
- this.logger.debug('Missing required properties?', this.enforcedPropertiesMissing)
+ logger.debug('Missing required properties?', this.enforcedPropertiesMissing)
// Do not push yet if we need a password or an expiration date: show pending menu
// A share would require a review for example is default expiration date is set but not enforced, this allows
// the user to review the share and remove the expiration date if they don't want it
@@ -636,7 +636,7 @@ export default {
this.pending = true
this.shareCreationComplete = false
- this.logger.info('Share policy requires a review or has mandated properties (password, expirationDate)...')
+ logger.info('Share policy requires a review or has mandated properties (password, expirationDate)...')
// ELSE, show the pending popovermenu
// if password default or enforced, pre-fill with random one
@@ -664,13 +664,13 @@ export default {
// if the share is valid, create it on the server
if (this.checkShare(this.share)) {
try {
- this.logger.info('Sending existing share to server', this.share)
+ logger.info('Sending existing share to server', this.share)
await this.pushNewLinkShare(this.share, true)
this.shareCreationComplete = true
- this.logger.info('Share created on server', this.share)
+ logger.info('Share created on server', this.share)
} catch (e) {
this.pending = false
- this.logger.error('Error creating share', e)
+ logger.error('Error creating share', e)
return false
}
return true