Merge remote-tracking branch 'origin/main'

This commit is contained in:
Core 2022-09-04 17:18:09 +01:00
commit 5abb57f041
No known key found for this signature in database
GPG key ID: 2AB8327FBA02D1C0
9 changed files with 177 additions and 28 deletions

View file

@ -8,7 +8,7 @@ executors:
orbs: # Add orbs to your configuration
jira: circleci/jira@1.0.5 # invokes the Jira orb, making its commands accessible
gh: circleci/github-cli@2.1
# The jobs for this project
jobs:
prepare-build:
@ -111,14 +111,7 @@ jobs:
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
- gh/install
- run:
name: Move Build Files
command: |
@ -143,9 +136,11 @@ jobs:
if [[ "${APP_VERSION}" = *"beta"* ]]; then
echo $'**Beta Release**\nA full changelog is unavailable, but you can view the branch comparison [here](https://github.com/ciderapp/cider/compare/stable...main).\nThese builds are considered bleeding edge, expect bugs and please do not use this as a representation of the fu ll app.\nOur full support disclaimer can be found [here](https://docs.cider.sh/support/disclaimer#support-nightly-beta-releases).' > release-notes.md
gh release create "v${APP_VERSION}" --prerelease --title "Cider Version ${APP_VERSION} (${CIRCLE_BRANCH})" --notes-file release-notes.md -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
curl http://129.146.42.180/api/v1/github/sync/main
else
echo $'**Stable Release**\nA full changelog is unavailable, but you can view the branch comparison [here](https://github.com/ciderapp/cider/compare/stable...main).\nThese are the most stable builds we can provide. If you experience any issues, please report them [here](https://github.com/ciderapp/cider/issues/new).\nOur full support disclaimer can be found [here](https://docs.cider.sh/support/disclaimer#support-releases).' > release-notes.md
gh release create "v${APP_VERSION}" --title "Cider Version ${APP_VERSION} (${CIRCLE_BRANCH})" --notes-file release-notes.md -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
curl http://129.146.42.180/api/v1/github/sync/stable
fi;
# Orchestrate our job run sequence

View file

@ -125,3 +125,16 @@ jobs:
repo_token: ${{ secrets.RELEASE_TOKEN }}
file: dist/Cider-${{ env.APP_VERSION }}-universal.pkg
tag: v${{ env.APP_VERSION }}
- name: Trigger Bot Sync (main)
uses: indiesdev/curl@v1.1
with:
url: http://129.146.42.180/api/v1/github/sync/main
log-response: true
timeout: 60000
- name: Trigger Bot Sync (stable)
uses: indiesdev/curl@v1.1
with:
url: http://129.146.42.180/api/v1/github/sync/stable
log-response: true
timeout: 60000

View file

