Merge branch 'ciderapp:develop' into develop

This commit is contained in:
Gabriel Davila 2022-04-30 19:04:33 -03:00 committed by GitHub
commit 54eb414285
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 258 additions and 104 deletions

View file

@ -1,18 +1,21 @@
version: 2.1
orbs: # adds orbs to your configuration
jira: circleci/jira@1.0.5 # invokes the Jira orb, making its commands accessible
branches:
only:
- main
- develop
jobs:
build:
working_directory: ~/Cider
executors:
cider-ci:
docker:
- image: circleci/node:16
working_directory: ~/Cider
orbs: # adds orbs to your configuration
jira: circleci/jira@1.0.5 # invokes the Jira orb, making its commands accessible
# The jobs for this project
jobs:
prepare-build:
executor: cider-ci
steps:
- checkout
- run: ls -la
- run:
name: Set App Version
command: echo "export APP_VERSION=$(grep '"version":.*' package.json | cut -d '"' -f 4 | head -1)" >> $BASH_ENV
@ -32,37 +35,111 @@ jobs:
paths:
- ~/.cache/yarn
- run:
name: Install system build dependencies
name: TypeScript Compile
command: yarn build
- persist_to_workspace:
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
# taken to be the root directory of the workspace.
root: .
# Must be relative path from root
paths:
- node_modules
- build
- resources
- yarn.lock
- package.json
- winget.json # winget.json is a file that is generated by the winget package manager
- LICENSE
- license.txt
build-windows:
executor: cider-ci
steps:
- attach_workspace:
at: ~/Cider
- run:
name: Install Windows System Build Dependencies
command: |
sudo apt-get update -y
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt-get install -y dpkg fakeroot wine64
sudo dpkg --add-architecture i386
sudo apt-get update -y
sudo apt-get install -y wine32
sudo apt install -y gh
- run:
name: Fix Versioning and Add Channel
command: yarn circle:script
- run:
name: TypeScript Compile
command: yarn build
- run:
name: Generate Builds (Linux)
command: yarn electron-builder -l -p never
post-steps:
- jira/notify
- run:
name: Generate Builds (Windows)
command: yarn electron-builder -w --x64 -p never
post-steps:
- jira/notify
- persist_to_workspace:
root: .
paths:
- dist/*.exe
- dist/latest.yml
build-linux:
executor: cider-ci
steps:
- attach_workspace:
at: ~/Cider
- run:
name: Fix Versioning and Add Channel
command: yarn circle:script
- run:
name: Generate Builds (Linux)
command: yarn electron-builder -l -p never
post-steps:
- jira/notify
- persist_to_workspace:
root: .
paths:
- dist/*.deb
- dist/*.AppImage
- dist/*.snap
- dist/latest-linux.yml
build-winget:
executor: cider-ci
steps:
- attach_workspace:
at: ~/Cider
- run:
name: Install Windows System Build Dependencies
command: |
sudo apt-get update -y
sudo apt-get install -y dpkg fakeroot wine64
sudo dpkg --add-architecture i386
sudo apt-get update -y
sudo apt-get install -y wine32
- run:
name: Fix Versioning and Add Channel
command: yarn circle:script
- run:
name: Generate Builds (Winget)
command: yarn electron-builder --win -c winget.json -p never
post-steps:
- jira/notify
- persist_to_workspace:
root: .
paths:
- dist/*.exe
# - dist/*.yml
release:
executor: cider-ci
steps:
- attach_workspace:
at: ~/Cider/
- run:
name: Installing GitHub Command Line Interface
command: |
sudo apt-get update -y
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt-get update -y
sudo apt install -y gh
- run:
name: Move Build Files
command: |
@ -79,3 +156,23 @@ jobs:
name: Publish Release
command: |
gh release create "v${APP_VERSION}.${CIRCLE_BUILD_NUM}" --title "Cider Version ${APP_VERSION} - Build ${CIRCLE_BUILD_NUM} (${CIRCLE_BRANCH})" --generate-notes -R ciderapp/cider-releases ~/Cider/dist/artifacts/*.deb ~/Cider/dist/artifacts/*.AppImage ~/Cider/dist/artifacts/*.snap ~/Cider/dist/artifacts/*.exe ~/Cider/dist/artifacts/*.yml ~/Cider/dist/artifacts/*.blockmap
# Orchestrate our job run sequence
workflows:
build_and_release:
jobs:
- prepare-build
- build-windows:
requires:
- prepare-build
- build-linux:
requires:
- prepare-build
- build-winget:
requires:
- prepare-build
- release:
requires:
- build-windows
- build-linux
- build-winget

View file

@ -73,7 +73,6 @@
"term.viewAs": "Megjelenítés",
"term.viewAs.coverArt": "Borító",
"term.viewAs.list": "Lista",
"term.dynamic": "Dinamikus",
"term.size": "Méret",
"term.size.normal": "Normál",
"term.size.compact": "Kompakt",
@ -407,6 +406,7 @@
"settings.option.lyrics.enableMusixmatchKaraoke": "Karaoke mód bekapcsolása (Csak MusixMatch)",
"settings.option.lyrics.musixmatchPreferredLanguage": "MusixMatch fordítás nyelve",
"settings.option.lyrics.enableYoutubeLyrics": "YouTube dalszövegek engedélyezése a zenei videóknál",
"settings.option.lyrics.enableQQLyrics": "QQLyrics dalszövegek engedélyezése",
"settings.header.connectivity": "Csatlakozások",
"settings.header.connectivity.description": "A Cider csatlakozás beállításainak módosítása.",
"settings.option.connectivity.playbackNotifications": "Lejátszási értesítések",

View file

@ -215,6 +215,10 @@
"settings.option.general.resumebehavior.locally.description": "Cider 將還原你在這台電腦上的最後一次操作。",
"settings.option.general.resumebehavior.history": "歷史",
"settings.option.general.resumebehavior.history.description": "Cider 將跨裝置將你的整個 Apple Music 歷史記錄中的最後一首歌曲排隊入列。",
"settings.option.general.resumetabs": "啟動時打開的選項",
"settings.option.general.resumetabs.description": "你可以選擇啟動 Cider 時要預設打開的左側選項欄。",
"settings.option.general.resumetabs.dynamic": "動態",
"settings.option.general.resumetabs.dynamic.description": "Cider 將打開你上次停留的左側選項欄。",
"settings.option.general.language.main": "語言",
"settings.option.general.language.fun": "特殊語言",
"settings.option.general.language.unsorted": "未分類",
@ -345,8 +349,8 @@
"settings.option.connectivity.discordRPC.hideButtons": "隱藏 Discord 動態上的按鈕",
"settings.option.connectivity.discordRPC.detailsFormat": "詳細資訊格式",
"settings.option.connectivity.discordRPC.stateFormat": "狀態格式",
"settings.option.connectivity.lastfmScrobble": "Last.FM Scrobbling 記錄",
"settings.option.connectivity.lastfmScrobble.delay": "Last.FM Scrobble 延遲 (%)",
"settings.option.connectivity.lastfmScrobble": "Last.FM 音樂記錄",
"settings.option.connectivity.lastfmScrobble.delay": "Last.FM 歌曲追蹤延遲 (%)",
"settings.option.connectivity.lastfmScrobble.nowPlaying": "開啟 Last.FM 正在聆聽",
"settings.option.connectivity.lastfmScrobble.removeFeatured": "從歌名中移除客串藝人 (Last.FM)",
"settings.option.connectivity.lastfmScrobble.filterLoop": "不記錄單曲循環 (Last.FM)",

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>

After

Width:  |  Height:  |  Size: 379 B

View file

@ -371,6 +371,12 @@
filter: contrast(0);
background-repeat: no-repeat;
}
.heart-icon {
height: 18px;
width: 39px;
filter: contrast(0);
background-repeat: no-repeat;
}
@keyframes load-bar {
10% {
box-shadow: inset 0 -4px 0;

View file

@ -456,6 +456,13 @@
background-repeat: no-repeat;
}
.heart-icon {
height: 18px;
width: 39px;
filter: contrast(0);
background-repeat: no-repeat;
}
/* CSS.gg
*/
@keyframes load-bar {

View file

@ -1579,7 +1579,7 @@ const app = new Vue({
}
route = route.replace(/#/g, "")
if (app.cfg.general.resumeTabs.tab == "dynamic") {
if (route == "home" || route == "library-songs" || route == "library-albums" || route == "library-artists" || route == "library-videos" || route == "podcasts") {
if (route == "home" || route == "listen_now" || route == "browse" || route == "radio" || route == "library-songs" || route == "library-albums" || route == "library-artists" || route == "library-videos" || route == "podcasts") {
app.cfg.general.resumeTabs.dynamicData = route
} else {
app.cfg.general.resumeTabs.dynamicData = "home"
@ -2817,7 +2817,7 @@ const app = new Vue({
});
app.lyrics = preLrc;
}
if (lrcfile != null && lrcfile != '' && lang != "disabled") {
if (lrcfile != null && lrcfile != '') {
// load translation
getMXMTrans(id, lang, token);
} else {

View file

@ -7936,6 +7936,12 @@ fieldset:disabled .btn {
filter: contrast(0);
background-repeat: no-repeat;
}
.cd-mediaitem-list-item .heart-icon {
height: 18px;
width: 39px;
filter: contrast(0);
background-repeat: no-repeat;
}
@keyframes load-bar {
10% {
box-shadow: inset 0 -4px 0;

View file

@ -1207,6 +1207,14 @@ body[platform="darwin"] .app-chrome .app-chrome-item > .window-controls > div.cl
background-repeat: no-repeat;
margin-left: 3px;
}
.heart-icon {
height: 9px;
width: 13px;
filter: contrast(0);
background-repeat: no-repeat;
margin-left: 3px;
}
}
.lossless-icon {

View file

@ -65,6 +65,9 @@
</template>
</div>
</div>
<div class="heart-icon" v-if="isLoved">
<div class="svg-icon" :style="{'--url': 'url(./assets/feather/heart-fill.svg)'}"></div>
</div>
<div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'"></div>
<template v-if="showMetaData == true" @dblclick="route()">
<div class="metainfo">
@ -98,7 +101,8 @@
displayDuration: true,
addClasses: {},
itemId: 0,
isLibrary: false
isLibrary: false,
isLoved: null
}
},
props: {
@ -121,6 +125,9 @@
} else {
this.itemId = this.item.id;
}
if (this.item.attributes.playParams) {
this.getHeartStatus();
}
let duration = this.item.attributes.durationInMillis ?? 0
if (duration == 0 || !this.showDuration) {
this.displayDuration = false
@ -323,6 +330,7 @@
"hidden": false,
"disabled": true,
"action": function () {
self.isLoved = true
app.love(self.item)
}
},
@ -333,6 +341,7 @@
"name": this.app.getLz('action.unlove'),
"hidden": true,
"action": function () {
self.isLoved = false
app.unlove(self.item)
}
},
@ -499,6 +508,19 @@
visibilityChanged: function (isVisible, entry) {
this.isVisible = isVisible
},
async getHeartStatus() {
try {
await app.getRating(this.item).then(res => {
if (res == 1) {
this.isLoved = true
} else {
this.isLoved = false
}
})
} catch (err) {
console.log(err)
}
},
addToLibrary() {
let item = this.item
if (item.attributes.playParams.id) {

View file

@ -90,6 +90,9 @@
<select class="md-select" style="width:180px;"
v-model="$root.cfg.general.resumeTabs.tab">
<option value="home">{{$root.getLz('home.title')}}</option>
<option value="listen_now">{{$root.getLz('term.listenNow')}}</option>
<option value="browse">{{$root.getLz('term.browse')}}</option>
<option value="radio">{{$root.getLz('term.radio')}}</option>
<option value="library-recentlyadded">{{$root.getLz('term.recentlyAdded')}}</option>
<option value="library-songs">{{$root.getLz('term.songs')}}</option>
<option value="library-albums">{{$root.getLz('term.albums')}}</option>