diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index d18e0e23..5160afba 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -35,7 +35,7 @@ body: - **OS**: Ubuntu 20.04 - **App Version** and/or **Commit ID**: 1.0.0 c9d43be - To find app version, go to the About page. + To find app version, Cider Menu -> About value: | - OS: - App Version and/or Commit ID: diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index be849760..a9a2fa0f 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -13,7 +13,7 @@ name: "macOS build" on: push: - branches: [ develop ] + branches: [ main ] paths-ignore: - 'README.md' - 'SECURITY.md' diff --git a/package.json b/package.json index c79b2acb..f972008b 100644 --- a/package.json +++ b/package.json @@ -178,6 +178,15 @@ "isRelocatable": false, "overwriteAction": "upgrade" }, + "snap": { + "slots": [ + { + "mpris": { + "interface": "mpris" + } + } + ] + }, "dmg": { "background": "./resources/bg.png", "icon": "resources/icons/icon.ico" diff --git a/resources/version.sh b/resources/version.sh new file mode 100755 index 00000000..5daefd13 --- /dev/null +++ b/resources/version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +LATESTSHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs) +COMMITSINCESTABLE=$(git rev-list $LATESTSHA..HEAD --count) +VERSION=$(grep '"version":.*' package.json | cut -d '"' -f 4 | head -1) +echo +NEWVERSION=${VERSION/-/.}.$COMMITSINCESTABLE +npm version $NEWVERSION \ No newline at end of file diff --git a/src/i18n/README.md b/src/i18n/README.md index 28375d07..2f4bfba9 100644 --- a/src/i18n/README.md +++ b/src/i18n/README.md @@ -375,7 +375,7 @@ Update 12/05/2022 22:50 UTC * `settings.option.audio.dbspl.display`: Added for `en_US`, * `settings.option.audio.dbspl.description`: Added for `en_US`, * `settings.option.audio.dbfs.calibration`: Added for `en_US`, -* `settings.option.audio.dbfs.description`: Added for `en_US` +* `settings.option.audio.dbfs.description`: Added for `en_US`, Update 14/05/2022 02:00 UTC @@ -386,4 +386,11 @@ Update 14/05/2022 02:00 UTC * `settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.E68_2`: Added for `en_US`, * `settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.E168_1`: Added for `en_US`, * `settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.Z3600`: Added for `en_US`, -* `settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.Z8500`: Added for `en_US` +* `settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.Z8500`: Added for `en_US`, + + +Update 18/05/2022 14:20 UTC + +* `action.tray.playpause`: Added for `en_US`, +* `action.tray.next`: Added for `en_US`, +* `action.tray.previous`: Added for `en_US`, \ No newline at end of file diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index 90f586e5..001e15cf 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -257,6 +257,10 @@ "action.tray.minimize": "Minimize to Tray", "action.tray.quit": "Quit", "action.tray.show": "Show Cider", + "action.tray.playpause": "Play/Pause", + "action.tray.next": "Next", + "action.tray.previous": "Previous", + "action.tray.listento": "Listen To:", "action.update": "Update", "action.install": "Install", "action.copy": "Copy", diff --git a/src/i18n/source/en_US.json b/src/i18n/source/en_US.json index 2ee5fc57..b1eabc49 100644 --- a/src/i18n/source/en_US.json +++ b/src/i18n/source/en_US.json @@ -257,6 +257,9 @@ "action.tray.minimize": "Minimize to Tray", "action.tray.quit": "Quit", "action.tray.show": "Show Cider", + "action.tray.playpause": "Play/Pause", + "action.tray.next": "Next", + "action.tray.previous": "Previous", "action.update": "Update", "action.install": "Install", "action.copy": "Copy", diff --git a/src/i18n/zh_TW.json b/src/i18n/zh_TW.json index ba0f64ef..39230026 100644 --- a/src/i18n/zh_TW.json +++ b/src/i18n/zh_TW.json @@ -233,6 +233,12 @@ "settings.option.general.customizeSidebar": "自訂側邊欄的功能", "settings.option.general.customizeSidebar.customize": "自訂", "settings.option.general.keybindings": "快捷操作鍵", + "settings.option.general.keybindings.pressCombination" : "按下兩個按鍵來更新操作綁定。" , + "settings.option.general.keybindings.pressEscape" : "按 Esc 鍵返回。" , + "settings.notyf.general.keybindings.update.success" : "快捷鍵更新成功" , + "settings.prompt.general.keybindings.update.success" : "快捷鍵已更新,請按「OK」重新啟動 Cider 軟體。" , + "settings.option.general.themeUpdateNotification": "自動檢查主題更新", + "settings.option.general.showLovedTracksInline": "顯示點擊喜愛的歌曲", "settings.option.general.keybindings.open": "開啟", "settings.notyf.updateCider.update-not-available": "沒有可用的更新", "settings.notyf.updateCider.update-downloaded": "更新已成功下載,重啟後進行更新", @@ -310,13 +316,13 @@ "settings.header.visual.hardwareAcceleration.webGPU": "WebGPU", "settings.header.visual.theme": "主題", "settings.option.visual.theme.github.download": "從 GitHub 網址安裝", - "settings.option.visual.theme.github.openfolder": "打開主題存放位置", + "settings.option.visual.theme.github.openfolder": "開啟主題存放位置", "settings.option.visual.theme.github.explore": "探索 GitHub 上的主題", "settings.prompt.visual.theme.github.URL": "輸入你要安裝的主題網址", "settings.option.visual.theme.manageStyles": "管理主題", "settings.option.visual.theme.uninstall": "移除", "settings.option.visual.theme.viewInfo": "查看資訊", - "settings.option.visual.theme.github.available": "可用", + "settings.option.visual.theme.github.available": "可使用", "settings.option.visual.theme.github.applied": "已套用", "settings.notyf.visual.theme.install.success": "主題成功安裝", "settings.notyf.visual.theme.install.error": "主題安裝失敗", @@ -354,6 +360,7 @@ "settings.option.connectivity.discordRPC.clientName": "應用程式名稱", "settings.option.connectivity.discordRPC.clearOnPause": "暫停時清除 Discord 動態", "settings.option.connectivity.discordRPC.hideButtons": "隱藏 Discord 動態上的按鈕", + "settings.option.connectivity.discordRPC.hideTimestamp": "隱藏 Discord 動態的時間戳", "settings.option.connectivity.discordRPC.detailsFormat": "詳細資訊格式", "settings.option.connectivity.discordRPC.stateFormat": "狀態格式", "settings.option.connectivity.lastfmScrobble": "Last.FM 音樂記錄", diff --git a/src/main/base/app.ts b/src/main/base/app.ts index 9ae6b6a9..dad4d4a9 100644 --- a/src/main/base/app.ts +++ b/src/main/base/app.ts @@ -259,7 +259,6 @@ export class AppEvents { height: 20 }), } - this.tray = new Tray(process.platform === 'win32' ? icons.win32 : (process.platform === 'darwin' ? icons.darwin : icons.linux)) this.tray.setToolTip(app.getName()) this.setTray(false) @@ -298,7 +297,63 @@ export class AppEvents { private setTray(visible: boolean = utils.getWindow().isVisible()) { this.i18n = utils.getLocale(utils.getStoreValue('general.language')) + const ciderIcon = nativeImage.createFromPath(path.join(__dirname, `../../resources/icons/icon.png`)).resize({ + width: 24, + height: 24 + }) + const menu = Menu.buildFromTemplate([ + + { + label: app.getName(), + enabled: false, + icon: ciderIcon, + + }, + + {type: 'separator'}, + + /* For now only idea i dont know if posible to implement + { + label: this.i18n['action.tray.listento'], + enabled: false, + }, + + { + visible: visible, + label: 'track info', + enabled: false, + }, + + {type: 'separator'}, + */ + + { + visible: (visible === false), + label: this.i18n['action.tray.playpause'], + click: () => { + utils.getWindow().webContents.executeJavaScript('MusicKitInterop.playPause()') + } + }, + + { + visible: (visible === false), + label: this.i18n['action.tray.next'], + click: () => { + utils.getWindow().webContents.executeJavaScript(`MusicKitInterop.next()`) + } + }, + + { + visible: (visible === false), + label: this.i18n['action.tray.previous'], + click: () => { + utils.getWindow().webContents.executeJavaScript(`MusicKitInterop.previous()`) + } + }, + + {type: 'separator'}, + { label: (visible ? this.i18n['action.tray.minimize'] : `${this.i18n['action.tray.show']}`), click: () => { diff --git a/src/main/plugins/menubar.ts b/src/main/plugins/menubar.ts index f0f7aad3..5b9f47a1 100644 --- a/src/main/plugins/menubar.ts +++ b/src/main/plugins/menubar.ts @@ -35,24 +35,37 @@ export default class Thumbar { { label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.settings'), accelerator: utils.getStoreValue("general.keybindings.settings").join('+'), - click: () => utils.getWindow().webContents.executeJavaScript(`app.appRoute('settings')`), + click: () => utils.getWindow().webContents.executeJavaScript(`app.appRoute('settings')`) }, - {type: 'separator'}, - { - label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.about'), - click: () => utils.getWindow().webContents.executeJavaScript(`app.appRoute('about')`) - }, - {type: 'separator'}, - {role: 'quit', label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.quit')}, + ...(this.isMac ? [ + {type: 'separator'}, + {role: 'services'}, + {type: 'separator'}, + {role: 'hide'}, + {role: 'hideOthers'}, + {role: 'unhide'}, + {type: 'separator'}, + {role: 'quit'} + ] : []), ] }, { label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.view'), submenu: [ + {role: 'reload'}, + {role: 'forceReload'}, + {role: 'toggleDevTools'}, + {type: 'separator'}, + {role: 'resetZoom'}, + {role: 'zoomIn'}, + {role: 'zoomOut'}, + {type: 'separator'}, + {role: 'togglefullscreen'}, + {type: 'separator'}, { - label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.search'), + label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.search'), accelerator: utils.getStoreValue("general.keybindings.search").join('+'), - click: () => utils.getWindow().webContents.executeJavaScript(`app.appRoute('search')`) + click: () => utils.getWindow().webContents.executeJavaScript('app.focusSearch()') }, {type:'separator'}, { @@ -85,13 +98,9 @@ export default class Thumbar { label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.artists'), accelerator: utils.getStoreValue("general.keybindings.artists").join('+'), click: () => utils.getWindow().webContents.executeJavaScript(`app.appRoute('library-artists')`) - }, - {type: 'separator'}, - ...(this.isMac ? [ - ]: []), - ], + }, + ] }, - { label: utils.getLocale(utils.getStoreValue('general.language'), 'menubar.options.window'), submenu: [ diff --git a/src/main/plugins/thumbar.ts b/src/main/plugins/thumbar.ts index 5f504878..99470e32 100644 --- a/src/main/plugins/thumbar.ts +++ b/src/main/plugins/thumbar.ts @@ -93,7 +93,7 @@ export default class Thumbar { /** * Runs on plugin load (Currently run on application start) */ - constructor(utils: { getApp: () => any; }) { + constructor(a: { getApp: () => any; }) { this._app = utils.getApp(); console.debug(`[Plugin][${this.name}] Loading Complete.`); } diff --git a/src/renderer/less/elements.css b/src/renderer/less/elements.css index 0c54721e..29990353 100644 --- a/src/renderer/less/elements.css +++ b/src/renderer/less/elements.css @@ -254,6 +254,9 @@ height: 32px; flex: 0 0 auto; } +.cd-queue-item:hover { + background: var(--selected); +} .cd-queue-item.selected { background: var(--selected); } diff --git a/src/renderer/less/elements.less b/src/renderer/less/elements.less index 10939150..41b79d9f 100644 --- a/src/renderer/less/elements.less +++ b/src/renderer/less/elements.less @@ -306,6 +306,10 @@ flex: 0 0 auto; } + &:hover { + background: var(--selected); + } + &.selected { background: var(--selected); } diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index 52ccdcdb..fb9f722a 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -2184,6 +2184,13 @@ const app = new Vue({ sortArtists() } }, + focusSearch() { + app.appRoute('search') + const search = document.getElementsByClassName("search-input") + if (search.length > 0) { + search[0].focus() + } + }, getSidebarItemClass(page) { if (this.page == page) { return ["active"] diff --git a/src/renderer/style.less b/src/renderer/style.less index 6248ded5..4aea6127 100644 --- a/src/renderer/style.less +++ b/src/renderer/style.less @@ -1605,6 +1605,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { margin: 10px; margin-left: 5%; margin-right: 0px; + overflow-wrap: break-word; } .lyric-line.active .verse { diff --git a/src/renderer/views/components/queue.ejs b/src/renderer/views/components/queue.ejs index 052467cc..597f6b6f 100644 --- a/src/renderer/views/components/queue.ejs +++ b/src/renderer/views/components/queue.ejs @@ -31,7 +31,7 @@