File tree Expand file tree Collapse file tree 5 files changed +21
-14
lines changed Expand file tree Collapse file tree 5 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 6262 ->toResponse ($ request )
6363 ->setStatusCode ($ statusCode );
6464 } else {
65- // Return standard modal for easier debugging locally
65+ // Show standard modal for easier debugging locally
6666 if (app ()->isLocal () && $ statusCode === 500 ) {
6767 return $ response ;
6868 }
69- // Return JSON response for PrimeVue toast to display
69+ // Return JSON response for PrimeVue toast to display, handled by Inertia router event listener
7070 $ errorSummary = "$ statusCode - $ errorTitles [$ statusCode ]" ;
7171 $ errorDetail = $ errorDetails [$ statusCode ];
7272 if (get_class ($ exception ) === ErrorToastException::class) {
Original file line number Diff line number Diff line change 66@source '../../storage/framework/views/*.php' ;
77@source '../../resources/views/**/*.blade.php' ;
88@source '../../resources/js/**/*.vue' ;
9+ @source '../../resources/js/theme/*.js' ;
910
1011@custom-variant dark (& : where (.dark , .dark * ));
1112
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import PageTitleSection from '@/components/PageTitleSection.vue';
1616
1717import { useSiteColorMode } from '@/composables/useSiteColorMode' ;
1818import themePreset from '@/theme/noir-preset' ;
19+ import globalPt from '@/theme/global-pt' ;
1920
2021/* global Ziggy */
2122const appName = import . meta. env . VITE_APP_NAME || 'Laravel' ;
@@ -44,7 +45,6 @@ createInertiaApp({
4445 summary : responseBody . error_summary ,
4546 detail : responseBody . error_detail ,
4647 life : 5000 ,
47- //styleClass: 'shadow-lg mb-0 mt-4 left-4 md:left-auto',
4848 } ) ;
4949 }
5050 } ) ;
@@ -69,16 +69,7 @@ createInertiaApp({
6969 } ,
7070 } ,
7171 } ,
72- pt : {
73- toast : {
74- root : {
75- class : 'fixed left-4! right-4! bottom-4 md:left-auto! md:top-auto'
76- } ,
77- message : {
78- class : 'shadow-lg mb-0 mt-4 w-full'
79- } ,
80- } ,
81- }
72+ pt : globalPt ,
8273 } )
8374 . use ( ToastService )
8475 . component ( 'InertiaHead' , Head )
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const showSuccessToast = () => {
3939 severity: ' success' ,
4040 summary: ' Saved' ,
4141 detail: ' Profile information has been updated' ,
42- life: 120000 ,
42+ life: 5000 ,
4343 });
4444};
4545const updateProfileInformation = () => {
Original file line number Diff line number Diff line change 1+ /**
2+ * Global pass through styling for components
3+ * https://primevue.org/passthrough/#global
4+ */
5+ export default {
6+ toast : {
7+ root : {
8+ // Full width/centered on mobile, bottom right desktop
9+ class : 'fixed! left-4! right-4! bottom-4! w-auto! md:right-8! md:bottom-8! sm:w-[25rem]! sm:not-fixed! sm:left-auto! sm:ml-auto!'
10+ } ,
11+ message : {
12+ class : 'shadow-lg mb-0 mt-4'
13+ } ,
14+ } ,
15+ }
You can’t perform that action at this time.
0 commit comments