Skip to content

Commit 71c3bac

Browse files
committed
first draft
1 parent 7ca703d commit 71c3bac

File tree

11 files changed

+1453
-7
lines changed

11 files changed

+1453
-7
lines changed

src/App.vue

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
<template>
22
<div class="app">
3-
<toast position="bottom-right" />
3+
<toast position="bottom-right">
4+
<template #message="slotProps">
5+
<div class="toast-content">
6+
<div class="toast-text">
7+
<div class="toast-summary">{{ slotProps.message.summary }}</div>
8+
<div class="toast-detail">{{ slotProps.message.detail }}</div>
9+
</div>
10+
<button v-if="slotProps.message.data?.action" class="toast-action-btn" @click="slotProps.message.data.action()">
11+
{{ slotProps.message.data.actionLabel }}
12+
</button>
13+
</div>
14+
</template>
15+
</toast>
416
<router-view />
517
</div>
618
</template>
@@ -27,3 +39,35 @@ export default {
2739
},
2840
};
2941
</script>
42+
43+
<style scoped>
44+
.toast-content {
45+
display: flex;
46+
flex-direction: column;
47+
gap: 8px;
48+
width: 100%;
49+
}
50+
51+
.toast-summary {
52+
font-weight: bold;
53+
}
54+
55+
.toast-detail {
56+
font-size: 0.9em;
57+
}
58+
59+
.toast-action-btn {
60+
align-self: flex-end;
61+
padding: 4px 12px;
62+
background-color: #4dabf7;
63+
color: white;
64+
border: none;
65+
border-radius: 4px;
66+
cursor: pointer;
67+
font-size: 12px;
68+
}
69+
70+
.toast-action-btn:hover {
71+
background-color: #339af0;
72+
}
73+
</style>

src/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ToastService from "primevue/toastservice";
77
import * as Sentry from "@sentry/browser";
88
import { library } from "@fortawesome/fontawesome-svg-core";
99
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
10-
import { faLayerGroup, faGlobeAfrica, faMobileAlt, faHammer, faEye } from "@fortawesome/free-solid-svg-icons";
10+
import { faLayerGroup, faGlobeAfrica, faMobileAlt, faHammer, faEye, faTrash, faLink, faLinkSlash, faSave, faExclamationTriangle } from "@fortawesome/free-solid-svg-icons";
1111
import { faGithub } from "@fortawesome/free-brands-svg-icons";
1212

1313
import App from "./App.vue";
@@ -53,7 +53,7 @@ app.use(PrimeVue, {
5353
// Setup directives and components
5454
app.directive("tooltip", Tooltip);
5555
app.use(ToastService);
56-
library.add(faLayerGroup, faGlobeAfrica, faMobileAlt, faHammer, faEye, faGithub);
56+
library.add(faLayerGroup, faGlobeAfrica, faMobileAlt, faHammer, faEye, faTrash, faLink, faLinkSlash, faSave, faExclamationTriangle, faGithub);
5757
app.component("FontAwesomeIcon", FontAwesomeIcon);
5858

5959
// Mount the app

0 commit comments

Comments
 (0)