From bf56de82998c526044d975b03810a03cc43ba258 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Dec 2025 10:36:30 +0000 Subject: [PATCH] Address code review: use named constant and safe initialization Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com> --- src/components/HitokotoCard.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/HitokotoCard.vue b/src/components/HitokotoCard.vue index 5985fe8..a031cf2 100644 --- a/src/components/HitokotoCard.vue +++ b/src/components/HitokotoCard.vue @@ -66,7 +66,7 @@ export default { loading: false, timer: null, unwatch: null, - fontSize: SettingsManager.getSetting('font.size') + fontSize: 28 // Will be updated in mounted() } }, computed: { @@ -79,9 +79,9 @@ export default { } }, authorStyle() { - // Author font size is 60% of the main font size + const AUTHOR_FONT_RATIO = 0.6 // Author font size is 60% of the main font size return { - 'font-size': `${this.fontSize * 0.6}px`, + 'font-size': `${this.fontSize * AUTHOR_FONT_RATIO}px`, 'text-align': 'left' } }