diff --git a/app/main/index.js b/app/main/index.js index 7f9755a0..4e94980c 100644 --- a/app/main/index.js +++ b/app/main/index.js @@ -54,10 +54,14 @@ const targetURL = function () { if (data.domain === undefined) { return staticURL; } + // TODO: Use new main window + return 'file://' + path.join(__dirname, '../renderer', 'main.html'); return data.domain; }; function serverError(targetURL) { + // TODO: disabled + return; if (targetURL.indexOf('localhost:') < 0 && data.domain) { const req = https.request(targetURL + '/static/audio/zulip.ogg', res => { console.log('Server StatusCode:', res.statusCode); @@ -184,11 +188,12 @@ function createMainWindow() { icon: iconPath(), minWidth: 600, minHeight: 400, + titleBarStyle: 'hidden-inset', webPreferences: { preload: path.join(__dirname, '../renderer/js/preload.js'), plugins: true, allowDisplayingInsecureContent: true, - nodeIntegration: false + nodeIntegration: true }, show: false }); diff --git a/app/renderer/css/servermanager.css b/app/renderer/css/servermanager.css new file mode 100644 index 00000000..0d02f994 --- /dev/null +++ b/app/renderer/css/servermanager.css @@ -0,0 +1,86 @@ +html, body { + height: 100%; + margin: 0; +} + +#content { + display: flex; + height: 100%; +} + +#sidebar { + background: #222c31; + width: 88px; + padding: 40px 0 20px 0; + justify-content: space-between; + display: flex; + flex-direction: column; + -webkit-app-region: drag; +} + +#webview { + width: 100%; +} + +.action-button { + display: flex; + flex-direction: column; + align-items: center; + padding: 10px; +} + +.action-button i { + color: #6c8592; + font-size: 28px; +} + + +#servers-container { + display: flex; + align-items: center; + flex-direction: column; +} + +.server-button { + position: relative; + margin: 5px 0 5px 6px; +} + +.server-button.active::before{ + content: ""; + background: #43bba6; + border-radius: 3px; + width: 6px; + position: absolute; + height: 6px; + left: -12px; + top: 25px; +} + +.server-button .server-name{ + background: #a4d3c4; + border-radius: 22px; + width: 44px; + height: 44px; + position: relative; + margin: 5px 0; + z-index: 11; + line-height: 44px; + font-size: 24px; + font-family: sans-serif; + color: #194a2b; + text-align: center; + overflow: hidden; + +} + +.server-button.active .server-ring { + background: #43bba6; + border-radius: 24px; + width: 48px; + height: 48px; + position: absolute; + left: -2px; + top: 3px; + z-index: 10; +} \ No newline at end of file diff --git a/app/renderer/main.html b/app/renderer/main.html new file mode 100644 index 00000000..be79f075 --- /dev/null +++ b/app/renderer/main.html @@ -0,0 +1,38 @@ + + + + + + Zulip + + + + +
+ + > + + +
+ + + diff --git a/package.json b/package.json index 54f5360e..fc9be18b 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "win": { "target": "nsis", "icon": "build/icon.ico" - }, + }, "nsis": { "perMachine": true, "oneClick": false