Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRomain Lebrun Thauront <romain@framasoft.org>2021-09-27 11:34:53 +0300
committerRomain Lebrun Thauront <romain@framasoft.org>2021-10-01 10:25:42 +0300
commitf7b38bb8d6aa9c717af77ccc8dae06c9a3ee58a8 (patch)
treea54d5351a7d7fb5addc4b2216f889a90e4bcebf1 /src
parenta5bd4204cb650bf76c9ad2e5c180227e8fae00c5 (diff)
Delete all item in trash bin
Signed-off-by: Romain Lebrun Thauront <romain@framasoft.org>
Diffstat (limited to 'src')
-rw-r--r--src/components/AppNavigation/Trashbin.vue31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/components/AppNavigation/Trashbin.vue b/src/components/AppNavigation/Trashbin.vue
index 883a23d9..dc080bf4 100644
--- a/src/components/AppNavigation/Trashbin.vue
+++ b/src/components/AppNavigation/Trashbin.vue
@@ -85,9 +85,14 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
</div>
</template>
</div>
- <p v-if="retentionDuration" class="footer">
- {{ n('calendar', 'Elements in the trash bin are deleted after {numDays} day', 'Elements in the trash bin are deleted after {numDays} days', retentionDuration, { numDays: retentionDuration }) }}
- </p>
+ <div class="footer">
+ <p v-if="retentionDuration">
+ {{ n('calendar', 'Elements in the trash bin are deleted after {numDays} day', 'Elements in the trash bin are deleted after {numDays} days', retentionDuration, { numDays: retentionDuration }) }}
+ </p>
+ <button @click="onEmptyTrashBin()">
+ {{ t('tasks','Empty trash bin') }}
+ </button>
+ </div>
</template>
</div>
</Modal>
@@ -251,6 +256,23 @@ export default {
showError(t('tasks', 'Could not restore calendar or event'))
}
},
+ onEmptyTrashBin() {
+ OC.dialogs.confirm(
+ t('tasks', 'Do you really want to empty the trash bin?'),
+ t('tasks', 'Empty trash bin'),
+ this.emptyTrashBin,
+ true
+ )
+ },
+
+ emptyTrashBin(confirm) {
+ if (!confirm) {
+ return
+ }
+ this.items.forEach((item) => {
+ this.onDeletePermanently(item)
+ })
+ },
},
}
</script>
@@ -315,6 +337,9 @@ export default {
text-align: center;
font-size: small;
margin-top: 16px;
+ & > p {
+ margin-bottom: 12px;
+ }
}
.icon-bullet {