🆙 Add cms i using 🆙

This commit is contained in:
Remco
2025-11-25 22:42:56 +01:00
parent 94704e0925
commit d44196149e
35591 changed files with 3601123 additions and 0 deletions
@@ -0,0 +1,35 @@
.fi-no-database {
@apply flex;
& .fi-modal-window-ctn > .fi-modal-window {
& .fi-modal-heading {
@apply relative inline-block;
& .fi-badge {
@apply absolute start-full -top-1 ms-1 w-max;
}
}
& .fi-modal-header {
& .fi-ac {
@apply mt-2;
}
}
& .fi-modal-content {
@apply -mx-6 -mt-6 gap-y-0 divide-y divide-gray-200 dark:divide-white/10;
}
&:not(.fi-modal-window-has-footer) .fi-modal-content {
@apply -mb-6;
}
&.fi-modal-window-has-footer .fi-modal-content {
@apply border-b border-gray-200 dark:border-white/10;
}
}
& .fi-no-notification-unread-ctn {
@apply before:bg-primary-600 dark:before:bg-primary-500 relative before:absolute before:start-0 before:h-full before:w-0.5;
}
}
@@ -0,0 +1,3 @@
@import './database-notifications.css' layer(components);
@import './notification.css' layer(components);
@import './notifications.css' layer(components);
@@ -0,0 +1,105 @@
.fi-no-notification {
@apply pointer-events-auto invisible flex w-full shrink-0 gap-3 overflow-hidden p-4 transition duration-300;
& .fi-no-notification-icon {
@apply text-gray-400;
&.fi-color {
@apply text-color-400;
}
}
& .fi-no-notification-main {
@apply mt-0.5 grid flex-1 gap-3;
}
& .fi-no-notification-text {
@apply grid gap-1;
}
& .fi-no-notification-title {
@apply text-sm font-medium text-gray-950 dark:text-white;
}
& .fi-no-notification-date {
@apply text-sm text-gray-500 dark:text-gray-400;
}
& .fi-no-notification-body {
@apply overflow-hidden text-sm text-pretty break-words text-gray-500 dark:text-gray-400;
& > p:not(:first-of-type) {
@apply mt-1;
}
}
&:not(.fi-inline) {
@apply flex max-w-sm gap-3 rounded-xl bg-white p-4 shadow-lg ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10;
&.fi-color {
@apply ring-color-600/20 dark:ring-color-400/30;
}
&.fi-transition-leave-end {
@apply scale-95;
}
}
&.fi-color {
background-color: color-mix(in oklab, white 90%, var(--color-400));
@variant dark {
background-color: color-mix(
in oklab,
var(--gray-900) 90%,
var(--color-400)
);
}
}
&.fi-transition-enter-start {
@apply opacity-0;
}
&.fi-transition-leave-end {
@apply opacity-0;
}
}
.fi-no {
&.fi-align-start,
&.fi-align-left {
& .fi-no-notification {
&.fi-transition-enter-start {
@apply -translate-x-12;
}
}
}
&.fi-align-end,
&.fi-align-right {
& .fi-no-notification {
&.fi-transition-enter-start {
@apply translate-x-12;
}
}
}
&.fi-align-center {
&.fi-vertical-align-start {
& .fi-no-notification {
&.fi-transition-enter-start {
@apply -translate-y-12;
}
}
}
&.fi-vertical-align-end {
& .fi-no-notification {
&.fi-transition-enter-start {
@apply translate-y-12;
}
}
}
}
}
@@ -0,0 +1,29 @@
.fi-no {
@apply pointer-events-none fixed inset-4 z-50 mx-auto flex gap-3;
&.fi-align-start,
&.fi-align-left {
@apply items-start;
}
&.fi-align-center {
@apply items-center;
}
&.fi-align-end,
&.fi-align-right {
@apply items-end;
}
&.fi-vertical-align-start {
@apply flex-col-reverse justify-end;
}
&.fi-vertical-align-center {
@apply flex-col justify-center;
}
&.fi-vertical-align-end {
@apply flex-col justify-end;
}
}
@@ -0,0 +1,352 @@
import { v4 as uuid } from 'uuid-browser'
class Notification {
constructor() {
this.id(uuid())
return this
}
id(id) {
this.id = id
return this
}
title(title) {
this.title = title
return this
}
body(body) {
this.body = body
return this
}
actions(actions) {
this.actions = actions
return this
}
status(status) {
this.status = status
return this
}
color(color) {
this.color = color
return this
}
icon(icon) {
this.icon = icon
return this
}
iconColor(color) {
this.iconColor = color
return this
}
duration(duration) {
this.duration = duration
return this
}
seconds(seconds) {
this.duration(seconds * 1000)
return this
}
persistent() {
this.duration('persistent')
return this
}
danger() {
this.status('danger')
return this
}
info() {
this.status('info')
return this
}
success() {
this.status('success')
return this
}
warning() {
this.status('warning')
return this
}
view(view) {
this.view = view
return this
}
viewData(viewData) {
this.viewData = viewData
return this
}
send() {
window.dispatchEvent(
new CustomEvent('notificationSent', {
detail: {
notification: this,
},
}),
)
return this
}
}
class Action {
constructor(name) {
this.name(name)
return this
}
name(name) {
this.name = name
return this
}
color(color) {
this.color = color
return this
}
dispatch(event, data) {
this.event(event)
this.eventData(data)
return this
}
dispatchSelf(event, data) {
this.dispatch(event, data)
this.dispatchDirection = 'self'
return this
}
dispatchTo(component, event, data) {
this.dispatch(event, data)
this.dispatchDirection = 'to'
this.dispatchToComponent = component
return this
}
/**
* @deprecated Use `dispatch()` instead.
*/
emit(event, data) {
this.dispatch(event, data)
return this
}
/**
* @deprecated Use `dispatchSelf()` instead.
*/
emitSelf(event, data) {
this.dispatchSelf(event, data)
return this
}
/**
* @deprecated Use `dispatchTo()` instead.
*/
emitTo(component, event, data) {
this.dispatchTo(component, event, data)
return this
}
dispatchDirection(dispatchDirection) {
this.dispatchDirection = dispatchDirection
return this
}
dispatchToComponent(component) {
this.dispatchToComponent = component
return this
}
event(event) {
this.event = event
return this
}
eventData(data) {
this.eventData = data
return this
}
extraAttributes(attributes) {
this.extraAttributes = attributes
return this
}
icon(icon) {
this.icon = icon
return this
}
iconPosition(position) {
this.iconPosition = position
return this
}
outlined(condition = true) {
this.isOutlined = condition
return this
}
disabled(condition = true) {
this.isDisabled = condition
return this
}
label(label) {
this.label = label
return this
}
close(condition = true) {
this.shouldClose = condition
return this
}
openUrlInNewTab(condition = true) {
this.shouldOpenUrlInNewTab = condition
return this
}
size(size) {
this.size = size
return this
}
url(url) {
this.url = url
return this
}
view(view) {
this.view = view
return this
}
button() {
this.view('filament::components.button.index')
return this
}
grouped() {
this.view('filament::components.dropdown.list.item')
return this
}
iconButton() {
this.view('filament::components.icon-button')
return this
}
link() {
this.view('filament::components.link')
return this
}
}
class ActionGroup {
constructor(actions) {
this.actions(actions)
return this
}
actions(actions) {
this.actions = actions.map((action) => action.grouped())
return this
}
color(color) {
this.color = color
return this
}
icon(icon) {
this.icon = icon
return this
}
iconPosition(position) {
this.iconPosition = position
return this
}
label(label) {
this.label = label
return this
}
tooltip(tooltip) {
this.tooltip = tooltip
return this
}
}
export { Action, ActionGroup, Notification }
@@ -0,0 +1,167 @@
import { once } from 'alpinejs/src/utils/once'
export default (Alpine) => {
Alpine.data('notificationComponent', ({ notification }) => ({
isShown: false,
computedStyle: null,
transitionDuration: null,
transitionEasing: null,
init() {
this.computedStyle = window.getComputedStyle(this.$el)
this.transitionDuration =
parseFloat(this.computedStyle.transitionDuration) * 1000
this.transitionEasing = this.computedStyle.transitionTimingFunction
this.configureTransitions()
this.configureAnimations()
if (
notification.duration &&
notification.duration !== 'persistent'
) {
setTimeout(() => {
if (!this.$el.matches(':hover')) {
this.close()
return
}
this.$el.addEventListener('mouseleave', () => this.close())
}, notification.duration)
}
this.isShown = true
},
configureTransitions() {
const display = this.computedStyle.display
const show = () => {
Alpine.mutateDom(() => {
this.$el.style.setProperty('display', display)
this.$el.style.setProperty('visibility', 'visible')
})
this.$el._x_isShown = true
}
const hide = () => {
Alpine.mutateDom(() => {
this.$el._x_isShown
? this.$el.style.setProperty('visibility', 'hidden')
: this.$el.style.setProperty('display', 'none')
})
}
const toggle = once(
(value) => (value ? show() : hide()),
(value) => {
this.$el._x_toggleAndCascadeWithTransitions(
this.$el,
value,
show,
hide,
)
},
)
Alpine.effect(() => toggle(this.isShown))
},
configureAnimations() {
let animation
Livewire.hook(
'commit',
({ component, commit, succeed, fail, respond }) => {
if (
!component.snapshot.data
.isFilamentNotificationsComponent
) {
return
}
// Calling `el.getBoundingClientRect()` from outside `requestAnimationFrame()` can
// occasionally cause the page to scroll to the top.
requestAnimationFrame(() => {
const getTop = () =>
this.$el.getBoundingClientRect().top
const oldTop = getTop()
respond(() => {
animation = () => {
if (!this.isShown) {
return
}
this.$el.animate(
[
{
transform: `translateY(${
oldTop - getTop()
}px)`,
},
{ transform: 'translateY(0px)' },
],
{
duration: this.transitionDuration,
easing: this.transitionEasing,
},
)
}
this.$el
.getAnimations()
.forEach((animation) => animation.finish())
})
succeed(({ snapshot, effect }) => {
animation()
})
})
},
)
},
close() {
this.isShown = false
setTimeout(
() =>
window.dispatchEvent(
new CustomEvent('notificationClosed', {
detail: {
id: notification.id,
},
}),
),
this.transitionDuration,
)
},
markAsRead() {
window.dispatchEvent(
new CustomEvent('markedNotificationAsRead', {
detail: {
id: notification.id,
},
}),
)
},
markAsUnread() {
window.dispatchEvent(
new CustomEvent('markedNotificationAsUnread', {
detail: {
id: notification.id,
},
}),
)
},
}))
}
@@ -0,0 +1,14 @@
import NotificationComponentAlpinePlugin from './components/notification'
import {
Action as NotificationAction,
ActionGroup as NotificationActionGroup,
Notification,
} from './Notification'
window.FilamentNotificationAction = NotificationAction
window.FilamentNotificationActionGroup = NotificationActionGroup
window.FilamentNotification = Notification
document.addEventListener('alpine:init', () => {
window.Alpine.plugin(NotificationComponentAlpinePlugin)
})
@@ -0,0 +1,25 @@
<?php
return [
'modal' => [
'heading' => 'ማሳወቂያዎች',
'actions' => [
'clear' => [
'label' => 'አፅዳ',
],
'mark_all_as_read' => [
'label' => 'ሁሉም ተነበዋል',
],
],
'empty' => [
'heading' => 'ምንም አዲስ ነገር የለም',
'description' => 'እባክዎ ከትንሽ ቆይታ በኋላ ይመለሱ',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'التنبيهات',
'actions' => [
'clear' => [
'label' => 'مسح',
],
'mark_all_as_read' => [
'label' => 'تحديد الكل كمقروء',
],
],
'empty' => [
'heading' => 'لا توجد تنبيهات',
'description' => 'يرجى التحقق مرة أخرى لاحقاً.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Bildirişlər',
'actions' => [
'clear' => [
'label' => 'Təmizlə',
],
'mark_all_as_read' => [
'label' => 'Hamısını oxunub olaraq qeyd et',
],
],
'empty' => [
'heading' => 'Bildiriş yoxdur',
'description' => 'Zəhmət olmazsa sonra yoxlayın',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Известия',
'actions' => [
'clear' => [
'label' => 'Изчисти',
],
'mark_all_as_read' => [
'label' => 'Маркирай всички като прочетени',
],
],
'empty' => [
'heading' => 'Нямате известия',
'description' => 'Моля проверете отново по-късно.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'বিজ্ঞপ্তি',
'actions' => [
'clear' => [
'label' => 'পরিষ্কার',
],
'mark_all_as_read' => [
'label' => 'পড়া হয়েছে',
],
],
'empty' => [
'heading' => 'কোন বিজ্ঞপ্তি নেই',
'description' => 'পরে আবার চেষ্টা করুন',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Obavijesti',
'actions' => [
'clear' => [
'label' => 'Izbrišite sve',
],
'mark_all_as_read' => [
'label' => 'Označi sve kao pročitano ',
],
],
'empty' => [
'heading' => 'Nema obavijesti',
'description' => 'Molimo provjerite kasnije opet',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notificacions',
'actions' => [
'clear' => [
'label' => 'Netejar',
],
'mark_all_as_read' => [
'label' => 'Marcar tot com a llegit',
],
],
'empty' => [
'heading' => 'Sense notificacions',
'description' => 'Si us plau, torna a comprovar-ho més tard.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'ئاگادارینامەکان',
'actions' => [
'clear' => [
'label' => 'سرینەوەی هەموو',
],
'mark_all_as_read' => [
'label' => 'نیشانەکردنی هەموو بۆ خوێنراوە',
],
],
'empty' => [
'heading' => 'هیچ ئاگادارینامەیەک نییە',
'description' => 'تکایە دواتر سەیری بکەرەوە',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Moje aktualizace',
'actions' => [
'clear' => [
'label' => 'Odstranit',
],
'mark_all_as_read' => [
'label' => 'Označit vše jako přečtené',
],
],
'empty' => [
'heading' => 'Nemáme pro vás žádné aktulizace',
'description' => 'Zkuste to prosím později',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Hysbysiadau',
'actions' => [
'clear' => [
'label' => 'Clirio',
],
'mark_all_as_read' => [
'label' => 'Nodi pob un fel wedi darllen',
],
],
'empty' => [
'heading' => 'Dim hysbysiad yma',
'description' => 'Gwiriwch eto nes ymlaen',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notifikationer',
'actions' => [
'clear' => [
'label' => 'Ryd',
],
'mark_all_as_read' => [
'label' => 'Markér alle som læst',
],
],
'empty' => [
'heading' => 'Ingen notifikationer',
'description' => 'Tjek venligst igen senere',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Benachrichtigungen',
'actions' => [
'clear' => [
'label' => 'Alle löschen',
],
'mark_all_as_read' => [
'label' => 'Alle als gelesen markieren',
],
],
'empty' => [
'heading' => 'Keine Benachrichtigungen vorhanden',
'description' => 'Bitte schauen Sie später erneut vorbei',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Ειδοποιήσεις',
'actions' => [
'clear' => [
'label' => 'Καθαρισμός',
],
'mark_all_as_read' => [
'label' => 'Επισήμανση όλων ως αναγνωσμένων',
],
],
'empty' => [
'heading' => 'Δεν υπάρχουν νέες ειδοποιήσεις',
'description' => 'Ελέγξτε ξανά αργότερα.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notifications',
'actions' => [
'clear' => [
'label' => 'Clear',
],
'mark_all_as_read' => [
'label' => 'Mark all as read',
],
],
'empty' => [
'heading' => 'No notifications',
'description' => 'Please check again later.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notificaciones',
'actions' => [
'clear' => [
'label' => 'Borrar',
],
'mark_all_as_read' => [
'label' => 'Marcar todas como leídas',
],
],
'empty' => [
'heading' => 'No hay notificaciones',
'description' => 'Por favor, compruebe más tarde',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Jakinarazpenak',
'actions' => [
'clear' => [
'label' => 'Ezabatu',
],
'mark_all_as_read' => [
'label' => 'Denak irakurrita bezala markatu',
],
],
'empty' => [
'heading' => 'Ez dago jakinarazpenik',
'description' => 'Mesedez, egiaztatu geroago',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'پیام‌ها',
'actions' => [
'clear' => [
'label' => 'پاک کردن',
],
'mark_all_as_read' => [
'label' => 'علامت‌گذاری همه به عنوان خوانده‌شده',
],
],
'empty' => [
'heading' => 'شما پیامی ندارید',
'description' => 'لطفا بعدا مراجعه کنید',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Ilmoitukset',
'actions' => [
'clear' => [
'label' => 'Tyhjennä',
],
'mark_all_as_read' => [
'label' => 'Merkitse luetuiksi',
],
],
'empty' => [
'heading' => 'Ei ilmoituksia',
'description' => 'Tarkista myöhemmin uudestaan',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notifications',
'actions' => [
'clear' => [
'label' => 'Effacer',
],
'mark_all_as_read' => [
'label' => 'Tout marquer comme lu',
],
],
'empty' => [
'heading' => 'Aucune notification',
'description' => 'Veuillez revérifier ultérieurement',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'התראות',
'actions' => [
'clear' => [
'label' => 'נקה',
],
'mark_all_as_read' => [
'label' => 'סמך הכל כנקרא',
],
],
'empty' => [
'heading' => 'אין התראות',
'description' => 'בדוק שוב מאוחר יותר',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Obavijesti',
'actions' => [
'clear' => [
'label' => 'Očisti',
],
'mark_all_as_read' => [
'label' => 'Označi sve kao pročitano',
],
],
'empty' => [
'heading' => 'Nema obavijesti',
'description' => 'Molim te, provjeri ponovno kasnije.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Értesítések',
'actions' => [
'clear' => [
'label' => 'Törlés',
],
'mark_all_as_read' => [
'label' => 'Összes olvasottnak jelölése',
],
],
'empty' => [
'heading' => 'Nincsenek értesítések',
'description' => 'Kérjük, hogy nézz vissza később.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Ծանուցումներ',
'actions' => [
'clear' => [
'label' => 'Ջնջել',
],
'mark_all_as_read' => [
'label' => 'Նշել բոլորը որպես կարդացված',
],
],
'empty' => [
'heading' => 'Ոչ մի ծանուցում',
'description' => 'Խնդրում ենք ավելի ուշ կրկին ստուգել։',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notifikasi',
'actions' => [
'clear' => [
'label' => 'Bersihkan',
],
'mark_all_as_read' => [
'label' => 'Tandai semua sudah dibaca',
],
],
'empty' => [
'heading' => 'Tidak ada notifikasi',
'description' => 'Silakan periksa kembali nanti',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notifiche',
'actions' => [
'clear' => [
'label' => 'Pulisci',
],
'mark_all_as_read' => [
'label' => 'Imposta tutto come letto',
],
],
'empty' => [
'heading' => 'Nessuna notifica',
'description' => 'Si prega di controllare più tardi',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => '通知',
'actions' => [
'clear' => [
'label' => 'クリア',
],
'mark_all_as_read' => [
'label' => 'すべて既読にする',
],
],
'empty' => [
'heading' => '通知はありません',
'description' => 'のちほど確認してください',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'შეტყობინებები',
'actions' => [
'clear' => [
'label' => 'გასუფთავება',
],
'mark_all_as_read' => [
'label' => 'ყველას წაკითხულად მონიშვნა',
],
],
'empty' => [
'heading' => 'შეტყობინებები არ არის',
'description' => 'გთხოვთ, შეამოწმოთ მოგვიანებით.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'ដំណឹង',
'actions' => [
'clear' => [
'label' => 'សំអាត',
],
'mark_all_as_read' => [
'label' => 'សម្គាល់ថាបានអានទាំងអស់ហើយ',
],
],
'empty' => [
'heading' => 'គ្នានដំណឹង',
'description' => 'សូមពិនិត្យម្តងទៀតនៅពេលក្រោយ.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => '알림',
'actions' => [
'clear' => [
'label' => '전체 삭제',
],
'mark_all_as_read' => [
'label' => '모두 읽음으로 표시',
],
],
'empty' => [
'heading' => '알림 없음',
'description' => '나중에 다시 확인해 주세요.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'ئاگانامەکان',
'actions' => [
'clear' => [
'label' => 'سرینەوەی هەموو',
],
'mark_all_as_read' => [
'label' => 'نیشانە کردنی هەموو بۆ خوێنراوە',
],
],
'empty' => [
'heading' => 'هیچ ئاگانامەیەک نییە',
'description' => 'تکایە دواتر سەردان بکە',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Pranešimai',
'actions' => [
'clear' => [
'label' => 'Išvalyti',
],
'mark_all_as_read' => [
'label' => 'Pažymėti visus kaip perskaitytus',
],
],
'empty' => [
'heading' => 'Nėra pranešimų',
'description' => 'Patikrinkite vėliau.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Hriattîrna',
'actions' => [
'clear' => [
'label' => 'Then faina',
],
'mark_all_as_read' => [
'label' => 'Chhiar vek tawh ah dah rawh',
],
],
'empty' => [
'heading' => 'Hriattîrna a awmlo',
'description' => 'Nakinah ilo en leh dawn nia.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Paziņojumi',
'actions' => [
'clear' => [
'label' => 'Nodzēst',
],
'mark_all_as_read' => [
'label' => 'Atzīmēt visus kā izlasītus',
],
],
'empty' => [
'heading' => 'Nav jaunu paziņojumu',
'description' => 'Lūdzu, skatiet vēlāk',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Pemberitahuan',
'actions' => [
'clear' => [
'label' => 'Hapus',
],
'mark_all_as_read' => [
'label' => 'Tandai semua sebagai dibaca',
],
],
'empty' => [
'heading' => 'Tiada pemberitahuan di sini',
'description' => 'Sila semak semula kemudian',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Varsler',
'actions' => [
'clear' => [
'label' => 'Tøm',
],
'mark_all_as_read' => [
'label' => 'Merk alle som lest',
],
],
'empty' => [
'heading' => 'Ingen varsler',
'description' => 'Vennligst sjekk senere.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'सूचनाहरू',
'actions' => [
'clear' => [
'label' => 'खाली गर्नुहोस्',
],
'mark_all_as_read' => [
'label' => 'सबै पढेको रूपमा चिन्ह लगाउनुहोस्',
],
],
'empty' => [
'heading' => 'कुनै सूचना छैन',
'description' => 'कृपया पछि फेरि जाँच गर्नुहोस्।',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Meldingen',
'actions' => [
'clear' => [
'label' => 'Wissen',
],
'mark_all_as_read' => [
'label' => 'Alles als gelezen markeren',
],
],
'empty' => [
'heading' => 'Geen meldingen',
'description' => 'Kijk later nog eens.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Powiadomienia',
'actions' => [
'clear' => [
'label' => 'Wyczyść',
],
'mark_all_as_read' => [
'label' => 'Oznacz wszystkie jako przeczytane',
],
],
'empty' => [
'heading' => 'Brak powiadomień',
'description' => 'Zajrzyj ponownie później',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notificações',
'actions' => [
'clear' => [
'label' => 'Limpar',
],
'mark_all_as_read' => [
'label' => 'Marcar tudo como lido',
],
],
'empty' => [
'heading' => 'Sem notificações',
'description' => 'Por favor, verifique mais tarde.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notificações',
'actions' => [
'clear' => [
'label' => 'Limpar',
],
'mark_all_as_read' => [
'label' => 'Marcar tudo como lido',
],
],
'empty' => [
'heading' => 'Sem notificações',
'description' => 'Por favor, verifique mais tarde.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notificări',
'actions' => [
'clear' => [
'label' => 'Ștergere',
],
'mark_all_as_read' => [
'label' => 'Marchează totul ca fiind citit',
],
],
'empty' => [
'heading' => 'Nu există notificări',
'description' => 'Vă rugăm să verificați din nou mai târziu',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Уведомления',
'actions' => [
'clear' => [
'label' => 'Удалить',
],
'mark_all_as_read' => [
'label' => 'Отметить как прочитанное',
],
],
'empty' => [
'heading' => 'Нет уведомлений',
'description' => 'Пожалуйста, проверьте позже',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notifikácie',
'actions' => [
'clear' => [
'label' => 'Odstrániť',
],
'mark_all_as_read' => [
'label' => 'Označiť všetko ako prečítané',
],
],
'empty' => [
'heading' => 'Žiadne notifikácie',
'description' => 'Skúste to prosím neskôr.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Obvestila',
'actions' => [
'clear' => [
'label' => 'Počisti',
],
'mark_all_as_read' => [
'label' => 'Označi vse kot prebrano',
],
],
'empty' => [
'heading' => 'Ni obvestil',
'description' => 'Prosimo, preverite ponovno kasneje.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Njoftimet',
'actions' => [
'clear' => [
'label' => 'Pastro',
],
'mark_all_as_read' => [
'label' => 'Shënoni të gjitha si të lexuara',
],
],
'empty' => [
'heading' => 'Nuk ka njoftime',
'description' => 'Ju lutemi kontrolloni përsëri më vonë.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Обавештења',
'actions' => [
'clear' => [
'label' => 'Очисти',
],
'mark_all_as_read' => [
'label' => 'Означи све као прочитано',
],
],
'empty' => [
'heading' => 'Без обавештења',
'description' => 'Молим вас, проверите поново касније.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Obaveštenja',
'actions' => [
'clear' => [
'label' => 'Očisti',
],
'mark_all_as_read' => [
'label' => 'Označi sve kao pročitano',
],
],
'empty' => [
'heading' => 'Bez obaveštenja',
'description' => 'Molim vas, proverite ponovo kasnije.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notiser',
'actions' => [
'clear' => [
'label' => 'Rensa',
],
'mark_all_as_read' => [
'label' => 'Markera alla som lästa',
],
],
'empty' => [
'heading' => 'Inga notiser',
'description' => 'Kolla igen lite senare.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Arifa',
'actions' => [
'clear' => [
'label' => 'Safisha',
],
'mark_all_as_read' => [
'label' => 'Weka alama zote kama zimesomwa',
],
],
'empty' => [
'heading' => 'Hakuna arifa hapa',
'description' => 'Tafadhali angalia tena baadae',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'การแจ้งเตือน',
'actions' => [
'clear' => [
'label' => 'ล้าง',
],
'mark_all_as_read' => [
'label' => 'ทำเครื่องหมายทั้งหมดว่าอ่านแล้ว',
],
],
'empty' => [
'heading' => 'ไม่มีการแจ้งเตือน',
'description' => 'กรุณาตรวจสอบอีกครั้งในภายหลัง',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Bildirimler',
'actions' => [
'clear' => [
'label' => 'Temizle',
],
'mark_all_as_read' => [
'label' => 'Tümünü okundu işaretle',
],
],
'empty' => [
'heading' => 'Bildirim yok',
'description' => 'Lütfen sonra kontrol ediniz',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Сповіщення',
'actions' => [
'clear' => [
'label' => 'Видалити',
],
'mark_all_as_read' => [
'label' => 'Позначити як прочитане',
],
],
'empty' => [
'heading' => 'Немає повідомлень',
'description' => 'Будь ласка, перевірте пізніше',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'نوٹیفکیشنز',
'actions' => [
'clear' => [
'label' => 'صاف کریں',
],
'mark_all_as_read' => [
'label' => 'سب کو پڑھا ہوا نشان لگائیں',
],
],
'empty' => [
'heading' => 'کوئی نوٹیفکیشن نہیں',
'description' => 'براہ کرم بعد میں دوبارہ چیک کریں۔',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Bildirishnomalar',
'actions' => [
'clear' => [
'label' => 'O\'chirish',
],
'mark_all_as_read' => [
'label' => 'O\'qilgan deb belgilash',
],
],
'empty' => [
'heading' => 'Bildirishnomalar mavjud emas',
'description' => 'Iltimos keyinroq tekshiring',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Thông báo',
'actions' => [
'clear' => [
'label' => 'Xóa',
],
'mark_all_as_read' => [
'label' => 'Đánh dấu là đã đọc tất cả',
],
],
'empty' => [
'heading' => 'Không có thông báo',
'description' => 'Vui lòng kiểm tra lại sau.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => '通知',
'actions' => [
'clear' => [
'label' => '清除',
],
'mark_all_as_read' => [
'label' => '标记为已读',
],
],
'empty' => [
'heading' => '没有通知',
'description' => '请稍后再查看。',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => '通知',
'actions' => [
'clear' => [
'label' => '清除',
],
'mark_all_as_read' => [
'label' => '標記為已讀',
],
],
'empty' => [
'heading' => '沒有通知',
'description' => '請稍後再查看。',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => '通知',
'actions' => [
'clear' => [
'label' => '清除',
],
'mark_all_as_read' => [
'label' => '標記為已讀',
],
],
'empty' => [
'heading' => '沒有通知',
'description' => '請稍後再查看。',
],
],
];
@@ -0,0 +1,115 @@
@php
use Filament\Support\Enums\Alignment;
use Filament\Support\View\Components\BadgeComponent;
use Illuminate\View\ComponentAttributeBag;
$notifications = $this->getNotifications();
$unreadNotificationsCount = $this->getUnreadNotificationsCount();
$hasNotifications = $notifications->count();
$isPaginated = $notifications instanceof \Illuminate\Contracts\Pagination\Paginator && $notifications->hasPages();
$pollingInterval = $this->getPollingInterval();
@endphp
<div class="fi-no-database">
<x-filament::modal
:alignment="$hasNotifications ? null : Alignment::Center"
close-button
:description="$hasNotifications ? null : __('filament-notifications::database.modal.empty.description')"
:heading="$hasNotifications ? null : __('filament-notifications::database.modal.empty.heading')"
:icon="$hasNotifications ? null : \Filament\Support\Icons\Heroicon::OutlinedBellSlash"
:icon-alias="
$hasNotifications
? null
: \Filament\Notifications\View\NotificationsIconAlias::DATABASE_MODAL_EMPTY_STATE
"
:icon-color="$hasNotifications ? null : 'gray'"
id="database-notifications"
slide-over
:sticky-header="$hasNotifications"
teleport="body"
width="md"
class="fi-no-database"
:attributes="
new \Illuminate\View\ComponentAttributeBag([
'wire:poll.' . $pollingInterval => $pollingInterval ? '' : false,
])
"
>
@if ($trigger = $this->getTrigger())
<x-slot name="trigger">
{{ $trigger->with(['unreadNotificationsCount' => $unreadNotificationsCount]) }}
</x-slot>
@endif
@if ($hasNotifications)
<x-slot name="header">
<div>
<h2 class="fi-modal-heading">
{{ __('filament-notifications::database.modal.heading') }}
@if ($unreadNotificationsCount)
<span
{{
(new ComponentAttributeBag)->color(BadgeComponent::class, 'primary')->class([
'fi-badge fi-size-xs',
])
}}
>
{{ $unreadNotificationsCount }}
</span>
@endif
</h2>
<div class="fi-ac">
@if ($unreadNotificationsCount && $this->markAllNotificationsAsReadAction?->isVisible())
{{ $this->markAllNotificationsAsReadAction }}
@endif
@if ($this->clearNotificationsAction?->isVisible())
{{ $this->clearNotificationsAction }}
@endif
</div>
</div>
</x-slot>
@foreach ($notifications as $notification)
<div
@class([
'fi-no-notification-read-ctn' => ! $notification->unread(),
'fi-no-notification-unread-ctn' => $notification->unread(),
])
>
{{ $this->getNotification($notification)->inline() }}
</div>
@endforeach
@if ($broadcastChannel = $this->getBroadcastChannel())
@script
<script>
window.addEventListener('EchoLoaded', () => {
window.Echo.private(@js($broadcastChannel)).listen(
'.database-notifications.sent',
() => {
setTimeout(
() => $wire.call('$refresh'),
500,
)
},
)
})
if (window.Echo) {
window.dispatchEvent(new CustomEvent('EchoLoaded'))
}
</script>
@endscript
@endif
@if ($isPaginated)
<x-slot name="footer">
<x-filament::pagination :paginator="$notifications" />
</x-slot>
@endif
@endif
</x-filament::modal>
</div>
@@ -0,0 +1,43 @@
@php
use Filament\Support\Enums\Alignment;
use Filament\Support\Enums\VerticalAlignment;
@endphp
<div>
<div
@class([
'fi-no',
'fi-align-' . static::$alignment->value,
'fi-vertical-align-' . static::$verticalAlignment->value,
])
role="status"
>
@foreach ($notifications as $notification)
{{ $notification }}
@endforeach
</div>
@if ($broadcastChannel = $this->getBroadcastChannel())
@script
<script>
window.addEventListener('EchoLoaded', () => {
window.Echo.private(@js($broadcastChannel)).notification(
(notification) => {
setTimeout(
() =>
$wire.handleBroadcastNotification(
notification,
),
500,
)
},
)
})
if (window.Echo) {
window.dispatchEvent(new CustomEvent('EchoLoaded'))
}
</script>
@endscript
@endif
</div>