Skip to content

Commit bbb6753

Browse files
committed
alerts
1 parent ea4a1e1 commit bbb6753

File tree

8 files changed

+106
-378
lines changed

8 files changed

+106
-378
lines changed

assets/css/app.css

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
.header {
2121
background: #fff;
2222
border-bottom: 1px solid #d2d2d7;
23-
padding: 0 24px;
2423
position: fixed;
2524
top: 0;
2625
left: 0;
@@ -29,8 +28,7 @@
2928
}
3029

3130
.header-content {
32-
max-width: 1400px;
33-
margin: 0 auto;
31+
margin: 0 32px 0 24px;
3432
display: flex;
3533
align-items: center;
3634
justify-content: space-between;
@@ -55,15 +53,45 @@
5553
top: 64px;
5654
left: 0;
5755
right: 0;
58-
background: #fef2f2;
59-
border-bottom: 2px solid #dc2626;
6056
padding: 14px 24px;
6157
display: flex;
6258
align-items: center;
6359
justify-content: space-between;
6460
z-index: 99;
6561
}
6662

63+
.alert-bar.error {
64+
background: #fef2f2;
65+
border-bottom: 2px solid #dc2626;
66+
color: #dc2626;
67+
}
68+
.alert-bar.error:hover {
69+
color: #7f1d1d;
70+
}
71+
72+
.alert-bar.success {
73+
background: #f0fdf4;
74+
border-bottom: 2px solid #16a34a;
75+
color: #16a34a;
76+
}
77+
.alert-bar.success:hover {
78+
color: #166534;
79+
}
80+
81+
.alert-bar.info{
82+
background: #eff6ff;
83+
border-bottom: 2px solid #2563eb;
84+
color: #2563eb;
85+
}
86+
.alert-bar.info:hover {
87+
color: #1e40af;
88+
}
89+
90+
#alert-bar[class$='loading'] {
91+
opacity:.5;
92+
pointer-events: none;
93+
}
94+
6795
.alert-content {
6896
display: flex;
6997
align-items: center;
@@ -74,20 +102,16 @@
74102
.alert-icon {
75103
width: 20px;
76104
height: 20px;
77-
color: #dc2626;
78105
flex-shrink: 0;
106+
cursor: pointer;
79107
}
80108

81109
.alert-message {
82-
color: #7f1d1d;
83110
font-size: 14px;
84111
font-weight: 500;
85112
}
86113

87114
.alert-close {
88-
background: #ffffff;
89-
border: 1px solid #dc2626;
90-
color: #dc2626;
91115
cursor: pointer;
92116
padding: 6px 12px;
93117
border-radius: 6px;
@@ -98,15 +122,6 @@
98122
flex-shrink: 0;
99123
}
100124

101-
.alert-close:hover {
102-
background: #dc2626;
103-
color: #ffffff;
104-
}
105-
106-
.alert-bar.hidden {
107-
display: none;
108-
}
109-
110125
/* Breadcrumb Navigation */
111126
.breadcrumb {
112127
display: none;
@@ -384,14 +399,6 @@
384399
transition: width 0.3s ease;
385400
}
386401

387-
.progress-bar.warning {
388-
background: #f59e0b;
389-
}
390-
391-
.progress-bar.success {
392-
background: #10b981;
393-
}
394-
395402
/* Content Area */
396403
.content {
397404
flex: 1;
@@ -547,7 +554,7 @@
547554
z-index: 1000;
548555
}
549556

550-
.settings-menu a {
557+
.settings-menu a, .settings-menu span {
551558
display: block;
552559
padding: 10px 16px;
553560
color: #1d1d1f;
@@ -556,7 +563,7 @@
556563
transition: background 0.2s;
557564
}
558565

559-
.settings-menu a:hover {
566+
.settings-menu a:hover, .settings-menu span:hover {
560567
background: #f5f5f7;
561568
}
562569

assets/js/app.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import "phoenix_html";
22
import { Socket } from "phoenix";
33
import { LiveSocket } from "phoenix_live_view";
44
import ClipboardJS from "clipboard";
5-
import Toastify from "toastify-js";
65
import topbar from "topbar";
76

87
topbar.config({
@@ -12,18 +11,6 @@ topbar.config({
1211
});
1312
window.addEventListener("phx:page-loading-start", (info) => topbar.show());
1413
window.addEventListener("phx:page-loading-stop", () => topbar.hide());
15-
window.addEventListener("phx:success", (e) => {
16-
Toastify({
17-
text: e.detail.msg,
18-
className: "toast__container--success",
19-
}).showToast();
20-
});
21-
window.addEventListener("phx:error", (e) => {
22-
Toastify({
23-
text: e.detail.msg,
24-
className: "toast__container--error",
25-
}).showToast();
26-
});
2714

2815
let Hooks = {};
2916

dist/css/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)