From 6f674758b61f0f1b4ecd10073bcfbffbc1337c58 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 18 Oct 2022 15:45:23 +0200 Subject: =?UTF-8?q?=E2=8F=B1=EF=B8=8F=20=20Combine=20the=20amount=20and=20?= =?UTF-8?q?unit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joas Schilling --- src/AdminSettings.vue | 34 ++++++++++++++++------------------ src/Components/RetentionRule.vue | 25 ++++++++++--------------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/src/AdminSettings.vue b/src/AdminSettings.vue index 4e6dc2a..a8a4999 100644 --- a/src/AdminSettings.vue +++ b/src/AdminSettings.vue @@ -12,11 +12,8 @@ {{ t('files_retention', 'Files tagged with') }} - - {{ t('files_retention','Retention') }} - - - {{ t('files_retention','Time') }} + + {{ t('files_retention','Retention time') }} {{ t('files_retention','From date of') }} @@ -39,14 +36,12 @@ :filter="filterAvailableTagList" :close-on-select="true" /> - + - - div { + width: 49%; + min-width: 0; + display: inline-block; + } + ::v-deep .input-field__input { text-align: right; } diff --git a/src/Components/RetentionRule.vue b/src/Components/RetentionRule.vue index 987ceb0..957efe9 100644 --- a/src/Components/RetentionRule.vue +++ b/src/Components/RetentionRule.vue @@ -7,11 +7,8 @@ {{ tagName }} - - {{ timeamount }} - - - {{ getUnit }} + + {{ getAmountAndUnit }} {{ getAfter }} @@ -74,16 +71,16 @@ export default { return OC.SystemTags.collection.get(this.tagid)?.attributes?.name }, - getUnit() { + getAmountAndUnit() { switch (this.timeunit) { case 0: - return t('files_retention', 'Days') + return n('files_retention', '%n day', '%n days', this.timeamount) case 1: - return t('files_retention', 'Weeks') + return n('files_retention', '%n week', '%n weeks', this.timeamount) case 2: - return t('files_retention', 'Months') + return n('files_retention', '%n month', '%n months', this.timeamount) default: - return t('files_retention', 'Years') + return n('files_retention', '%n year', '%n years', this.timeamount) } }, @@ -113,8 +110,7 @@ export default {