git ssb

10+

Matt McKegg / patchwork



Commit c0704603564bdacfa6c4af8906d51d6bd589ecd3

move progress notifier to top bar (over Patchwork logo)

Matt McKegg committed on 6/28/2017, 2:39:42 AM
Parent: f8bdee2684f2d8c6b83777a938fbac68a863bbf3

Files changed

main-window.jschanged
modules/app/html/progress-notifier.jschanged
styles/loading.mcsschanged
styles/main-window.mcsschanged
main-window.jsView
@@ -86,9 +86,12 @@
8686 tab('Public', '/public'),
8787 tab('Private', '/private'),
8888 tab('Gatherings', '/gatherings')
8989 ]),
90- h('span.appTitle', ['Patchwork']),
90+ h('span.appTitle', [
91+ h('span.title', 'Patchwork'),
92+ api.app.html.progressNotifier()
93+ ]),
9194 h('span', [ api.app.html.search(api.app.navigate) ]),
9295 h('span.nav', [
9396 tab('Profile', id),
9497 tab('Mentions', '/mentions')
@@ -101,9 +104,8 @@
101104 h('a.ignore', {'ev-click': latestUpdate.ignore}, 'X')
102105 ])
103106 ])
104107 ),
105- api.app.html.progressNotifier(),
106108 views.html
107109 ])
108110
109111 catchLinks(container, (href, external) => {
modules/app/html/progress-notifier.jsView
@@ -43,13 +43,13 @@
4343 return h('div.info', { hidden }, [
4444 h('div.status', [
4545 when(displaying, h('Loading -small', [
4646 when(pendingMigration,
47- ['Upgrading database', h('progress', { style: {'margin-left': '10px'}, min: 0, max: 1, value: migrationProgress })],
47+ [h('span.info', 'Upgrading database'), h('progress', { style: {'margin-left': '10px'}, min: 0, max: 1, value: migrationProgress })],
4848 when(computed(replicateProgress.incompleteFeeds, (v) => v > 5),
49- ['Downloading new messages', h('progress', { style: {'margin-left': '10px'}, min: 0, max: 1, value: downloadProgress })],
49+ [h('span.info', 'Downloading new messages'), h('progress', { style: {'margin-left': '10px'}, min: 0, max: 1, value: downloadProgress })],
5050 when(pending, [
51- ['Indexing database', h('progress', { style: {'margin-left': '10px'}, min: 0, max: 1, value: indexProgress })]
51+ [h('span.info', 'Indexing database'), h('progress', { style: {'margin-left': '10px'}, min: 0, max: 1, value: indexProgress })]
5252 ], 'Scuttling...')
5353 )
5454 )
5555 ]))
styles/loading.mcssView
@@ -2,9 +2,16 @@
22 height: 25%
33 display: flex
44 align-items: center
55 justify-content: center
6+ whitespace: no-wrap
67
8+ span.info {
9+ overflow: hidden
10+ white-space: nowrap
11+ text-overflow: ellipsis
12+ }
13+
714 -inline {
815 height: 16px
916 width: 16px
1017 display: inline-block
styles/main-window.mcssView
@@ -129,8 +129,29 @@
129129 color: #757575;
130130 letter-spacing: 1px;
131131 font-weight: 200;
132132 -webkit-app-region: drag;
133+ position: relative
134+
135+ div.info {
136+ display: block
137+ position: absolute;
138+ top: 0;
139+ bottom: 0;
140+ left: 0;
141+ right: 0;
142+ background: white;
143+ margin-top: -3px;
144+ opacity: 1;
145+ transition: opacity 0.1s;
146+ max-height: 25px;
147+ padding: 0 10px;
148+ font-size: 13px;
149+ letter-spacing: 0;
150+ [hidden] {
151+ opacity: 0
152+ }
153+ }
133154 }
134155 }
135156
136157 div.info {

Built with git-ssb-web