From 6b6d21fa2f13a1ac60c745dfd4c818b196a646a9 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 14 Jan 2024 00:33:40 +0100 Subject: [PATCH] refacto: move size to computed values --- src/components/Feed/Modal.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Feed/Modal.vue b/src/components/Feed/Modal.vue index 7770231..25cb76b 100644 --- a/src/components/Feed/Modal.vue +++ b/src/components/Feed/Modal.vue @@ -22,7 +22,7 @@ - {{ t('repod', 'Download') }} {{ size ? `(${humanFileSize(size)})` : '' }} + {{ t('repod', 'Download') }} {{ size ? `(${episodeFileSize})` : '' }} @@ -73,6 +73,9 @@ export default { }, }, computed: { + episodeFileSize() { + return humanFileSize(this.size) + }, strippedDescription() { const pre = document.createElement('pre') pre.innerHTML = this.description @@ -80,9 +83,6 @@ export default { return strippedDescription.replace(/\n/g, '
') }, }, - methods: { - humanFileSize, - }, }