From 01902f93bd082988893a132975513a97b25886ef Mon Sep 17 00:00:00 2001 From: Maikiwi Date: Wed, 26 Jan 2022 09:54:39 -0800 Subject: [PATCH 1/4] i18n sync --- src/i18n/en_US.jsonc | 2 +- src/i18n/ja_JP.jsonc | 4 ++++ src/i18n/zh_CN.jsonc | 4 ++++ src/i18n/zh_TW.jsonc | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/i18n/en_US.jsonc b/src/i18n/en_US.jsonc index 42959fd6..d462ef01 100644 --- a/src/i18n/en_US.jsonc +++ b/src/i18n/en_US.jsonc @@ -4,7 +4,7 @@ "i18n.languageName": "English", // name of language in native language "i18n.languageNameEnglish": "English", // name of language in English "i18n.category": "main", // main = real language, fun = fun community languages - "i18n.authors": "", // Authors, if you contribute to this file feel free to add your name seperated with a space + "i18n.authors": "@maikirakiwi", // Authors, if you contribute to this file feel free to add your name seperated with a space // App info "app.name": "Cider", diff --git a/src/i18n/ja_JP.jsonc b/src/i18n/ja_JP.jsonc index 5f15848a..34e4fab9 100644 --- a/src/i18n/ja_JP.jsonc +++ b/src/i18n/ja_JP.jsonc @@ -77,6 +77,9 @@ "term.enabled": "ON", "term.disabled": "OFF", "term.connect": "接続", + "term.connecting": "接続中", + "term.disconnect": "切断", + "term.authed": "認証済み", "term.confirm": "よろしいでしょうか?", "term.more": "もっと", "term.less": "減らす", @@ -242,6 +245,7 @@ "spatial.width" : "幅", "spatial.height" : "高さ", "spatial.depth" : "奥行", + "spatial.gain" : "ゲイン", "spatial.roomMaterials" : "部屋のマテリアル", "spatial.roomDimensions" : "部屋の大きさ", "spatial.roomPositions" : "部屋の位置", diff --git a/src/i18n/zh_CN.jsonc b/src/i18n/zh_CN.jsonc index df64ee2a..e55a44e0 100644 --- a/src/i18n/zh_CN.jsonc +++ b/src/i18n/zh_CN.jsonc @@ -77,6 +77,9 @@ "term.enabled": "已启用", "term.disabled": "已禁用", "term.connect": "连接", + "term.connecting": "连接中", + "term.disconnect": "断开", + "term.authed": "已认证", "term.confirm": "确认?", "term.more": "更多", "term.less": "较少", @@ -244,6 +247,7 @@ "spatial.width" : "宽度", "spatial.height" : "高度", "spatial.depth" : "深度", + "spatial.gain": "增益", "spatial.roomMaterials" : "空间材质", "spatial.roomDimensions" : "空间尺寸", "spatial.roomPositions" : "空间位置", diff --git a/src/i18n/zh_TW.jsonc b/src/i18n/zh_TW.jsonc index 935cddfb..b4151833 100644 --- a/src/i18n/zh_TW.jsonc +++ b/src/i18n/zh_TW.jsonc @@ -77,6 +77,9 @@ "term.enabled": "已啟用", "term.disabled": "已停用", "term.connect": "連接", + "term.connecting": "連接中", + "term.disconnect": "斷開", + "term.authed": "已授權", "term.confirm": "確定?", "term.more": "更多", "term.less": "更少", @@ -243,6 +246,7 @@ "spatial.width" : "寬度", "spatial.height" : "高度", "spatial.depth" : "深度", + "spatial.gain" : "增益", "spatial.roomMaterials" : "空間材質", "spatial.roomDimensions" : "空間尺寸", "spatial.roomPositions" : "空間位置", From 992887eecf74eb0bdb7e785d4122964c6567127d Mon Sep 17 00:00:00 2001 From: Maikiwi Date: Wed, 26 Jan 2022 20:31:22 -0800 Subject: [PATCH 2/4] Configurable scroll wheel volume logic --- src/main/base/store.ts | 3 +++ src/renderer/index.js | 15 ++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main/base/store.ts b/src/main/base/store.ts index ed62a9eb..d7e76295 100644 --- a/src/main/base/store.ts +++ b/src/main/base/store.ts @@ -32,6 +32,9 @@ export class ConfigStore { "normalization": false, "spatial": false, "maxVolume": 1, + "volumePrecision": 0.1, + "volumeRoundMax": 0.9, + "volumeRoundMin": 0.1, "spatial_properties": { "presets": [], "gain": 0.8, diff --git a/src/renderer/index.js b/src/renderer/index.js index 161cae2c..72ab551f 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -3079,18 +3079,23 @@ const app = new Vue({ }) }, volumeWheel(event) { + if (this.cfg.audio.maxVolume < 1.0 && this.cfg.audio.maxVolume > 0.01) { + this.cfg.audio.volumePrecision = 0.01 + this.cfg.audio.volumeRoundMax = this.cfg.audio.maxVolume - 0.01 + this.cfg.audio.volumeRoundMin = 0.01 + } if (event.deltaY < 0) { - if (this.mk.volume < 1) { - if (this.mk.volume <= 0.9) { - this.mk.volume += 0.1 + if (this.mk.volume < this.cfg.audio.maxVolume) { + if (this.mk.volume <= this.cfg.audio.volumeRoundMax) { + this.mk.volume += this.cfg.audio.volumePrecision } else { this.mk.volume = this.cfg.audio.maxVolume } } } else if (event.deltaY > 0) { if (this.mk.volume > 0) { - if (this.mk.volume >= 0.1) { - this.mk.volume -= 0.1 + if (this.mk.volume >= this.cfg.audio.volumeRoundMin) { + this.mk.volume -= this.cfg.audio.volumePrecision } else { this.mk.volume = 0 } From b663df272b681fc8e1987397fe2e974ef4dae880 Mon Sep 17 00:00:00 2001 From: Maikiwi Date: Wed, 26 Jan 2022 20:32:09 -0800 Subject: [PATCH 3/4] closeButtonBehaviour sync + lang name refactor --- src/i18n/en_GB.jsonc | 5 +++++ src/i18n/en_US.jsonc | 6 +++--- src/i18n/ja_JP.jsonc | 4 ++++ src/i18n/zh_CN.jsonc | 8 ++++++-- src/i18n/zh_HK.jsonc | 2 +- src/i18n/zh_TW.jsonc | 8 ++++++-- 6 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/i18n/en_GB.jsonc b/src/i18n/en_GB.jsonc index 1b5fdd9f..ac64c887 100644 --- a/src/i18n/en_GB.jsonc +++ b/src/i18n/en_GB.jsonc @@ -1,4 +1,9 @@ { + // i18n Info + "i18n.languageName": "English (UK)", // name of language in native language + "i18n.languageNameEnglish": "English (UK)", // name of language in English + "i18n.category": "main", // main = real language, fun = fun community languages + "i18n.authors": "", // Authors, if you contribute to this file feel free to add your name seperated with a space "date.format": "${d} ${m}, ${y}", "home.friendsListeningTo": "Bruv's Listening To" diff --git a/src/i18n/en_US.jsonc b/src/i18n/en_US.jsonc index 19ccf56d..5984199b 100644 --- a/src/i18n/en_US.jsonc +++ b/src/i18n/en_US.jsonc @@ -1,8 +1,8 @@ { // Base File // i18n Info - "i18n.languageName": "English US", // name of language in native language - "i18n.languageNameEnglish": "English US", // name of language in English + "i18n.languageName": "English (US)", // name of language in native language + "i18n.languageNameEnglish": "English (US)", // name of language in English "i18n.category": "main", // main = real language, fun = fun community languages "i18n.authors": "@maikirakiwi", // Authors, if you contribute to this file feel free to add your name seperated with a space @@ -249,7 +249,7 @@ "settings.header.experimental": "Experimental", "settings.header.experimental.description": "Adjust the experimental settings for Cider.", "settings.option.experimental.compactUI": "Compact UI", // Toggle - "settings.option.experimental.closeButtonBehaviour": "Close Button Behaviour", + "settings.option.experimental.closeButtonBehaviour": "Close Button Behavior", "settings.option.experimental.closeButtonBehaviour.quit": "Quit Cider", "settings.option.experimental.closeButtonBehaviour.minimizeTaskbar": "Minimize to taskbar", "settings.option.experimental.closeButtonBehaviour.minimizeTray": "Minimize to system tray", diff --git a/src/i18n/ja_JP.jsonc b/src/i18n/ja_JP.jsonc index 34e4fab9..5d8d5df1 100644 --- a/src/i18n/ja_JP.jsonc +++ b/src/i18n/ja_JP.jsonc @@ -238,6 +238,10 @@ "settings.header.experimental": "試験的な機能", "settings.header.experimental.description": "開発中の実験的な機能は不完全で不安定である可能性があります", "settings.option.experimental.compactUI": "コンパクトインターフェース", // Toggle + "settings.option.experimental.closeButtonBehaviour": "「閉じる」ボタンの動作", // Dropdown + "settings.option.experimental.closeButtonBehaviour.quit": "アプリを終了する", + "settings.option.experimental.closeButtonBehaviour.minimizeTaskbar": "タスクバーに最小化する", + "settings.option.experimental.closeButtonBehaviour.minimizeTray": "トレイに最小化する", // Refer to term.disabled & term.enabled // Spatialization Menu diff --git a/src/i18n/zh_CN.jsonc b/src/i18n/zh_CN.jsonc index e55a44e0..b58fa9b9 100644 --- a/src/i18n/zh_CN.jsonc +++ b/src/i18n/zh_CN.jsonc @@ -5,8 +5,8 @@ "date.format": "${y}年${m}月${d}日", // i18n Info - "i18n.languageName": "中文(中国)", // name of language in native language - "i18n.languageNameEnglish": "Chinese (China)", // name of language in English + "i18n.languageName": "简体中文(中国)", // name of language in native language + "i18n.languageNameEnglish": "Simp. Chinese (China)", // name of language in English "i18n.category": "main", // main = real language, fun = fun community languages "i18n.authors": "@maikirakiwi", // Authors, if you contribute to this file feel free to add your name seperated with a space @@ -240,6 +240,10 @@ "settings.header.experimental": "实验性功能", "settings.header.experimental.description": "调整Cider的实验性功能", "settings.option.experimental.compactUI": "紧凑型 UI", // Toggle + "settings.option.experimental.closeButtonBehaviour": "点击关闭按钮时", + "settings.option.experimental.closeButtonBehaviour.quit": "退出 Cider", + "settings.option.experimental.closeButtonBehaviour.minimizeTaskbar": "最小化到任务栏", + "settings.option.experimental.closeButtonBehaviour.minimizeTray": "最小化到系统托盘", // Refer to term.disabled & term.enabled // Spatialization Menu diff --git a/src/i18n/zh_HK.jsonc b/src/i18n/zh_HK.jsonc index c9dcdf91..9c101b9c 100644 --- a/src/i18n/zh_HK.jsonc +++ b/src/i18n/zh_HK.jsonc @@ -1,7 +1,7 @@ { // i18n Info "i18n.languageName": "繁體中文(香港)", // name of language in native language - "i18n.languageNameEnglish": "Traditional Chinese (Hong Kong)", // name of language in English + "i18n.languageNameEnglish": "Trad. Chinese (Hong Kong)", // name of language in English "i18n.category": "main", // main = real language, fun = fun community languages "i18n.authors": "@kyw504100 @maikirakiwi", // Authors, if you contribute to this file feel free to add your name seperated with a space diff --git a/src/i18n/zh_TW.jsonc b/src/i18n/zh_TW.jsonc index b4151833..2079f12a 100644 --- a/src/i18n/zh_TW.jsonc +++ b/src/i18n/zh_TW.jsonc @@ -5,8 +5,8 @@ "date.format": "${y}年${m}月${d}日", // i18n Info - "i18n.languageName": "中文(台湾)", // name of language in native language - "i18n.languageNameEnglish": "Chinese (Taiwan)", // name of language in English + "i18n.languageName": "繁體中文(台灣)", // name of language in native language + "i18n.languageNameEnglish": "Trad. Chinese (Taiwan)", // name of language in English "i18n.category": "main", // main = real language, fun = fun community languages "i18n.authors": "@maikirakiwi", // Authors, if you contribute to this file feel free to add your name seperated with a space @@ -239,6 +239,10 @@ "settings.header.experimental": "實驗性功能", "settings.header.experimental.description": "調整 Cider 的實驗性功能", "settings.option.experimental.compactUI": "緊凑型 UI", // Toggle + "settings.option.experimental.closeButtonBehaviour": "關閉按鈕行為", // Dropdown + "settings.option.experimental.closeButtonBehaviour.quit": "退出 Cider", + "settings.option.experimental.closeButtonBehaviour.minimizeTaskbar": "最小化到工作列", + "settings.option.experimental.closeButtonBehaviour.minimizeTray": "最小化到系統匣", // Refer to term.disabled & term.enabled // Spatialization Menu From 55244b30927cdc8f1daa53611172a928cd3b3ca1 Mon Sep 17 00:00:00 2001 From: Maikiwi Date: Wed, 26 Jan 2022 21:06:00 -0800 Subject: [PATCH 4/4] generalize bottom left to be backgroundNotification --- src/renderer/index.js | 52 ++++++++++++++++++------------------- src/renderer/views/main.ejs | 8 +++--- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/renderer/index.js b/src/renderer/index.js index 72ab551f..66eb5bd6 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -171,7 +171,7 @@ const app = new Vue({ data: {}, }, library: { - downloadNotification: { + backgroundNotification: { show: false, message: "", total: 0, @@ -605,9 +605,9 @@ const app = new Vue({ // Load saved quality switch (app.cfg.audio.quality) { - case "extreme": + /** case "extreme": app.mk.bitrate = app.cfg.audio.quality = 990 - break; + break; **/ case "high": app.mk.bitrate = app.cfg.audio.quality = 256 break; @@ -1736,8 +1736,8 @@ const app = new Vue({ return } this.library.songs.downloadState = 1 - this.library.downloadNotification.show = true - this.library.downloadNotification.message = app.getLz('notification.updatingLibrarySongs') + this.library.backgroundNotification.show = true + this.library.backgroundNotification.message = app.getLz('notification.updatingLibrarySongs') function downloadChunk() { const params = { @@ -1769,10 +1769,10 @@ const app = new Vue({ function processChunk(response) { downloaded = response library = library.concat(downloaded.data) - self.library.downloadNotification.show = true - self.library.downloadNotification.message = app.getLz('notification.updatingLibrarySongs') - self.library.downloadNotification.total = downloaded.meta.total - self.library.downloadNotification.progress = library.length + self.library.backgroundNotification.show = true + self.library.backgroundNotification.message = app.getLz('notification.updatingLibrarySongs') + self.library.backgroundNotification.total = downloaded.meta.total + self.library.backgroundNotification.progress = library.length if (downloaded.meta.total == 0) { self.library.songs.downloadState = 3 @@ -1782,7 +1782,7 @@ const app = new Vue({ console.log("downloaded.next is undefined") self.library.songs.listing = library self.library.songs.downloadState = 2 - self.library.downloadNotification.show = false + self.library.backgroundNotification.show = false self.searchLibrarySongs() localStorage.setItem("librarySongs", JSON.stringify(library)) } @@ -1792,7 +1792,7 @@ const app = new Vue({ } else { self.library.songs.listing = library self.library.songs.downloadState = 2 - self.library.downloadNotification.show = false + self.library.backgroundNotification.show = false self.searchLibrarySongs() localStorage.setItem("librarySongs", JSON.stringify(library)) console.log(library) @@ -1817,8 +1817,8 @@ const app = new Vue({ return } this.library.albums.downloadState = 1 - this.library.downloadNotification.show = true - this.library.downloadNotification.message = app.getLz('notification.updatingLibraryAlbums') + this.library.backgroundNotification.show = true + this.library.backgroundNotification.message = app.getLz('notification.updatingLibraryAlbums') function downloadChunk() { self.library.albums.downloadState = 1 @@ -1849,10 +1849,10 @@ const app = new Vue({ function processChunk(response) { downloaded = response library = library.concat(downloaded.data) - self.library.downloadNotification.show = true - self.library.downloadNotification.message = app.getLz('notification.updatingLibraryAlbums') - self.library.downloadNotification.total = downloaded.meta.total - self.library.downloadNotification.progress = library.length + self.library.backgroundNotification.show = true + self.library.backgroundNotification.message = app.getLz('notification.updatingLibraryAlbums') + self.library.backgroundNotification.total = downloaded.meta.total + self.library.backgroundNotification.progress = library.length if (downloaded.meta.total == 0) { self.library.albums.downloadState = 3 return @@ -1861,7 +1861,7 @@ const app = new Vue({ console.log("downloaded.next is undefined") self.library.albums.listing = library self.library.albums.downloadState = 2 - self.library.downloadNotification.show = false + self.library.backgroundNotification.show = false localStorage.setItem("libraryAlbums", JSON.stringify(library)) self.searchLibraryAlbums(index) } @@ -1872,7 +1872,7 @@ const app = new Vue({ } else { self.library.albums.listing = library self.library.albums.downloadState = 2 - self.library.downloadNotification.show = false + self.library.backgroundNotification.show = false localStorage.setItem("libraryAlbums", JSON.stringify(library)) self.searchLibraryAlbums(index) console.log(library) @@ -1897,8 +1897,8 @@ const app = new Vue({ return } this.library.artists.downloadState = 1 - this.library.downloadNotification.show = true - this.library.downloadNotification.message = app.getLz('notification.updatingLibraryArtists') + this.library.backgroundNotification.show = true + this.library.backgroundNotification.message = app.getLz('notification.updatingLibraryArtists') function downloadChunk() { self.library.artists.downloadState = 1 @@ -1932,10 +1932,10 @@ const app = new Vue({ function processChunk(response) { downloaded = response library = library.concat(downloaded.data) - self.library.downloadNotification.show = true - self.library.downloadNotification.message = app.getLz('notification.updatingLibraryArtists') - self.library.downloadNotification.total = downloaded.meta.total - self.library.downloadNotification.progress = library.length + self.library.backgroundNotification.show = true + self.library.backgroundNotification.message = app.getLz('notification.updatingLibraryArtists') + self.library.backgroundNotification.total = downloaded.meta.total + self.library.backgroundNotification.progress = library.length if (downloaded.meta.total == 0) { self.library.albums.downloadState = 3 return @@ -1955,7 +1955,7 @@ const app = new Vue({ } else { self.library.artists.listing = library self.library.artists.downloadState = 2 - self.library.downloadNotification.show = false + self.library.backgroundNotification.show = false localStorage.setItem("libraryArtists", JSON.stringify(library)) self.searchLibraryArtists(index) console.log(library) diff --git a/src/renderer/views/main.ejs b/src/renderer/views/main.ejs index 0b2738fd..b62fe7e0 100644 --- a/src/renderer/views/main.ejs +++ b/src/renderer/views/main.ejs @@ -359,10 +359,10 @@ -
-
{{ library.downloadNotification.message }} ({{ - library.downloadNotification.progress }} / {{ library.downloadNotification.total }}) +
+
{{ library.backgroundNotification.message }} ({{ + library.backgroundNotification.progress }} / {{ library.backgroundNotification.total }})