Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 8753e7f

Browse files
committed
various, plentiful hoops to jump through to position the various modals
1 parent 6fd7275 commit 8753e7f

File tree

5 files changed

+66
-34
lines changed

5 files changed

+66
-34
lines changed

css/obBase.css

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -213,18 +213,27 @@ form {
213213
}
214214

215215
#appBar .windowControls {
216-
float: left;
216+
position: absolute;
217+
left: 8px;
218+
top: 8px;
217219
}
218220

219221
.platform-win #appBar .windowControls {
220-
position: absolute;
222+
left: auto;
221223
right: 8px;
222224
top: 8px;
223225
}
224226

227+
#appBar .title {
228+
/* since the loading spinners are centered in a manner
229+
where chat is excluded from the width, we'll follow
230+
suit here so our title is centered with the spinners */
231+
width: calc(100% -45px);
232+
}
233+
225234
#pageNav {
226235
position: fixed;
227-
top: 26px;
236+
top: 35px;
228237
-webkit-app-region: no-drag;
229238
z-index: 13;
230239
}
@@ -259,7 +268,7 @@ form {
259268
#sideBar {
260269
position: fixed;
261270
right: -183px;
262-
top: 76px;
271+
top: 85px;
263272
width:230px;
264273
background-color: #252525;
265274
border-left: 0;
@@ -1064,24 +1073,16 @@ label.fieldItem {
10641073
z-index: 1;
10651074
}
10661075

1067-
.modal:not(.modal-cover-fullscreen) {
1076+
.modal:not(.modal-fullscreen) {
10681077
width: calc(100% - 45px);
10691078
}
10701079

1071-
#ov1.chatOpen .modal:not(.modal-cover-fullscreen) {
1080+
#ov1.chatOpen .modal:not(.modal-fullscreen) {
10721081
width: calc(100% - 230px);
10731082
}
10741083

1075-
/*#ov1.chatLoaded .modal:not(.modal-cover-fullscreen) {
1076-
width: calc(100% - 45px);
1077-
}
1078-
1079-
#ov1.chatOpen .modal:not(.modal-cover-fullscreen) {
1080-
width: calc(100% - 230px);
1081-
}*/
1082-
10831084
.modal.modal-navOffset {
1084-
top: 76px;
1085+
top: 85px;
10851086
}
10861087

10871088
.modalHolder {
@@ -1482,13 +1483,13 @@ h5 {
14821483
.modal-opaque {
14831484
background-color: rgba(6, 55, 83, 0.80);
14841485
box-shadow: inset 0px -70px 112px -62px rgba(37,37,37,.9);
1485-
top: 76px;;
1486+
top: 85px;;
14861487
}
14871488
14881489
.modal-opaqueDark {
14891490
background-color: rgba(25,25,25,0.9);
14901491
box-shadow: inset 0px -70px 112px -62px rgba(37,37,37,.9);
1491-
top: 76px;
1492+
top: 85px;
14921493
}
14931494
14941495
.modal-opaque.modal-navBlock {
@@ -1497,18 +1498,22 @@ h5 {
14971498
padding-top: 100px;
14981499
}
14991500
1500-
.modal-cover-fullscreen {
1501-
top: 26px;
1501+
/*
1502+
will cover entire screen aside from the #appBar,
1503+
which should never be covered.
1504+
*/
1505+
.modal-fullscreen {
1506+
top: 35px;
15021507
}
15031508
1504-
.modal-cover-fullscreen .modal-childMain {
1509+
/*.modal-fullscreen .modal-childMain {
15051510
top: 76px;
15061511
}
15071512
1508-
.modal-cover-fullscreen.modal.modal-navOffset .modal-childMain {
1513+
.modal-fullscreen.modal.modal-navOffset .modal-childMain {
15091514
top: 35px;
15101515
}
1511-
1516+
*/
15121517
.modal-childMain {
15131518
border-radius: 3px;
15141519
background-color: #327eb8;
@@ -2066,7 +2071,8 @@ margin: auto;
20662071
top: 3px;
20672072
}
20682073

2069-
.platform-win .btn.btn-winMax .btn-win-icon {
2074+
.platform-win .btn.btn-winMax .btn-win-icon,
2075+
.platform-win .btn.btn-win.btn-winMax:hover .btn-win-icon {
20702076
display: none;
20712077
}
20722078

@@ -4366,8 +4372,19 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
43664372
z-index: 13;
43674373
}
43684374
4369-
#loadingModal .spinner-with-logo, .page-connect-modal .spinner-with-logo {
4370-
margin-top: -37px;
4375+
/*
4376+
Different types of modals (e.g. loading, page-connect-modal, server-connect) have
4377+
different dimensions (e.g. some cover chat, some cover nav bar...). We'll be
4378+
fudging the position of loading spinners and content so that if these modals
4379+
are shown in succession, there is no "jump" of the spinner / content.
4380+
*/
4381+
#loadingModal .spinner-with-logo, .page-connect-modal.server-connect .spinner-with-logo {
4382+
margin-top: 6px;
4383+
margin-left: -20px;
4384+
}
4385+
4386+
.page-connect-modal .spinner-with-logo {
4387+
margin-top: -45px;
43714388
}
43724389
43734390
#ov1 #loadingModal.hide {
@@ -4382,7 +4399,8 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
43824399
right: 0;
43834400
left: 0;
43844401
top: 50%;
4385-
margin-top: 81px;
4402+
margin-top: 117px;
4403+
margin-left: -40px;
43864404
opacity: 1;
43874405
transition: opacity 1s 5s ease;
43884406
box-sizing: border-box;
@@ -4413,7 +4431,7 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
44134431
}
44144432

44154433
#ov1 .server-connect-modal .message-bar {
4416-
top: 50px;
4434+
top: 59px;
44174435
left: 25px;
44184436
right: 25px;
44194437
z-index: 1;
@@ -4630,7 +4648,7 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
46304648
padding-top: 20px;
46314649
-webkit-app-region: no-drag;
46324650
position: relative;
4633-
top: 76px;
4651+
top: 85px;
46344652
box-sizing: border-box;
46354653
}
46364654

@@ -4691,13 +4709,17 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
46914709
left: 0;
46924710
top: 50%;
46934711
max-width: 600px;
4694-
margin-top: 90px;
4712+
margin-top: 75px;
46954713
margin-left: auto;
46964714
margin-right: auto;
46974715
text-align: center;
46984716
transition: transform 0.5s ease;
46994717
}
47004718

4719+
.page-connect-modal.server-connect .content {
4720+
transform: translate(-20px, 51px);
4721+
}
4722+
47014723
.page-connect-modal .content .btn {
47024724
float: none;
47034725
}

index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ <h2 class="ion-android-close custCol-text clickable"></h2>
4343
<div id="statusBar"></div>
4444
<div id="pageNav" class="bar navBar navBar-main custCol-secondary padding0"></div>
4545
<div id="appBar" class="top0 alignCenter custCol-secondary"></div>
46-
<!-- the loading modal must be on top of the page nav or the reload button is hidden -->
47-
<div id="loadingModal" class="modal modal-opaque js-loadingModal hide">
46+
<div id="loadingModal" class="modal modal-opaque modal-fullscreen js-loadingModal hide">
4847
<div class="spinner-with-logo fullCentered">
4948
<i class="ion-android-sync spinner fontSize30 spinner-with-logo-icon"></i>
5049
</div>

js/start.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,18 @@ var setCurrentBitCoin = function(cCode, userModel, callback) {
368368
};
369369

370370
var profileLoaded;
371+
var moo;
371372
var loadProfile = function(landingRoute, onboarded) {
373+
if (!moo) {
374+
moo = 'shoo';
375+
376+
setTimeout(() => {
377+
loadProfile();
378+
}, 2000);
379+
380+
return;
381+
}
382+
372383
var externalRoute = remote.getGlobal('externalRoute');
373384

374385
landingRoute = landingRoute && landingRoute != undefined ? landingRoute : '#';
@@ -474,7 +485,7 @@ launchOnboarding = function(guidCreating) {
474485
var activeServer = app.serverConfigs.getActive();
475486

476487
pageConnectModal = new PageConnectModal({
477-
className: 'server-connect top0',
488+
className: 'server-connect modal-fullscreen',
478489
initialState: {
479490
statusText: activeServer && activeServer.get('default') ?
480491
polyglot.t('serverConnectModal.connectingToDefault') :

js/views/serverConnectModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var __ = require('underscore'),
1313
ServerConfigsVw = require('./serverConfigsVw');
1414

1515
module.exports = BaseModal.extend({
16-
className: 'server-connect-modal modal-cover-fullscreen',
16+
className: 'server-connect-modal modal-fullscreen',
1717

1818
events: {
1919
'click .js-close': 'closeConfigForm',

main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ app.on('ready', function() {
565565
// Create the browser window.
566566
mainWindow = new browserWindow({
567567
"width": 1200,
568-
"height": 755,
568+
"height": 760,
569569
"minWidth": 1024,
570570
"minHeight": 700,
571571
"center": true,

0 commit comments

Comments
 (0)