Skip to content

Commit 7730f80

Browse files
committed
improve error messages
1 parent 21b964f commit 7730f80

5 files changed

Lines changed: 28 additions & 1 deletion

File tree

src/angular/src/app/app.component.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ app-api {
2424
justify-content: space-between;
2525
}
2626

27+
app-account {
28+
height: 100%;
29+
display: flex;
30+
flex-direction: column;
31+
justify-content: space-between;
32+
}
33+
2734
//
2835
.app-container {
2936
height: 450px;

src/angular/src/app/pages/account/account.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ <h2 class="title-cloud" (click)="openTab(session.domain)">
1616
</div>
1717
</div>
1818
</div>
19+
<div *ngIf="sessions.length == 0" class="no-account">
20+
<div>Sorry, I'm not able to find any Mist Session in this browser...</div>
21+
<div>Please log in to your Mist Dashobard first.</div>
22+
</div>
1923

2024
<app-account-manage [ngClass]="{hidden: manageTokens == ''}" class="popup white" [sessionEvent]="enventSession.asObservable()" (closeManageTokens)="closeManageTokens()" [enventManageTokens]="enventManageTokens.asObservable()"></app-account-manage>
2125
<app-account-create [ngClass]="{hidden: createToken == ''}" class="popup transparent" [sessionEvent]="enventSession.asObservable()" (closeCreateToken)="closeCreateToken()" [enventCreateToken]="enventCreateToken.asObservable()"></app-account-create>

src/angular/src/app/pages/account/account.component.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66
flex-direction: column;
77
}
88

9+
.no-account {
10+
display: flex;
11+
flex-direction: column;
12+
justify-content: center;
13+
align-items: center;
14+
margin: 1em;
15+
text-align: center;
16+
font-weight: 200;
17+
height: 100%;
18+
}
19+
920
.popup {
1021
position: absolute;
1122
top: 50px;

src/angular/src/app/pages/account/manage/manage.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<button (click)="close()" class="close">CLOSE</button>
22
<div class="container">
3+
<div *ngIF="tokens.length == 0">
4+
<div>This account doesn't have any API Token yet...</div>
5+
<div>You can go back and create a new API Token directly from this extension!</div>
6+
</div>
37
<div class="token-container" *ngFor="let token of tokens">
48
<div class="token">
59
<table>

src/angular/src/app/pages/api/api.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<div class="content grow">
99
<h2>Page Info</h2>
1010
<div *ngIf="!org_id" class="not_mist">
11-
Information only available on Mist Cloud pages...
11+
<div>Sorry, this website does not look like a Mist Dashboard...</div>
12+
<div>If you think I'm wrong, please send me an email with the current URL.</div>
1213
</div>
1314
<div *ngIf="org_id">
1415
<div class="box-ids" *ngIf="org_id">

0 commit comments

Comments
 (0)