Added macOS MenuBar (+ accel, actions, git links)

This commit is contained in:
child_duckling 2022-02-04 23:03:24 -08:00
parent 93483ad903
commit 14e17df325
4 changed files with 133 additions and 3 deletions

View file

@ -1005,7 +1005,7 @@ const app = new Vue({
})
},
copyToClipboard(str) {
if (navigator.userAgent.includes('Darwin')) {
if (navigator.userAgent.includes('Darwin') || navigator.appVersion.indexOf("Mac")!=-1) {
this.darwinShare(str)
} else {
notyf.success(app.getLz('term.share.success'))

View file

@ -92,7 +92,7 @@
{{$root.getLz('app.name')}}
</div>
</button>
<button class="usermenu-item" @click="showWebRemoteQR()">
<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>

View file

@ -0,0 +1,21 @@
<script type="text/x-template" id="remote-pair">
<div style="display:flex;width:100%;height:100%;padding-top: var(--navigationBarHeight);position:absolute;top:0;left:0;">
<webview id="foo" src="https://music.apple.com/includes/commerce/account/settings?product=music&isFullscreen=true&isModal=false" style="display:inline-flex; width:100%;"></webview>
</div>
</script>
<script>
Vue.component('apple-account-settings', {
template: '#apple-account-settings',
async mounted() {
ipcRenderer.send('get-remote-pair-url')
ipcRenderer.on('send-remote-pair-url', (event, url) => {
this.url = url
app.webview.src = url
document.getElementById('foo').src = url;
})
},
methods: {
}
});
</script>