Skip to content

Commit 05c8906

Browse files
rueckstiesskangas
authored andcommitted
INT-505 add static background image while window loads
The "background image" is merely the sidebar, per iOS HIG recommendations
1 parent 7a15a55 commit 05c8906

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

src/app/index.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,23 @@
44
<title>MongoDB Compass</title>
55
<meta name="viewport" content="initial-scale=1">
66
<link rel="stylesheet/less" type="text/css" href="index.less" charset="UTF-8">
7+
<style>
8+
div#static-sidebar {
9+
position: fixed;
10+
top: 0;
11+
left: 0;
12+
width: 250px;
13+
height: 100%;
14+
background-color: #4c5259; /* @slate1 */
15+
}
16+
</style>
717
</head>
818
<body>
919
<div id="application">
1020
<div data-hook="statusbar"></div>
11-
<div data-hook="layout-container"></div>
21+
<div data-hook="layout-container">
22+
<div id="static-sidebar" class="sidebar"></div>
23+
</div>
1224
</div>
1325
<script src="index.js" charset="UTF-8" async></script>
1426
<script>

src/app/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ app.extend({
371371

372372
handleIntercomLinks();
373373
app.statusbar.show({
374-
message: 'Retrieving connection details...'
374+
message: 'Retrieving connection details...',
375+
staticSidebar: true
375376
});
376377

377378
state.connection = new Connection({

src/app/statusbar/index.jade

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#statusbar
22
.progress(data-hook='outer-bar')
33
.progress-bar.progress-bar-striped.active(data-hook='inner-bar')
4+
.sidebar(data-hook='static-sidebar')
45
ul.message-background.with-sidebar.centered(data-hook='message-container')
56
li
67
p(data-hook='message')

src/app/statusbar/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ var StatusbarView = View.extend({
2020
message: {
2121
type: 'string'
2222
},
23+
staticSidebar: {
24+
type: 'boolean',
25+
default: false
26+
},
2327
animation: {
2428
type: 'boolean',
2529
default: false
@@ -52,6 +56,10 @@ var StatusbarView = View.extend({
5256
},
5357
template: indexTemplate,
5458
bindings: {
59+
staticSidebar: {
60+
type: 'toggle',
61+
hook: 'static-sidebar'
62+
},
5563
animation: {
5664
type: 'toggle',
5765
hook: 'animation',
@@ -151,6 +159,7 @@ var StatusbarView = View.extend({
151159
hide: function(completed) {
152160
this.message = '';
153161
this.animation = false;
162+
this.staticSidebar = false;
154163
if (this.subview) {
155164
this.subview.remove();
156165
}

0 commit comments

Comments
 (0)