webview pair-remote
This commit is contained in:
parent
e2cc27e2a7
commit
cf7813142e
5 changed files with 14 additions and 11 deletions
|
@ -44,6 +44,7 @@ export class BrowserWindow {
|
||||||
"pages/search",
|
"pages/search",
|
||||||
"pages/about",
|
"pages/about",
|
||||||
"pages/library-videos",
|
"pages/library-videos",
|
||||||
|
"pages/remote-pair",
|
||||||
"components/mediaitem-artwork",
|
"components/mediaitem-artwork",
|
||||||
"components/artwork-material",
|
"components/artwork-material",
|
||||||
"components/menu-panel",
|
"components/menu-panel",
|
||||||
|
@ -540,7 +541,7 @@ export class BrowserWindow {
|
||||||
|
|
||||||
ipcMain.on('get-remote-pair-url', (_event, _) => {
|
ipcMain.on('get-remote-pair-url', (_event, _) => {
|
||||||
let url = `http://${BrowserWindow.getIP()}:${this.remotePort}`;
|
let url = `http://${BrowserWindow.getIP()}:${this.remotePort}`;
|
||||||
BrowserWindow.win.webContents.send('send-remote-pair-url', url);
|
BrowserWindow.win.webContents.send('send-remote-pair-url', (`https://cider.sh/pair-remote?url=${Buffer.from(encodeURI(url)).toString('base64')}`).toString());
|
||||||
});
|
});
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
app.setUserActivity('com.CiderCollective.remote.pair', {
|
app.setUserActivity('com.CiderCollective.remote.pair', {
|
||||||
|
|
|
@ -1582,10 +1582,10 @@ const app = new Vue({
|
||||||
bb = b.attributes.genreNames[0]
|
bb = b.attributes.genreNames[0]
|
||||||
}
|
}
|
||||||
if (prefs.sort == "dateAdded"){
|
if (prefs.sort == "dateAdded"){
|
||||||
let albumida = a.relationships?.albums?.data[0]?.id ?? '1970-01-01T00:01:01Z'
|
let albumida = a.relationships?.albums?.data[0]?.id ?? '1970-01-01T00:01:01Z'
|
||||||
let albumidb = b.relationships?.albums?.data[0]?.id ?? '1970-01-01T00:01:01Z'
|
let albumidb = b.relationships?.albums?.data[0]?.id ?? '1970-01-01T00:01:01Z'
|
||||||
aa = startTime - new Date(((albumAdded.find(i => i[albumida]))?? [])[albumida] ?? '1970-01-01T00:01:01Z').getTime()
|
aa = startTime - new Date(((albumAdded.find(i => i[albumida]))?? [])[albumida] ?? '1970-01-01T00:01:01Z').getTime()
|
||||||
bb = startTime - new Date(((albumAdded.find(i => i[albumidb]))?? [])[albumidb] ?? '1970-01-01T00:01:01Z').getTime()
|
bb = startTime - new Date(((albumAdded.find(i => i[albumidb]))?? [])[albumidb] ?? '1970-01-01T00:01:01Z').getTime()
|
||||||
}
|
}
|
||||||
if (aa == null) {
|
if (aa == null) {
|
||||||
aa = ""
|
aa = ""
|
||||||
|
|
|
@ -159,5 +159,11 @@
|
||||||
<cider-applecurator :data="appleCurator"></cider-applecurator>
|
<cider-applecurator :data="appleCurator"></cider-applecurator>
|
||||||
</template>
|
</template>
|
||||||
</transition>
|
</transition>
|
||||||
|
<!-- Library - Library Videos -->
|
||||||
|
<transition name="wpfade">
|
||||||
|
<template v-if="page == 'remote-pair'">
|
||||||
|
<remote-pair></remote-pair>
|
||||||
|
</template>
|
||||||
|
</transition>
|
||||||
|
|
||||||
</div>
|
</div>
|
|
@ -93,12 +93,8 @@
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="usermenu-item" @click="appRoute('remote-pair')">
|
<button class="usermenu-item" @click="appRoute('remote-pair')">
|
||||||
<div class="row nopadding">
|
|
||||||
<div class="col nopadding">
|
|
||||||
<span class="usermenu-item-icon"><%- include("../svg/smartphone.svg") %></span>
|
<span class="usermenu-item-icon"><%- include("../svg/smartphone.svg") %></span>
|
||||||
<span class="usermenu-item-name">{{$root.getLz('action.showWebRemoteQR')}}</span>
|
<span class="usermenu-item-name">{{$root.getLz('action.showWebRemoteQR')}}</span>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</button>
|
</button>
|
||||||
<button class="usermenu-item" v-if="cfg.advanced.AudioContext"
|
<button class="usermenu-item" v-if="cfg.advanced.AudioContext"
|
||||||
@click="modals.audioSettings = true">
|
@click="modals.audioSettings = true">
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
Vue.component('apple-account-settings', {
|
Vue.component('remote-pair', {
|
||||||
template: '#apple-account-settings',
|
template: '#remote-pair',
|
||||||
async mounted() {
|
async mounted() {
|
||||||
ipcRenderer.send('get-remote-pair-url')
|
ipcRenderer.send('get-remote-pair-url')
|
||||||
ipcRenderer.on('send-remote-pair-url', (event, url) => {
|
ipcRenderer.on('send-remote-pair-url', (event, url) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue