Skip to content

Commit cd93c9b

Browse files
feat: Update UI components with icon enhancements and styling improvements
1 parent 0d693f2 commit cd93c9b

13 files changed

Lines changed: 96 additions & 42 deletions

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@angular/platform-browser": "21.0.3",
2727
"@angular/platform-browser-dynamic": "21.0.3",
2828
"@angular/router": "21.0.3",
29+
"@tabler/icons-webfont": "3.35.0",
2930
"@tauri-apps/api": "2.9.1",
3031
"@tauri-apps/plugin-shell": "2.3.3",
3132
"rxjs": "7.8.2",

src/app/home/home.component.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,26 @@ <h1>GitHub Security Alerts Monitor</h1>
33

44
<div class="actions-section">
55
<button (click)="fetchAlerts()" [disabled]="loading" class="btn-refresh">
6-
{{ loading ? "Loading..." : "🌀 Refresh" }}
6+
<i *ngIf="loading" class="ti ti-loader spinning"></i>
7+
<span *ngIf="!loading"><i class="ti ti-refresh"></i> Refresh</span>
78
</button>
89
</div>
910

10-
<div *ngIf="error" class="error-message"> {{ error }}</div>
11+
<div *ngIf="error" class="error-message"><i class="ti ti-x"></i> {{ error }}</div>
1112

1213
<div *ngIf="alerts" class="alerts-section">
1314
<div class="summary">
14-
<span class="icon">{{ getAlertIcon() }}</span>
15+
<i [class]="'icon ' + getAlertIcon()"></i>
1516
<h2>Total Alerts: {{ alerts.total_alerts }}</h2>
1617
</div>
1718

1819
<div class="repos-list">
1920
<div *ngFor="let repo of alerts.repos" class="repo-item">
2021
<span class="repo-name">{{ repo.name }}</span>
2122
<span class="alert-badge" [ngClass]="{ 'has-alerts': repo.alerts > 0 }">
22-
{{ repo.alerts === 0 ? "✓ Safe" : repo.alerts + " alert(s)" }}
23+
<i *ngIf="repo.alerts === 0" class="ti ti-check"></i>
24+
<span *ngIf="repo.alerts === 0">Safe</span>
25+
<span *ngIf="repo.alerts > 0">{{ repo.alerts }} alert(s)</span>
2326
</span>
2427
</div>
2528
</div>

src/app/home/home.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export class HomeComponent implements OnInit {
4343
}
4444

4545
getAlertIcon(): string {
46-
if (!this.alerts) return '🔵';
47-
return this.alerts.total_alerts === 0 ? '🟢' : '🔴';
46+
if (!this.alerts) return 'ti ti-circle-filled';
47+
return this.alerts.total_alerts === 0 ? 'ti ti-circle-check-filled' : 'ti ti-alert-circle-filled';
4848
}
4949

5050
ngOnDestroy() {

src/app/shared/components/alerts-list/alerts-list.component.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<div class="alerts-list">
77
<!-- Loading spinner -->
88
<div class="loading-spinner" *ngIf="alertsLoading">
9-
<span class="spinning">🔄</span> Loading alerts...
9+
<i class="ti ti-refresh spinning"></i> Loading alerts...
1010
</div>
1111

1212
<!-- No repos selected -->
1313
<div class="empty-state" *ngIf="!alertsLoading && (!alerts || alerts.repos.length === 0)">
14-
<div class="empty-icon">📦</div>
14+
<i class="ti ti-package empty-icon"></i>
1515
<p>No repositories selected</p>
1616
<button class="primary-btn" (click)="onShowRepos()">
1717
Select Repositories
@@ -25,7 +25,7 @@
2525
[class.safe]="alerts.total_alerts === 0"
2626
[class.danger]="alerts.total_alerts > 0"
2727
>
28-
<span class="summary-icon">{{ getAlertIcon() }}</span>
28+
<i [class]="'summary-icon ' + getAlertIcon()"></i>
2929
<span class="summary-text" *ngIf="alerts.total_alerts === 0"
3030
>All repositories are secure</span
3131
>
@@ -42,7 +42,7 @@
4242
[class.has-alerts]="repo.alerts > 0"
4343
>
4444
<div class="repo-info">
45-
<span class="repo-icon">📦</span>
45+
<i class="ti ti-package repo-icon"></i>
4646
<span class="repo-name">{{ repo.name.split("/")[1] }}</span>
4747
<span class="repo-org">{{ repo.name.split("/")[0] }}</span>
4848
</div>
@@ -51,7 +51,8 @@
5151
[class.safe]="repo.alerts === 0"
5252
[class.danger]="repo.alerts > 0"
5353
>
54-
{{ repo.alerts === 0 ? "✓" : repo.alerts }}
54+
<i *ngIf="repo.alerts === 0" class="ti ti-check"></i>
55+
<span *ngIf="repo.alerts > 0">{{ repo.alerts }}</span>
5556
</div>
5657
</div>
5758
</div>

src/app/shared/components/alerts-list/alerts-list.component.scss

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ $border-color: #2a2a4a;
5252
justify-content: center;
5353
gap: 8px;
5454
margin-top: 10px;
55-
color: $text-secondary;
55+
color: $accent-color;
56+
57+
i {
58+
font-size: 24px;
59+
}
5660

5761
.spinning {
5862
display: inline-block;
@@ -87,7 +91,7 @@ $border-color: #2a2a4a;
8791
}
8892

8993
.summary-icon {
90-
font-size: 20px;
94+
font-size: 28px;
9195
}
9296

9397
.summary-text {
@@ -124,8 +128,9 @@ $border-color: #2a2a4a;
124128
overflow: hidden;
125129

126130
.repo-icon {
127-
font-size: 16px;
131+
font-size: 20px;
128132
flex-shrink: 0;
133+
color: #4a90d9;
129134
}
130135

131136
.repo-name {
@@ -148,6 +153,13 @@ $border-color: #2a2a4a;
148153
font-size: 12px;
149154
font-weight: 600;
150155
flex-shrink: 0;
156+
display: flex;
157+
align-items: center;
158+
gap: 4px;
159+
160+
i {
161+
font-size: 14px;
162+
}
151163

152164
&.safe {
153165
background: rgba($success-color, 0.15);
@@ -172,8 +184,9 @@ $border-color: #2a2a4a;
172184
color: $text-secondary;
173185

174186
.empty-icon {
175-
font-size: 48px;
176-
opacity: 0.5;
187+
font-size: 56px;
188+
opacity: 0.7;
189+
color: #4a90d9;
177190
}
178191

179192
p {

src/app/shared/components/alerts-list/alerts-list.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export class AlertsListComponent {
1515
@Output() showRepos = new EventEmitter<void>();
1616

1717
getAlertIcon(): string {
18-
if (!this.alerts) return '🔵';
19-
return this.alerts.total_alerts === 0 ? '' : '';
18+
if (!this.alerts) return 'ti ti-circle-filled';
19+
return this.alerts.total_alerts === 0 ? 'ti ti-check' : 'ti ti-alert-triangle';
2020
}
2121

2222
onShowRepos(): void {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="header">
22
<div class="header-left" (click)="showAlerts()" style="cursor: pointer;">
3-
<span class="logo">🔒</span>
3+
<i class="ti ti-lock logo"></i>
44
<span class="title">GitHub Alerts</span>
55
</div>
66
<div class="header-right" *ngIf="authenticated">
@@ -10,23 +10,23 @@
1010
[disabled]="alertsLoading"
1111
title="Refresh"
1212
>
13-
<span [class.spinning]="alertsLoading">🔄</span>
13+
<i class="ti ti-refresh" [class.spinning]="alertsLoading"></i>
1414
</button>
1515
<button
1616
class="icon-btn"
1717
[class.active]="currentView === 'repos'"
1818
(click)="showRepos()"
1919
title="Repositories"
2020
>
21-
📦
21+
<i class="ti ti-package"></i>
2222
</button>
2323
<button
2424
class="icon-btn"
2525
[class.active]="currentView === 'settings'"
2626
(click)="showSettings()"
2727
title="Settings"
2828
>
29-
⚙️
29+
<i class="ti ti-settings"></i>
3030
</button>
3131
</div>
3232
</div>

src/app/shared/components/header/header.component.scss

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ $border-color: #2a2a4a;
2222
cursor: pointer;
2323
gap: 8px;
2424
-webkit-app-region: no-drag;
25+
transition: opacity 0.2s;
26+
27+
&:hover {
28+
opacity: 0.8;
29+
}
2530

2631
.logo {
27-
font-size: 18px;
32+
font-size: 22px;
33+
color: #4a90d9;
2834
}
2935

3036
.title {
@@ -47,8 +53,11 @@ $border-color: #2a2a4a;
4753
cursor: pointer;
4854
padding: 6px 8px;
4955
border-radius: 4px;
50-
font-size: 14px;
56+
font-size: 18px;
5157
transition: all 0.2s;
58+
display: flex;
59+
align-items: center;
60+
justify-content: center;
5261

5362
&:hover {
5463
background: $bg-tertiary;
@@ -65,6 +74,10 @@ $border-color: #2a2a4a;
6574
color: $accent-color;
6675
}
6776

77+
i {
78+
font-size: 20px;
79+
}
80+
6881
.spinning {
6982
display: inline-block;
7083
animation: spin 1s linear infinite;

src/app/shared/components/repos-panel/repos-panel.component.html

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ <h3>Select Repositories to Monitor</h3>
88
type="text"
99
[ngModel]="searchQuery"
1010
(ngModelChange)="onSearchChange($event)"
11-
placeholder="🔍 Search repositories..."
11+
placeholder="Search repositories..."
1212
/>
1313
</div>
1414

1515
<div class="repos-count">{{ selectedCount }} repositories selected</div>
1616

1717
<div class="loading-spinner" *ngIf="ownersLoading">
18-
<span class="spinning">🌀</span> Loading...
18+
<i class="ti ti-loader spinning"></i> Loading...
1919
</div>
2020

2121
<div class="owners-list" *ngIf="!ownersLoading">
@@ -26,18 +26,14 @@ <h3>Select Repositories to Monitor</h3>
2626
(click)="onToggleOwner(ownerAcc)"
2727
[class.expanded]="ownerAcc.expanded"
2828
>
29-
<span class="accordion-icon">{{
30-
ownerAcc.expanded ? "▼" : "▶"
31-
}}</span>
32-
<span class="owner-icon">{{
33-
ownerAcc.owner.is_user ? "👤" : "🏢"
34-
}}</span>
29+
<span class="accordion-icon">{{ ownerAcc.expanded ? "▼" : "▶" }}</span>
30+
<i [class]="'owner-icon ti ' + (ownerAcc.owner.is_user ? 'ti-user' : 'ti-building')"></i>
3531
<span class="owner-name">{{ ownerAcc.owner.name }}</span>
3632
<span class="owner-badge" *ngIf="ownerAcc.loaded">
3733
{{ getSelectedCountForOwner(ownerAcc) }}/{{ ownerAcc.repos.length }}
3834
</span>
3935
<span class="owner-badge loading" *ngIf="ownerAcc.loading">
40-
<span class="spinning"></span>
36+
<i class="ti ti-loader spinning"></i>
4137
</span>
4238
</div>
4339

@@ -62,7 +58,7 @@ <h3>Select Repositories to Monitor</h3>
6258
</div>
6359

6460
<div class="loading-spinner small" *ngIf="ownerAcc.loading">
65-
<span class="spinning">🔄</span> Loading repos...
61+
<i class="ti ti-refresh spinning"></i> Loading repos...
6662
</div>
6763

6864
<div class="repos-list" *ngIf="ownerAcc.loaded">
@@ -79,7 +75,7 @@ <h3>Select Repositories to Monitor</h3>
7975
[class.selected]="repo.selected"
8076
>
8177
<div class="checkbox">
82-
<span *ngIf="repo.selected"></span>
78+
<i *ngIf="repo.selected" class="ti ti-check"></i>
8379
</div>
8480
<div class="repo-details">
8581
<span class="repo-name">{{ repo.name }}</span>
@@ -91,6 +87,6 @@ <h3>Select Repositories to Monitor</h3>
9187
</div>
9288

9389
<button class="primary-btn" (click)="onDone()">
94-
Done - View Alerts
90+
<i class="ti ti-check"></i> Done - View Alerts
9591
</button>
9692
</div>

src/app/shared/components/repos-panel/repos-panel.component.scss

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ $border-color: #2a2a4a;
121121
}
122122

123123
.owner-icon {
124-
font-size: 14px;
124+
font-size: 18px;
125+
color: #4a90d9;
125126
}
126127

127128
.owner-name {
@@ -213,10 +214,13 @@ $border-color: #2a2a4a;
213214
display: flex;
214215
align-items: center;
215216
justify-content: center;
216-
font-size: 12px;
217217
color: white;
218218
flex-shrink: 0;
219219
transition: all 0.2s;
220+
221+
i {
222+
font-size: 14px;
223+
}
220224
}
221225

222226
.repo-details {
@@ -245,7 +249,11 @@ $border-color: #2a2a4a;
245249
align-items: center;
246250
justify-content: center;
247251
gap: 8px;
248-
color: $text-secondary;
252+
color: $accent-color;
253+
254+
i {
255+
font-size: 24px;
256+
}
249257

250258
.spinning {
251259
display: inline-block;
@@ -263,6 +271,14 @@ $border-color: #2a2a4a;
263271
font-weight: 500;
264272
cursor: pointer;
265273
transition: background 0.2s;
274+
display: flex;
275+
align-items: center;
276+
justify-content: center;
277+
gap: 6px;
278+
279+
i {
280+
font-size: 18px;
281+
}
266282

267283
&:hover {
268284
background: color.adjust($accent-color, $lightness: -10%);

0 commit comments

Comments
 (0)