diff --git a/src/locale/lang/en.js b/src/locale/lang/en.js index c702e98..e3735a4 100644 --- a/src/locale/lang/en.js +++ b/src/locale/lang/en.js @@ -123,6 +123,13 @@ export default { high: "High", lossless: "Lossless", }, + lyricFontSize: { + text: "Lyric Font Size", + small: "Small", + medium: "Medium", + large: "Large(Default)", + xlarge: "X-Large", + }, deviceSelector: "Audio Output Device", permissionRequired: "Microphone Permission Required", appearance: { diff --git a/src/locale/lang/zh-CN.js b/src/locale/lang/zh-CN.js index 1fcf906..6383e91 100644 --- a/src/locale/lang/zh-CN.js +++ b/src/locale/lang/zh-CN.js @@ -124,6 +124,13 @@ export default { high: "极高", lossless: "无损", }, + lyricFontSize: { + text: "歌词字体大小", + small: "小", + medium: "中", + large: "大(默认)", + xlarge: "超大", + }, deviceSelector: "音频输出设备", permissionRequired: "需要麦克风权限", appearance: { diff --git a/src/store/initLocalStorage.js b/src/store/initLocalStorage.js index 3802ed3..fcce7a3 100644 --- a/src/store/initLocalStorage.js +++ b/src/store/initLocalStorage.js @@ -7,6 +7,7 @@ let localStorage = { lang: null, appearance: "auto", musicQuality: 320000, + lyricFontSize: 28, outputDevice: "default", showGithubIcon: true, showPlaylistsByAppleMusic: true, diff --git a/src/store/mutations.js b/src/store/mutations.js index c166d12..b15650b 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -9,6 +9,9 @@ export default { changeMusicQuality(state, value) { state.settings.musicQuality = value; }, + changeLyricFontSize(state, value) { + state.settings.lyricFontSize = value; + }, changeOutputDevice(state, deviceId) { state.settings.outputDevice = deviceId; }, diff --git a/src/views/lyrics.vue b/src/views/lyrics.vue index aded77b..e0750ac 100644 --- a/src/views/lyrics.vue +++ b/src/views/lyrics.vue @@ -128,14 +128,18 @@
-
+
0; - }, - lineStyles() { + lyricFontSize() { return { - fontSize: this.haveTranslation ? "28px" : "36px", + fontSize: this.$store.state.settings.lyricFontSize + "px", }; }, playerRef() { diff --git a/src/views/settings.vue b/src/views/settings.vue index 85d9172..9ff755f 100644 --- a/src/views/settings.vue +++ b/src/views/settings.vue @@ -74,6 +74,27 @@
+
+
+
{{ $t("settings.lyricFontSize.text") }}
+
+
+ +
+
{{ $t("settings.deviceSelector") }}
@@ -294,6 +315,15 @@ export default { this.clearCache("tracks"); }, }, + lyricFontSize: { + get() { + if (this.settings.lyricFontSize === undefined) return 28; + return this.settings.lyricFontSize; + }, + set(value) { + this.$store.commit("changeLyricFontSize", value); + }, + }, outputDevice: { get() { if (this.withoutAudioPriviledge === true) this.getAllOutputDevices();