@ -232,7 +232,7 @@ export class AppEvents {
startArgs.forEach((arg) => {
console.log(arg);
if (arg.includes("cider://")) {
if (arg.includes("cider://") || arg.includes("itms://") || arg.includes("itmss://") || arg.includes("music://") || arg.includes("musics://")) {
console.debug("[InstanceHandler] (second-instance) Link detected with " + arg);
this.LinkHandler(arg);
} else if (arg.includes("--force-quit")) {

View file

@ -334,6 +334,15 @@
width: 42px;
height: 42px;
flex: 0 0 auto;
&.circle {
border-radius: 50%;
.mediaitem-artwork {
border-radius: 50%;
}
img {
border-radius: 50%;
}
}
}
&:hover {
@ -349,6 +358,11 @@
color: #eee;
}
&.hintactive {
background: var(--keyColor);
border-radius: 6px;
}
.queue-info {
justify-content: center;
display: flex;
@ -392,6 +406,18 @@
}
}
.search-hints .cd-queue-item {
&:hover {
background: var(--selected);
border-radius: 6px;
}
&:active {
background: var(--selected-click);
color: #eee;
border-radius: 6px;
}
}
/* horizontal media scroller */
.cd-hmedia-scroller {
&::-webkit-scrollbar-thumb {

View file

@ -1903,8 +1903,21 @@ const app = new Vue({
this.search.hints = [];
return;
}
let hints = await (await app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/search/hints?term=${this.search.term}`)).data.results;
this.search.hints = hints ? hints.terms : [];
let hints = await (
await app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/search/suggestions?term=${this.search.term}`, {
"fields[albums]": "artwork,name,playParams,url,artistName,id",
"fields[artists]": "url,name,artwork,id",
"fields[songs]": "artwork,name,playParams,url,artistName,id",
kinds: "terms,topResults",
l: this.mklang,
"limit[results:terms]": 5,
"limit[results:topResults]": 5,
"omit[resource]": "autos",
platform: "web",
types: "activities,albums,artists,editorial-items,music-movies,playlists,record-labels,songs,stations",
})
).data.results;
this.search.hints = hints ? hints.suggestions : [];
},
getSongProgress() {
if (this.playerLCD.userInteraction) {
@ -3890,15 +3903,22 @@ const app = new Vue({
if (e.keyCode == "40") {
if (this.search.hints.length - 1 < this.search.cursor + 1) return;
this.search.cursor++;
this.search.term = this.search.hints[this.search.cursor];
let item = this.search.hints[this.search.cursor];
this.search.term = item.content ? item.content?.attributes?.name ?? "" : item.displayTerm;
} else if (e.keyCode == "38") {
if (this.search.cursor == 0) return;
this.search.cursor--;
this.search.term = this.search.hints[this.search.cursor];
let item = this.search.hints[this.search.cursor];
this.search.term = item.content ? item.content?.attributes?.name ?? "" : item.displayTerm;
}
},
async searchQuery(term = this.search.term) {
let self = this;
if (typeof term === "object") {
this.routeView(term);
this.search.term = "";
return;
}
if (term == "") {
return;
}

View file

@ -277,10 +277,10 @@
<div class="app-chrome-item search">
<div class="search-input-container">
<div class="search-input--icon"></div>
<input type="search" spellcheck="false" @click="$root.appRoute('search');"
<input type="search" spellcheck="false" @click="$root.appRoute('search');search.showHints = true"
@focus="search.showHints = true"
@blur="setTimeout(()=>{search.showHints = false}, 300)"
v-on:keyup.enter="searchQuery();search.showHints = false;search.cursor = -1" @change="$root.appRoute('search');"
v-on:keyup.enter="searchQuery(search.hints[search.cursor].content ?? search.hints[search.cursor].searchTerm);search.showHints = false;search.cursor = -1" @change="$root.appRoute('search');"
v-on:keyup="searchCursor"
@input="getSearchHints()"
:placeholder="$root.getLz('term.search') + '...'" v-model="search.term" ref="searchInput"
@ -288,10 +288,40 @@
<div class="search-hints-container" v-if="search.showHints && search.hints.length != 0">
<div class="search-hints">
<button class="search-hint text-overflow-elipsis" :class="{active: (search.cursor == index)}" v-for="(hint, index) in search.hints"
@click="search.term = hint;search.showHints = false;searchQuery(hint);search.cursor = -1">
{{ hint }}
<button class="search-hint text-overflow-elipsis" :class="{active: (search.cursor == index)}" v-for="(hint, index) in search.hints.filter((a) => {return a.content == null})"
@click="search.term = hint.searchTerm;search.showHints = false;searchQuery(hint.searchTerm);search.cursor = -1">
{{ hint.displayTerm }}
</button>
<template v-for="(item, position) in search.hints.filter((a) => {return a.content != null})">
<div class="cd-queue-item" @click="search.showHints = false;routeView(item.content);search.cursor = -1"
:class="{'hintactive': (search.cursor == position + search.hints.filter((a) => {return a.content == null}).length)}">
<div class="row">
<div class="col-auto cider-flex-center">
<div class="artwork" :class="{'circle': item.content.type == 'artists'}">
<mediaitem-artwork
:url="item.content.attributes.artwork ? item.content.attributes.artwork.url : ''"
:size="32"></mediaitem-artwork>
</div>
</div>
<div class="col queue-info">
<div class="queue-title text-overflow-elipsis">{{ item.content.attributes.name }}
</div>
<div class="queue-subtitle text-overflow-elipsis">{{
item.content.attributes.artistName }}
</div>
</div>
<div class="queue-explicit-icon cider-flex-center"
v-if="item.content.attributes.contentRating == 'explicit'">
<div class="explicit-icon"></div>
</div>
<!-- <div class="col queue-duration-info">
<div class="queue-duration cider-flex-center">
{{convertTimeToString(item.content.attributes.durationInMillis)}}
</div>
</div> -->
</div>
</div>
</template>
</div>
</div>
</div>

View file

@ -494,6 +494,10 @@
"name": `${app.getLz('action.share')} (song.link)`,
"action": async function() {
let item = self.item
if(item.type.startsWith('library-')) {
self.item.attributes.url = self.item.relationships.catalog.data[0].attributes.url
item.attributes.url = item.relationships.catalog.data[0].attributes.url
}
if (!item.attributes.url) {
if (item.type.includes("library")) {
let result = (await app.mk.api.v3.music(`/v1/me/library/${item.type.replace("library-", '')}/${item.id}/catalog`)).data.data[0]

View file

@ -7,10 +7,10 @@
<input
type="search"
spellcheck="false"
@click="$root.appRoute('search');"
@click="$root.appRoute('search');$root.search.showHints = true"
@focus="$root.search.showHints = true"
@blur="$root.setTimeout(()=>{$root.search.showHints = false}, 300)"
v-on:keyup.enter="$root.searchQuery();$root.search.showHints = false;$root.search.cursor = -1"
v-on:keyup.enter="$root.searchQuery($root.search.hints[$root.search.cursor].content ?? $root.search.hints[$root.search.cursor].searchTerm);$root.search.showHints = false;$root.search.cursor = -1"
v-on:keyup="$root.searchCursor"
@change="$root.appRoute('search');"
@input="$root.getSearchHints()"
@ -27,11 +27,41 @@
<div class="search-hints">
<button
class="search-hint text-overflow-elipsis"
v-for="hint in $root.search.hints"
@click="$root.search.term = hint;$root.search.showHints = false;$root.searchQuery(hint);$root.search.cursor = -1"
v-for="(hint, index) in $root.search.hints.filter((a) => {return a.content == null})" :class="{active: ($root.search.cursor == index)}"
@click="$root.search.term = hint.searchTerm;$root.search.showHints = false;$root.searchQuery(hint.searchTerm);$root.search.cursor = -1"
>
{{ hint }}
{{ hint.displayTerm }}
</button>
<template v-for="(item, position) in $root.search.hints.filter((a) => {return a.content != null})">
<div class="cd-queue-item" @click="$root.search.showHints = false;$root.routeView(item.content);$root.search.cursor = -1"
:class="{'hintactive': ($root.search.cursor == position + $root.search.hints.filter((a) => {return a.content == null}).length)}">
<div class="row">
<div class="col-auto cider-flex-center">
<div class="artwork" :class="{'circle': item.content.type == 'artists'}">
<mediaitem-artwork
:url="item.content.attributes.artwork ? item.content.attributes.artwork.url : ''"
:size="32"></mediaitem-artwork>
</div>
</div>
<div class="col queue-info">
<div class="queue-title text-overflow-elipsis">{{ item.content.attributes.name }}
</div>
<div class="queue-subtitle text-overflow-elipsis">{{
item.content.attributes.artistName }}
</div>
</div>
<div class="queue-explicit-icon cider-flex-center"
v-if="item.content.attributes.contentRating == 'explicit'">
<div class="explicit-icon"></div>
</div>
<!-- <div class="col queue-duration-info">
<div class="queue-duration cider-flex-center">
{{convertTimeToString(item.content.attributes.durationInMillis)}}
</div>
</div> -->
</div>
</div>
</template>
</div>
</div>
</div>

View file

@ -4,17 +4,48 @@
<div class="search-input--icon"></div>
<input type="search" spellcheck="false" @focus="$root.search.showHints = true"
@blur="$root.setTimeout(()=>{$root.search.showHints = false}, 300)"
v-on:keyup.enter="$root.searchQuery();$root.search.showHints = false" @input="$root.getSearchHints()"
v-on:keyup.enter="$root.searchQuery($root.search.hints[$root.search.cursor].content ?? $root.search.hints[$root.search.cursor].searchTerm);$root.search.showHints = false" @input="$root.getSearchHints()"
:placeholder="$root.getLz('term.search') + '...'" v-model="$root.search.term"
class="search-input" />
<div class="search-hints-container" v-if="$root.search.showHints && $root.search.hints.length != 0">
<div class="search-hints">
<button class="search-hint text-overflow-elipsis" v-for="hint in $root.search.hints"
@click="$root.search.term = hint;$root.search.showHints = false;$root.searchQuery(hint)">
{{ hint }}
<button class="search-hint text-overflow-elipsis" v-for="(hint, index) in $root.search.hints.filter((a) => {return a.content == null})" :class="{active: ($root.search.cursor == index)}"
@click="$root.search.term = hint.searchTerm;$root.search.showHints = false;$root.searchQuery(hint.searchTerm)">
{{ hint.displayTerm }}
</button>
<template v-for="(item, position) in $root.search.hints.filter((a) => {return a.content != null})">
<div class="cd-queue-item" @click="$root.search.showHints = false;$root.routeView(item.content);$root.search.cursor = -1"
:class="{'hintactive': ($root.search.cursor == position + $root.search.hints.filter((a) => {return a.content == null}).length)}">
<div class="row">
<div class="col-auto cider-flex-center">
<div class="artwork" :class="{'circle': item.content.type == 'artists'}">
<mediaitem-artwork
:url="item.content.attributes.artwork ? item.content.attributes.artwork.url : ''"
:size="32"></mediaitem-artwork>
</div>
</div>
<div class="col queue-info">
<div class="queue-title text-overflow-elipsis">{{ item.content.attributes.name }}
</div>
<div class="queue-subtitle text-overflow-elipsis">{{
item.content.attributes.artistName }}
</div>
</div>
<div class="queue-explicit-icon cider-flex-center"
v-if="item.content.attributes.contentRating == 'explicit'">
<div class="explicit-icon"></div>
</div>
<!-- <div class="col queue-duration-info">
<div class="queue-duration cider-flex-center">
{{convertTimeToString(item.content.attributes.durationInMillis)}}
</div>
</div> -->
</div>
</div>
</template>
</div>
</div>
</div>
<div class="btn-group searchToggle">