|
|
@ -45,7 +45,7 @@ |
|
|
|
|
|
|
|
<div class="relative w-full pl-4 pr-8 py-2 text-slate-900"> |
|
|
|
<span class="font-semibold">{{ notification.title }}</span> |
|
|
|
<p class="text-sm">{{ notification.text }}</p> |
|
|
|
<p class="text-sm">{{ truncateLongWords(notification.text) }}</p> |
|
|
|
|
|
|
|
<button |
|
|
|
@click="close(notification.id)" |
|
|
@ -68,7 +68,7 @@ |
|
|
|
|
|
|
|
<div class="relative w-full pl-4 pr-8 py-2 text-emerald-900"> |
|
|
|
<span class="font-semibold">{{ notification.title }}</span> |
|
|
|
<p class="text-sm">{{ notification.text }}</p> |
|
|
|
<p class="text-sm">{{ truncateLongWords(notification.text) }}</p> |
|
|
|
|
|
|
|
<button |
|
|
|
@click="close(notification.id)" |
|
|
@ -91,7 +91,7 @@ |
|
|
|
|
|
|
|
<div class="relative w-full pl-4 pr-8 py-2 text-amber-900"> |
|
|
|
<span class="font-semibold">{{ notification.title }}</span> |
|
|
|
<p class="text-sm">{{ notification.text }}</p> |
|
|
|
<p class="text-sm">{{ truncateLongWords(notification.text) }}</p> |
|
|
|
|
|
|
|
<button |
|
|
|
@click="close(notification.id)" |
|
|
@ -114,7 +114,7 @@ |
|
|
|
|
|
|
|
<div class="relative w-full pl-4 pr-8 py-2 text-rose-900"> |
|
|
|
<span class="font-semibold">{{ notification.title }}</span> |
|
|
|
<p class="text-sm">{{ notification.text }}</p> |
|
|
|
<p class="text-sm">{{ truncateLongWords(notification.text) }}</p> |
|
|
|
|
|
|
|
<button |
|
|
|
@click="close(notification.id)" |
|
|
@ -329,6 +329,13 @@ export default class App extends Vue { |
|
|
|
|
|
|
|
stopAsking = false; |
|
|
|
|
|
|
|
truncateLongWords(sentence: string) { |
|
|
|
return sentence |
|
|
|
.split(" ") |
|
|
|
.map(word => (word.length > 30 ? word.slice(0, 30) + "..." : word)) |
|
|
|
.join(" "); |
|
|
|
} |
|
|
|
|
|
|
|
async turnOffNotifications(notification: NotificationIface) { |
|
|
|
let subscription: object | null = null; |
|
|
|
|
|
|
|