Merge branch 'ciderapp:develop' into develop

This commit is contained in:
Gabriel Davila 2022-04-23 21:31:26 -03:00 committed by GitHub
commit 0eef2851a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 589 additions and 17 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>

After

Width:  |  Height:  |  Size: 262 B

View file

@ -290,5 +290,5 @@ let screenHeight = screen.height;
window.onerror = function (error) {
console.log(error)
bootbox.alert("Error occured: " + error)
bootbox.alert("Error occurred: " + error)
};

View file

@ -1149,6 +1149,10 @@
font-size : 2em;
}
.settings-option-body-webview {
height: 100%;
width: 100%;
}
.settings-option-body {
margin: 16px;
}

View file

@ -85,6 +85,12 @@ const Events = {
} catch (e) {
}
}
// Prevent Scrolling on spacebar
if (event.keyCode === 32 && event.target === document.body) {
event.preventDefault()
app.SpacePause()
}
});
// Hang Timer

View file

@ -12826,6 +12826,19 @@ body.no-gpu .drawertransition-leave-to {
body.no-gpu .lyric-line:hover::after {
display: none;
}
.keybindings-border {
padding-left: 15px;
padding-right: 15px;
border-style: solid;
border-radius: 5px;
border-color: #CBCBCB;
}
.keybinding-text {
width: 95px;
display: flex;
justify-content: center;
align-items: center;
}
.qrimg {
width: -webkit-fill-available;
max-block-size: -webkit-fill-available;

View file

@ -1228,6 +1228,18 @@ body[platform="darwin"] .app-chrome .app-chrome-item > .window-controls > div.cl
margin-bottom: 15px;
}
}
// Add Music Video Icons to Songs that are Music Videos
div[data-type="library-music-videos"] .info-rect .title::before,
div[data-type="musicVideo"] .info-rect .title::before {
content: "";
background-image: url(./assets/feather/video.svg);
background-size: contain;
filter:invert(0.6);
display: inline-block;
width: 20px;
height: 20px;
margin-bottom: -4px;
}
.app-chrome .app-chrome-item > .app-playback-controls .song-duration p {
font-weight: 400;
@ -3123,6 +3135,21 @@ body.no-gpu {
}
}
.keybindings-border {
padding-left: 15px;
padding-right: 15px;
border-style: solid;
border-radius: 5px;
border-color: #CBCBCB;
}
.keybinding-text {
width: 95px;
display: flex;
justify-content: center;
align-items: center;
}
.qrimg {
width: -webkit-fill-available;
max-block-size: -webkit-fill-available;

View file

@ -33,11 +33,27 @@
</div>
</template>
</div>
<div class="md-labeltext" style="opacity:0.5;">{{$root.getLz('action.cast.airplay')}}</div>
<div class="md-option-container" style="margin-top: 12px;margin-bottom: 12px;opacity:0.5;">
<div class="md-labeltext" >{{$root.getLz('action.cast.airplay')}}</div>
<div class="md-option-container" style="margin-top: 12px;margin-bottom: 12px;">
<div class="md-option-line">
<div class="md-option-segment">
{{$root.getLz('action.cast.airplay.underdevelopment')}}
{{true ? 'Homepods only for now! (NO PASSWORD PLEASE!)' : 'Please add FFmpeg location in Settings -> Advanced'}}
<!-- {{$root.getLz('action.cast.airplay.underdevelopment')}} -->
<template v-if="true" v-for="(device) in devices.airplay">
<div class="md-option-line" style="cursor: pointer" @click="setAirPlayCast(device)">
<div class="md-option-segment">
{{ device.name }}
<br>
<small>{{ device.host }}</small>
</div>
<div class="md-option-segment_auto" style="display: flex;justify-content: center;align-items: center" v-if="activeCasts.includes(device)">
Connected
</div>
<div class="md-option-segment_auto" v-else style="display: flex;justify-content: center;align-items: center">
<svg width="20" height="20" viewBox="0 0 34 34" fill="#fff" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" class="castPlayIndicator"><path d="M28.228,18.327l-16.023,8.983c-0.99,0.555 -2.205,-0.17 -2.205,-1.318l0,-17.984c0,-1.146 1.215,-1.873 2.205,-1.317l16.023,8.982c1.029,0.577 1.029,2.077 0,2.654Z" style="fill-rule:nonzero"></path></svg>
</div>
</div>
</template>
</div>
</div>
</div>
@ -84,8 +100,10 @@
let self = this;
this.scanning = true;
ipcRenderer.send('getChromeCastDevices', '');
ipcRenderer.send("getAirplayDevice","")
setTimeout(() => {
self.devices.cast = ipcRenderer.sendSync("getKnownCastDevices");
self.devices.airplay = ipcRenderer.sendSync("getKnownAirplayDevices");
self.scanning = false;
}, 2000);
console.log(this.devices);
@ -96,8 +114,13 @@
this.activeCasts.push(device);
ipcRenderer.send('performGCCast', device, "Cider", "Playing ...", "Test build", '');
},
setAirPlayCast(device) {
this.activeCasts.push(device);
ipcRenderer.send("performAirplayPCM",device.host,device.port,null,"","","","")
},
stopCasting() {
CiderAudio.stopAudio();
ipcRenderer.send('disconnectAirplay', '');
ipcRenderer.send('stopGCast', '');
this.activeCasts = [];
// vm.$forceUpdate();

View file

@ -123,6 +123,68 @@
</div>
</b-modal>
</div>
<div class="md-option-line">
<div class="md-option-segment">
{{$root.getLz('settings.option.general.keybindings')}}
</div>
<div class="md-option-segment md-option-segment_auto">
<button class="md-btn" v-b-modal.modal-2>
{{$root.getLz('settings.option.general.keybindings.open')}}
</button>
</div>
<b-modal id="modal-2" centered size="lg" v-title="$root.getLz('settings.option.general.keybindings')" ok-only>
<div class="settings-option-body">
<div class="md-option-line">
<div class="md-option-segment">
Toggle Private Session
</div>
<div class="md-option-segment md-option-segment_auto keybindings-border">
<p class="keybinding-text">{{ getCommandOrControl() }} + P</p>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Web Remote
</div>
<div class="md-option-segment md-option-segment_auto keybindings-border">
<p class="keybinding-text">{{ getCommandOrControl() }} + Shift + W</p>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Audio Settings
</div>
<div class="md-option-segment md-option-segment_auto keybindings-border">
<p class="keybinding-text">{{ getCommandOrControl() }} + Shift + A</p>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Plugin Menu
</div>
<div class="md-option-segment md-option-segment_auto keybindings-border">
<p class="keybinding-text">{{ getCommandOrControl() }} + Shift + P</p>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Cast to Devices
</div>
<div class="md-option-segment md-option-segment_auto keybindings-border">
<p class="keybinding-text">{{ getCommandOrControl() }} + Shift + C</p>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Open Developer Tools
</div>
<div class="md-option-segment md-option-segment_auto keybindings-border">
<p class="keybinding-text">{{ getCommandOrControl() }} + {{ getOptionOrShift() }} + I</p>
</div>
</div>
</div>
</b-modal>
</div>
</div>
</div>
</b-tab>
@ -853,6 +915,17 @@
</div>
<div class="settings-option-body">
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext">
<div class="md-option-segment">
FFmpeg location<br/>
<small>Restart needed to work. Required for AirPlay. (For example: C:\ffmpeg-4.4-essentials_build\bin\ffmpeg.exe)</small><br/>
<small>You can look at the internet on how to install it.</small>
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="text" v-model="app.cfg.advanced.ffmpegLocation"/>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
{{$root.getLz('settings.option.visual.plugin.github.explore')}}
@ -976,6 +1049,7 @@
</div>
</div>
</b-tab>
<!-- Connect Settings -->
<b-tab :title="$root.getLz('settings.header.connect')">
<div class="md-option-container">
<!-- Cider Connect / Linking Settings -->
@ -983,7 +1057,7 @@
<span>{{$root.getLz('settings.header.connect')}}</span>
</div>
<div class="settings-option-body">
<div class="md-option-line update-check">
<div class="md-option-line update-check" v-if="app.cfg.connectUser.auth == null">
<div class="md-option-segment">
{{$root.getLz('settings.option.connect.link_account')}}
<small>{{$root.getLz('settings.option.connect.link_account.description')}}</small>
@ -996,9 +1070,55 @@
</button>
</div>
</div>
<div v-if="app.cfg.connectUser.auth != null">
<div class="md-option-line">
<div class="md-option-segment">
{{$root.getLz('settings.option.connect.link_account')}}
<small>{{$root.getLz('settings.option.connect.link_account.description')}}</small>
<br>
</div>
<div class="md-option-segment md-option-segment_auto">
<button class="md-btn" id='settings.option.general.updateCider.check' @click="logoutCC()" style="display: flex;align-items: center;gap: 0.4em;">
<%- include("../svg/check.svg") %>
<div v>Connected</div>
</button>
</div>
</div>
<div class="md-option-header" style="margin-left: -0.55em;">
<span>{{app.cfg.connectUser.username}}</span>
<img :src="'https://cdn.discordapp.com/avatars/' + app.cfg.connectUser.id + '/' + app.cfg.connectUser.avatar + '.png?size=32'"></img>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Sync Settings
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" disabled a-v-model="app.cfg.connectUser.sync.settings" @click="app.cfg.connectUser.sync.settings = !app.cfg.connectUser.sync.settings" switch/>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Sync Themes
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" disabled a-v-model="app.cfg.connectUser.sync.themes" @click="app.cfg.connectUser.sync.themes = !app.cfg.connectUser.sync.themes" switch/>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Sync Plugins
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" disabled a-v-model="app.cfg.connectUser.sync.plugins" @click="app.cfg.connectUser.sync.plugins = !app.cfg.connectUser.sync.plugins" switch/>
</div>
</div>
</div>
</div>
</div>
</div>
</b-tab>
</b-tabs>
</div>
@ -1124,6 +1244,12 @@
}
},
methods: {
getCommandOrControl() {
return app.platform == "darwin" ? "⌘" : "Ctrl";
},
getOptionOrShift() {
return app.platform == "darwin" ? "⌥" : "Shift";
},
windowBgStyleChange() {
this.$root.getNowPlayingArtworkBG(undefined, true)
if (this.$root.cfg.visual.window_background_style == "mica") {
@ -1240,6 +1366,9 @@
authCC() {
ipcRenderer.send('cc-auth')
},
logoutCC() {
ipcRenderer.send('cc-logout')
},
}
})
</script>

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>

After

Width:  |  Height:  |  Size: 262 B