Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it sexier in macOS #336

Merged
merged 12 commits into from
Mar 29, 2017
1 change: 1 addition & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ app.on('ready', function () {

var mainWindow = createWindow('main', {
width: 1000,
titleBarStyle: 'hidden',
height: 600
});

Expand Down
8 changes: 8 additions & 0 deletions src/scripts/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,20 @@ class SideBar extends EventEmitter {
document.body.classList.add('hide-server-list');
localStorage.setItem('sidebar-closed', 'true');
this.emit('hide');
if (process.platform === 'darwin') {
document.querySelectorAll('webview').forEach(
(webviewObj) => { if (webviewObj.insertCSS) { webviewObj.insertCSS('aside.side-nav{margin-top:15px;overflow:hidden; transition: margin .5s ease-in-out; }'); } });
}
}

show () {
document.body.classList.remove('hide-server-list');
localStorage.setItem('sidebar-closed', 'false');
this.emit('show');
if (process.platform === 'darwin') {
document.querySelectorAll('webview').forEach(
(webviewObj) => { if (webviewObj.insertCSS) { webviewObj.insertCSS('aside.side-nav{margin-top:0; overflow:hidden; transition: margin .5s ease-in-out; }'); } });
}
}

toggle () {
Expand Down
1 change: 1 addition & 0 deletions src/stylesheets/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ input[type='password'] {
padding: 45px 0 35px;
z-index: 10;
position: relative;
-webkit-app-region: no-drag;
}
.share {
border-radius: 50%;
Expand Down
10 changes: 9 additions & 1 deletion src/stylesheets/start-page.less
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ div.server-list {
bottom: 0;
height: 100%;
width: 80px;
padding-top: 5px;
padding-top: 22px;
background-color: #0F354C;
z-index: 100000;
-webkit-app-region: drag;
}

div.server-list ul {
Expand Down Expand Up @@ -175,6 +176,7 @@ div.server-list li:before {

.hide-server-list webview {
left: 0;
transition: left 0.5s ease-in-out;
}

@-webkit-keyframes wrong {
Expand Down Expand Up @@ -238,4 +240,10 @@ webview.active {

.landing-page {
z-index: 1;
-webkit-app-region: drag;
}

body,
html {
-webkit-app-region: drag;
}