Commit 6ad4dc6b authored by SpinShare's avatar SpinShare

mac titlebar design fix

parent 40663128
<template> <template>
<div id="app" tabindex="-1" v-on:keydown.esc="closeOverlays()"> <div id="app" :class="platform != 'darwin' ? 'app' : 'app-darwin'" tabindex="-1" v-on:keydown.esc="closeOverlays()">
<WindowTitleBar /> <WindowTitleBar />
<main> <main>
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
}, },
data: function() { data: function() {
return { return {
platform: "win32",
downloadQueue: [], downloadQueue: [],
finishedQueue: [], finishedQueue: [],
failedQueue: [], failedQueue: [],
...@@ -58,6 +59,8 @@ ...@@ -58,6 +59,8 @@
} }
}, },
mounted: function() { mounted: function() {
this.$data.platform = process.platform;
document.addEventListener('auxclick', function(e) { document.addEventListener('auxclick', function(e) {
e.preventDefault(); e.preventDefault();
}); });
...@@ -238,6 +241,9 @@ ...@@ -238,6 +241,9 @@
right: 0px; right: 0px;
overflow-y: scroll; overflow-y: scroll;
} }
.app-darwin main {
top: 40px;
}
button, .button { button, .button {
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
font-size: 12px; font-size: 12px;
......
...@@ -63,10 +63,12 @@ function createWindow () { ...@@ -63,10 +63,12 @@ function createWindow () {
win = new BrowserWindow({ win = new BrowserWindow({
title: "SpinSha.re", title: "SpinSha.re",
width: 1350, width: 1350,
height: 730, height: 740,
minHeight: 730, minHeight: 740,
minWidth: 1350, minWidth: 1350,
frame: false, frame: false,
backgroundColor: '#212629',
titleBarStyle: 'hiddenInset',
webPreferences: { webPreferences: {
nodeIntegration: true nodeIntegration: true
} }
......
...@@ -113,4 +113,7 @@ ...@@ -113,4 +113,7 @@
} }
} }
} }
.app-darwin aside {
top: 40px;
}
</style> </style>
...@@ -99,4 +99,7 @@ ...@@ -99,4 +99,7 @@
} }
} }
} }
.app-darwin .delete-overlay {
top: 40px;
}
</style> </style>
...@@ -33,14 +33,6 @@ ...@@ -33,14 +33,6 @@
props: [ props: [
'downloadQueue' 'downloadQueue'
], ],
mounted: function() {
ipcRenderer.on("overlays-close", () => {
this.close();
});
ipcRenderer.on('downloadProgress', (event, data) => {
this.$data.downloadProgress = data
});
},
data: function() { data: function() {
return { return {
showUpdateOverlay: false, showUpdateOverlay: false,
...@@ -49,6 +41,14 @@ ...@@ -49,6 +41,14 @@
downloadProgress: 0 downloadProgress: 0
} }
}, },
mounted: function() {
ipcRenderer.on("overlays-close", () => {
this.close();
});
ipcRenderer.on('downloadProgress', (event, data) => {
this.$data.downloadProgress = data
});
},
methods: { methods: {
close() { close() {
this.$root.$emit('hideDownloadOverlay'); this.$root.$emit('hideDownloadOverlay');
...@@ -150,4 +150,7 @@ ...@@ -150,4 +150,7 @@
} }
} }
} }
.app-darwin .download-overlay {
top: 40px;
}
</style> </style>
...@@ -130,4 +130,7 @@ ...@@ -130,4 +130,7 @@
} }
} }
} }
.app-darwin .play-overlay {
top: 40px;
}
</style> </style>
...@@ -107,4 +107,7 @@ ...@@ -107,4 +107,7 @@
} }
} }
} }
.app-darwin .update-overlay {
top: 40px;
}
</style> </style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="back" v-on:click="NavigateBack()"><i class="mdi mdi-arrow-left"></i></div> <div class="back" v-on:click="NavigateBack()"><i class="mdi mdi-arrow-left"></i></div>
<div class="text">SpinShare</div> <div class="text">SpinShare</div>
</div> </div>
<div class="actions-windows" v-if="platform != 'darwin'"> <div class="actions" v-if="platform != 'darwin'">
<div class="action" v-on:click="WindowMinimize()"><i class="mdi mdi-window-minimize"></i></div> <div class="action" v-on:click="WindowMinimize()"><i class="mdi mdi-window-minimize"></i></div>
<div class="action" v-on:click="WindowMaximize()" v-if="!isMaximized"><i class="mdi mdi-window-maximize"></i></div> <div class="action" v-on:click="WindowMaximize()" v-if="!isMaximized"><i class="mdi mdi-window-maximize"></i></div>
<div class="action" v-on:click="WindowMaximize()" v-if="isMaximized"><i class="mdi mdi-window-restore"></i></div> <div class="action" v-on:click="WindowMaximize()" v-if="isMaximized"><i class="mdi mdi-window-restore"></i></div>
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
} }
}, },
mounted: function() { mounted: function() {
this.$data.system = process.platform; this.$data.platform = process.platform;
if(remote.BrowserWindow.getFocusedWindow()) { if(remote.BrowserWindow.getFocusedWindow()) {
this.$data.isMaximized = remote.BrowserWindow.getFocusedWindow().isMaximized(); this.$data.isMaximized = remote.BrowserWindow.getFocusedWindow().isMaximized();
} }
...@@ -94,7 +95,7 @@ ...@@ -94,7 +95,7 @@
} }
} }
& .actions-windows { & .actions {
display: grid; display: grid;
grid-template-columns: 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr;
...@@ -115,4 +116,15 @@ ...@@ -115,4 +116,15 @@
} }
} }
} }
.app-darwin .window-title-bar {
height: 40px;
& .title {
padding-left: 80px;
& .back {
height: 40px;
}
}
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment