Skip to content

Commit 5ebdc91

Browse files
authored
Merge pull request #1391 from mohitsuman/gh-1390
Css update for version update on welcome page
2 parents ed33666 + be47d50 commit 5ebdc91

5 files changed

Lines changed: 121 additions & 120 deletions

File tree

browser/app.css

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -288,36 +288,13 @@ footer {
288288
margin-right: 13px;
289289
}
290290

291-
/* .spinner {
292-
display: inline-block;
293-
opacity: 0;
294-
width: 0;
295-
296-
-webkit-transition: opacity 0.25s, width 0.25s;
297-
-moz-transition: opacity 0.25s, width 0.25s;
298-
-o-transition: opacity 0.25s, width 0.25s;
299-
transition: opacity 0.25s, width 0.25s;
300-
} */
301-
302291
.spinner.spinner-bgcolour {
303-
/* animation: rotation 600ms infinite linear;
304-
border-bottom: 4px solid rgba(3, 3, 3, 0.25);
305-
border-left: 4px solid rgba(3, 3, 3, 0.25);
306-
border-right: 4px solid rgba(3, 3, 3, 0.25);
307-
border-radius: 100%; */
308292
border-top: 4px solid #00a8e1;
309293
border-width: 5px;
310294
height: 29px;
311295
width: 29px;
312-
/* margin: 0 auto;
313-
position: relative; */
314-
}
315296

316-
/* .spinner.spinner-lg {
317-
border-width: 15px;
318-
height: 120px;
319-
width: 120px;
320-
} */
297+
}
321298

322299
.has-spinner.active {
323300
cursor:progress;
@@ -409,17 +386,30 @@ footer {
409386

410387
.footer-version {
411388
position: absolute;
412-
bottom: 16px;
389+
/* bottom: 16px; */
413390
left: 16px;
414-
font-size: 15px;
391+
margin-left: 65px;
392+
font-weight: 600;
393+
padding-top: 2px;
415394
}
416395

417396
.footer-version-new {
418397
color: #c00;
398+
font-weight: 400;
399+
}
400+
401+
.footer-version-check {
402+
margin-right: 4px;
403+
top: 2px;
419404
}
420405

421406
.footer-version-current {
422-
color: green;
407+
color: #1b96d5;
408+
}
409+
410+
.footer-version-field {
411+
font-weight: 700;
412+
font-size: 13px;
423413
}
424414

425415
.footer-border{
@@ -1056,4 +1046,34 @@ footer {
10561046
border-radius: 1px;
10571047
text-transform: uppercase;
10581048
}
1049+
1050+
.effect-icon {
1051+
transition: all 0.2s linear 0s;
1052+
}
1053+
1054+
.effect-icon:before {
1055+
content: "\f019";
1056+
font-family: FontAwesome;
1057+
font-size: 15px;
1058+
position: absolute;
1059+
display: flex;
1060+
align-items: center;
1061+
justify-content: center;
1062+
right: -30px;
1063+
top: 10px;
1064+
opacity: 0;
1065+
height: 100%;
1066+
width: 40px;
1067+
transition: all 0.2s linear 0s;
1068+
}
1069+
1070+
.effect-icon:hover {
1071+
text-indent: -20px;
1072+
}
1073+
1074+
.effect-icon:hover::before {
1075+
opacity: 1;
1076+
text-indent: 0px;
1077+
}
1078+
10591079
}

browser/pages/welcome/controller.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class WelcomeController {
1515

1616
this.URL_DM_DEVSUITE_INFO = 'https://developers.redhat.com/download-manager/rest/available/devsuite/?nv=1';
1717
this.URL_DEVSUITE_DOWNLOAD_PAGE = 'https://developers.redhat.com/products/devsuite/download/';
18-
this.URL_DEVELOPER_PROGRAM_SITE = 'https://developers.redhat.com';
1918
}
2019

2120
next() {
@@ -30,9 +29,9 @@ class WelcomeController {
3029
};
3130

3231
return this.http(req).then((data)=>{
33-
let version = this.scope.version;
32+
let appVersion = this.scope.version;
3433
let devsuiteVersion = data.data[0].featuredArtifact.versionName;
35-
let numericVersion = version.split('-')[0];
34+
let numericVersion = appVersion.split('-')[0];
3635
if (Version.GT(devsuiteVersion, numericVersion)) {
3736
this.scope.newVersion = devsuiteVersion;
3837
this.scope.status = 'New';
@@ -54,9 +53,6 @@ class WelcomeController {
5453
this.electron.remote.getCurrentWindow().close();
5554
}
5655

57-
openDevSuiteOverview() {
58-
this.electron.shell.openExternal(this.URL_DEVELOPER_PROGRAM_SITE);
59-
}
6056
}
6157

6258
WelcomeController.$inject = ['$state', '$scope', 'electron', 'request'];

browser/pages/welcome/welcome.html

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,19 @@
4848
</main>
4949

5050
<footer id="footer-navigation" class="no-background-color">
51-
5251
<div class="form-group pull-right form-buttons">
53-
<div ng-show="status=='New'">
54-
<button type="button" class="btn btn-primary btn-lg version-check" ng-click="welcomeCtrl.downloadLatestVersion()">
55-
<span>Download latest version</span>
56-
</button>
57-
</div>
58-
<button id="welcomeNextButton" type="button" class="go-btn footer-btns btn btn-primary btn-lg" form="welcomeForm"
59-
ng-click="welcomeCtrl.next()" autofocus>
52+
<button id="welcomeNextButton" type="button" class="go-btn footer-btns btn btn-primary btn-lg" form="welcomeForm" ng-click="welcomeCtrl.next()" autofocus>
6053
<span id="welcome-form-btn-text">Next</span>
6154
</button>
6255
</div>
63-
<span class="footer-version">Version: {{version}}
64-
<span ng-show="status=='Checking'">(Checking for Development Suite Installer updates)</span>
65-
<span class="footer-version-new" ng-show="status=='New'">(New Development Suite Installer {{newVersion}} is available)</span>
66-
<span class="footer-version-current" ng-show="status=='Current' || status=='Error'">(Development Suite Installer is up to date)</span>
56+
<span class="footer-version">
57+
<span class="footer-version-field">Version: {{version}}</span>
58+
<div ng-if="status=='Checking'">
59+
<div class="spinner spinner-xs inline footer-version-check"></div><span>Checking for new version</span>
60+
</div>
61+
<div class="footer-version-new" ng-if="status=='New'">Update Available: {{newVersion}}&nbsp;
62+
<span class="effect-icon pointer" ng-click="welcomeCtrl.downloadLatestVersion()">| Download</span>
63+
</div>
64+
<div class="footer-version-current" ng-if="status=='Current' || status=='Error'">Installer is up to date.</div>
6765
</span>
6866
</footer>

package-lock.json

Lines changed: 62 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/pages/welcome/controller-test.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ describe('WelcomeController', function() {
4141
sandbox.restore();
4242
});
4343

44-
it('openDevSuiteOverview opens external browser with devsuite page', function() {
45-
sandbox.stub(electron.shell, 'openExternal');
46-
welcomeController.openDevSuiteOverview();
47-
expect(electron.shell.openExternal).calledOnce;
48-
});
49-
5044
describe('next', function() {
5145
beforeEach(function() {
5246
sandbox.stub(welcomeController.router, 'go');

0 commit comments

Comments
 (0)