{__('Nessun record trovato')} |
diff --git a/resources/ts/Components/Dialogs/AddEditRecordDialog.tsx b/resources/ts/Components/Dialogs/AddEditRecordDialog.tsx
index 4ddcaec37..e87e650dc 100644
--- a/resources/ts/Components/Dialogs/AddEditRecordDialog.tsx
+++ b/resources/ts/Components/Dialogs/AddEditRecordDialog.tsx
@@ -1,5 +1,4 @@
import {mdiFloppy} from '@mdi/js';
-
import RecordDialog, {RecordDialogAttributes} from '@osm/Components/Dialogs/RecordDialog';
import MdIcon from '@osm/Components/MdIcon';
import Model from '@osm/Models/Model';
@@ -14,8 +13,8 @@ import {
Vnode,
VnodeDOM
} from 'mithril';
-import {Form} from 'mithril-utilities';
import Stream from 'mithril/stream';
+import {Form} from 'mithril-utilities';
import {Class} from 'type-fest';
export default abstract class AddEditRecordDialog> extends RecordDialog {
diff --git a/resources/ts/Components/Dialogs/Dialog.tsx b/resources/ts/Components/Dialogs/Dialog.tsx
index df4a7823f..fda6aaeb7 100644
--- a/resources/ts/Components/Dialogs/Dialog.tsx
+++ b/resources/ts/Components/Dialogs/Dialog.tsx
@@ -8,16 +8,16 @@ import {
Vnode,
VnodeDOM
} from 'mithril';
+import Stream from 'mithril/stream';
import {
Attributes,
Component
} from 'mithril-utilities';
-import Stream from 'mithril/stream';
export interface DialogAttributes extends Attributes, Partial> {
open?: Stream;
onOpen?: () => void;
diff --git a/resources/ts/Components/Dialogs/RecordDialog.tsx b/resources/ts/Components/Dialogs/RecordDialog.tsx
index ad23a6bed..9f869297e 100644
--- a/resources/ts/Components/Dialogs/RecordDialog.tsx
+++ b/resources/ts/Components/Dialogs/RecordDialog.tsx
@@ -3,7 +3,6 @@ import '@material/web/button/text-button.js';
import Dialog, {DialogAttributes} from '@osm/Components/Dialogs/Dialog';
import Model from '@osm/Models/Model';
-
import {Vnode} from 'mithril';
export interface RecordDialogAttributes> extends DialogAttributes {
diff --git a/resources/ts/Components/Page.tsx b/resources/ts/Components/Page.tsx
index 1e4a652d5..28f75e634 100644
--- a/resources/ts/Components/Page.tsx
+++ b/resources/ts/Components/Page.tsx
@@ -1,6 +1,5 @@
import autoAnimate from '@formkit/auto-animate';
import {ComponentAttributes} from '@maicol07/inertia-mithril';
-
import Footer from '@osm/Components/layout/Footer';
import {Collection} from 'collect.js';
import {
diff --git a/resources/ts/Components/Pages/RecordPage.tsx b/resources/ts/Components/Pages/RecordPage.tsx
index 592a9b194..acce40c5b 100644
--- a/resources/ts/Components/Pages/RecordPage.tsx
+++ b/resources/ts/Components/Pages/RecordPage.tsx
@@ -1,7 +1,6 @@
import '@material/web/button/outlined-button.js';
import {mdiChevronLeft} from '@mdi/js';
-
import MdIcon from '@osm/Components/MdIcon';
import Page, {PageAttributes} from '@osm/Components/Page';
import Model from '@osm/Models/Model';
diff --git a/resources/ts/Components/Pages/RecordsPage.tsx b/resources/ts/Components/Pages/RecordsPage.tsx
index dcd5e4baf..7fc332b6f 100644
--- a/resources/ts/Components/Pages/RecordsPage.tsx
+++ b/resources/ts/Components/Pages/RecordsPage.tsx
@@ -1,15 +1,15 @@
/* eslint-disable sonarjs/no-duplicate-string */
+import '@maicol07/material-web-additions/layout-grid/layout-grid.js';
+import '@material/web/dialog/dialog.js';
+import '@material/web/fab/branded-fab.js';
+import '@material/web/iconbutton/standard-icon-button.js';
+
import {router} from '@maicol07/inertia-mithril';
import {
FilterTextFieldInputEventDetail,
SortButtonClickedEventDetail
} from '@maicol07/material-web-additions/data-table/lib/data-table-column.js';
-import '@maicol07/material-web-additions/layout-grid/layout-grid.js';
-import '@material/web/dialog/dialog.js';
-import '@material/web/fab/branded-fab.js';
-import '@material/web/iconbutton/standard-icon-button.js';
import {mdiPlus} from '@mdi/js';
-
import RecordsTable, {RecordsTableColumnAttributes} from '@osm/Components/DataTable/RecordsTable';
import AddEditRecordDialog from '@osm/Components/Dialogs/AddEditRecordDialog';
import DeleteRecordDialog, {DeleteRecordDialogAttributes} from '@osm/Components/Dialogs/DeleteRecordDialog';
diff --git a/resources/ts/Components/extend/extend.ts b/resources/ts/Components/extend/extend.ts
index 296d9e20e..704c5dbc0 100644
--- a/resources/ts/Components/extend/extend.ts
+++ b/resources/ts/Components/extend/extend.ts
@@ -4,7 +4,7 @@
/**
* Type that returns an array of all keys of a provided object that are of
- * of the provided type, or a subtype of the type.
+ * the provided type, or a subtype of the type.
*/
declare type KeysOfType = {
[Key in keyof Type]-?: Type[Key] extends Match ? Key : never;
@@ -39,7 +39,7 @@ declare type KeyOfType = KeysOfType[key
*
* @param object The object that owns the method
* @param methods The name or names of the method(s) to extend
- * @param callback A callback which mutates the method's output
+ * @param callback A callback, which mutates the method's output.
*/
export function extend, K extends KeyOfType>(
object: T,
@@ -89,7 +89,7 @@ export function extend, K extends KeyOfType, K extends KeyOfType>(
object: T,
diff --git a/resources/ts/Components/layout/Drawer.tsx b/resources/ts/Components/layout/Drawer.tsx
index 1dd713847..6d681cfa4 100644
--- a/resources/ts/Components/layout/Drawer.tsx
+++ b/resources/ts/Components/layout/Drawer.tsx
@@ -1,11 +1,12 @@
import '@material/web/list/list.js';
+import '../m3/NavigationDrawer';
+import '../m3/NavigationDrawerModal';
import {
mdiAccountGroupOutline,
mdiMenuOpen,
mdiViewDashboardOutline
} from '@mdi/js';
-
import MdIcon from '@osm/Components/MdIcon';
import {VnodeCollectionItem} from '@osm/typings/jsx';
import {isMobile} from '@osm/utils/misc';
@@ -14,13 +15,11 @@ import {
Children,
Vnode
} from 'mithril';
+import Stream from 'mithril/stream';
import {
Attributes,
Component
} from 'mithril-utilities';
-import Stream from 'mithril/stream';
-import '../m3/NavigationDrawer';
-import '../m3/NavigationDrawerModal';
import {DrawerEntry} from './DrawerEntry';
diff --git a/resources/ts/Components/layout/DrawerEntry.tsx b/resources/ts/Components/layout/DrawerEntry.tsx
index 84d885482..874131b53 100644
--- a/resources/ts/Components/layout/DrawerEntry.tsx
+++ b/resources/ts/Components/layout/DrawerEntry.tsx
@@ -1,9 +1,9 @@
-import {router} from '@maicol07/inertia-mithril';
import '@material/web/icon/icon.js';
-import {ListItemLink} from '@material/web/list/lib/listitemlink/list-item-link';
import '@material/web/list/list-item-link.js';
-import type * as MaterialIcons from '@mdi/js';
+import {router} from '@maicol07/inertia-mithril';
+import {ListItemLink} from '@material/web/list/lib/listitemlink/list-item-link';
+import type * as MaterialIcons from '@mdi/js';
import MdIcon from '@osm/Components/MdIcon';
import {Vnode} from 'mithril';
import {
diff --git a/resources/ts/Components/layout/TopAppBar.tsx b/resources/ts/Components/layout/TopAppBar.tsx
index 3797d1cad..1672e57b0 100644
--- a/resources/ts/Components/layout/TopAppBar.tsx
+++ b/resources/ts/Components/layout/TopAppBar.tsx
@@ -1,10 +1,10 @@
import '@material/web/iconbutton/standard-icon-button.js';
+import '@osm/WebComponents/TopAppBar';
import {
mdiMenu,
mdiMenuOpen
} from '@mdi/js';
-
import logo from '@osm/../images/logo.png';
import Drawer from '@osm/Components/layout/Drawer';
import NotificationsAction from '@osm/Components/layout/topappbar_actions/NotificationsAction';
@@ -17,17 +17,16 @@ import {
isMobile,
mobileMediaQuery
} from '@osm/utils/misc';
-import '@osm/WebComponents/TopAppBar';
import {collect} from 'collect.js';
import {
Vnode,
VnodeDOM
} from 'mithril';
+import Stream from 'mithril/stream';
import {
Attributes,
Component
} from 'mithril-utilities';
-import Stream from 'mithril/stream';
export default class TopAppBar extends Component {
drawerOpenState = Stream(!isMobile());
diff --git a/resources/ts/Components/layout/topappbar_actions/NotificationsAction.ts b/resources/ts/Components/layout/topappbar_actions/NotificationsAction.ts
index 0a677eaf8..42c618a94 100644
--- a/resources/ts/Components/layout/topappbar_actions/NotificationsAction.ts
+++ b/resources/ts/Components/layout/topappbar_actions/NotificationsAction.ts
@@ -1,5 +1,4 @@
import {mdiBellOutline} from '@mdi/js';
-
import TopAppBarAction from '@osm/Components/layout/topappbar_actions/TopAppBarAction';
export default class NotificationsAction extends TopAppBarAction {
diff --git a/resources/ts/Components/layout/topappbar_actions/PeriodSwitcherAction.ts b/resources/ts/Components/layout/topappbar_actions/PeriodSwitcherAction.ts
index cf89e6d21..8f74ff7d4 100644
--- a/resources/ts/Components/layout/topappbar_actions/PeriodSwitcherAction.ts
+++ b/resources/ts/Components/layout/topappbar_actions/PeriodSwitcherAction.ts
@@ -1,5 +1,4 @@
import {mdiCalendarRangeOutline} from '@mdi/js';
-
import TopAppBarAction from '@osm/Components/layout/topappbar_actions/TopAppBarAction';
export default class PeriodSwitcherAction extends TopAppBarAction {
diff --git a/resources/ts/Components/layout/topappbar_actions/UserInfoAction.tsx b/resources/ts/Components/layout/topappbar_actions/UserInfoAction.tsx
index fcf518d4a..ca8f4515e 100644
--- a/resources/ts/Components/layout/topappbar_actions/UserInfoAction.tsx
+++ b/resources/ts/Components/layout/topappbar_actions/UserInfoAction.tsx
@@ -1,17 +1,17 @@
-import {router} from '@maicol07/inertia-mithril';
import '@material/web/button/outlined-button.js';
import '@material/web/button/text-button.js';
+
+import {router} from '@maicol07/inertia-mithril';
import {
mdiAccountCircleOutline,
mdiAccountOutline,
mdiLogoutVariant
} from '@mdi/js';
-
import Dialog from '@osm/Components/Dialogs/Dialog';
import MdIcon from '@osm/Components/MdIcon';
import {Vnode} from 'mithril';
-import {Request} from 'mithril-utilities';
import Stream from 'mithril/stream';
+import {Request} from 'mithril-utilities';
import TopAppBarAction from './TopAppBarAction';
diff --git a/resources/ts/Components/m3/NavigationDrawer.ts b/resources/ts/Components/m3/NavigationDrawer.ts
index 0f8e24d3c..1ce75ef7f 100644
--- a/resources/ts/Components/m3/NavigationDrawer.ts
+++ b/resources/ts/Components/m3/NavigationDrawer.ts
@@ -1,5 +1,5 @@
-import {styles} from '@material/web/navigationdrawer/lib/navigation-drawer-styles.css.js';
import {NavigationDrawer as MDNavigationDrawer} from '@material/web/navigationdrawer/lib/navigation-drawer.js';
+import {styles} from '@material/web/navigationdrawer/lib/navigation-drawer-styles.css.js';
import {styles as sharedStyles} from '@material/web/navigationdrawer/lib/shared-styles.css.js';
import {css} from 'lit';
import {customElement} from 'lit/decorators.js';
diff --git a/resources/ts/Components/m3/NavigationDrawerModal.ts b/resources/ts/Components/m3/NavigationDrawerModal.ts
index 27f03027c..5f941c85e 100644
--- a/resources/ts/Components/m3/NavigationDrawerModal.ts
+++ b/resources/ts/Components/m3/NavigationDrawerModal.ts
@@ -1,5 +1,5 @@
-import {styles} from '@material/web/navigationdrawer/lib/navigation-drawer-modal-styles.css.js';
import {NavigationDrawerModal as MDNavigationDrawerModal} from '@material/web/navigationdrawer/lib/navigation-drawer-modal.js';
+import {styles} from '@material/web/navigationdrawer/lib/navigation-drawer-modal-styles.css.js';
import {styles as sharedStyles} from '@material/web/navigationdrawer/lib/shared-styles.css.js';
import {css} from 'lit';
import {customElement} from 'lit/decorators.js';
diff --git a/resources/ts/Views/LoginPage.tsx b/resources/ts/Views/LoginPage.tsx
index 6d72c1069..f3d845acd 100644
--- a/resources/ts/Views/LoginPage.tsx
+++ b/resources/ts/Views/LoginPage.tsx
@@ -3,6 +3,7 @@ import '@material/web/button/filled-button.js';
import '@material/web/button/text-button.js';
import '@material/web/checkbox/checkbox.js';
import '@material/web/dialog/dialog.js';
+import '@osm/Components/m3/FilledTextField';
import {Dialog} from '@material/web/dialog/lib/dialog';
import {
@@ -12,8 +13,6 @@ import {
mdiLockQuestion,
mdiLoginVariant
} from '@mdi/js';
-import '@osm/Components/m3/FilledTextField';
-
import MdIcon from '@osm/Components/MdIcon';
import Page, {PageAttributes} from '@osm/Components/Page';
import {VnodeCollectionItem} from '@osm/typings/jsx';
@@ -23,13 +22,13 @@ import type {
Vnode,
VnodeDOM
} from 'mithril';
+import Stream from 'mithril/stream';
import {
Form,
FormSubmitEvent,
Request,
RequestError
} from 'mithril-utilities';
-import Stream from 'mithril/stream';
export default class LoginPage extends Page {
form = {
diff --git a/resources/ts/Views/ResetPasswordPage.tsx b/resources/ts/Views/ResetPasswordPage.tsx
index ca1b481dc..d07fd702e 100644
--- a/resources/ts/Views/ResetPasswordPage.tsx
+++ b/resources/ts/Views/ResetPasswordPage.tsx
@@ -1,26 +1,26 @@
-import {router} from '@maicol07/inertia-mithril';
import '@maicol07/material-web-additions/card/elevated-card.js';
import '@material/web/button/filled-button.js';
+import '@osm/Components/m3/FilledTextField';
+
+import {router} from '@maicol07/inertia-mithril';
import {
mdiAccountOutline,
mdiLockCheckOutline,
mdiLockOutline
} from '@mdi/js';
-import '@osm/Components/m3/FilledTextField';
-
import MdIcon from '@osm/Components/MdIcon';
import Page, {PageAttributes} from '@osm/Components/Page';
import {VnodeCollectionItem} from '@osm/typings/jsx';
import {showSnackbar} from '@osm/utils/misc';
import collect from 'collect.js';
import type {Vnode} from 'mithril';
+import Stream from 'mithril/stream';
import {
Form,
FormSubmitEvent,
Request,
RequestError
} from 'mithril-utilities';
-import Stream from 'mithril/stream';
export default class ResetPasswordPage extends Page {
form = {
diff --git a/resources/ts/Views/Setup/SetupPage.tsx b/resources/ts/Views/Setup/SetupPage.tsx
index c77c01445..b1ce45643 100644
--- a/resources/ts/Views/Setup/SetupPage.tsx
+++ b/resources/ts/Views/Setup/SetupPage.tsx
@@ -1,17 +1,17 @@
-import {router} from '@maicol07/inertia-mithril';
import '@maicol07/material-web-additions/card/elevated-card.js';
+import {router} from '@maicol07/inertia-mithril';
import Page, {PageAttributes} from '@osm/Components/Page';
import {showSnackbar} from '@osm/utils/misc';
import AdminUserStep from '@osm/Views/Setup/Steps/AdminUserStep';
import DatabaseStep from '@osm/Views/Setup/Steps/DatabaseStep';
import RegionalSettings from '@osm/Views/Setup/Steps/RegionalSettings';
import type {Vnode} from 'mithril';
+import Stream from 'mithril/stream';
import {
Request,
RequestError
} from 'mithril-utilities';
-import Stream from 'mithril/stream';
import {
SetupStep,
diff --git a/resources/ts/Views/Setup/Steps/AdminUserStep.tsx b/resources/ts/Views/Setup/Steps/AdminUserStep.tsx
index ae2a0336d..d33339267 100644
--- a/resources/ts/Views/Setup/Steps/AdminUserStep.tsx
+++ b/resources/ts/Views/Setup/Steps/AdminUserStep.tsx
@@ -1,4 +1,5 @@
import '@material/web/button/filled-button.js';
+import '@osm/Components/m3/FilledTextField';
import {
mdiAccountOutline,
@@ -7,8 +8,6 @@ import {
mdiLockCheckOutline,
mdiLockOutline
} from '@mdi/js';
-import '@osm/Components/m3/FilledTextField';
-
import MdIcon from '@osm/Components/MdIcon';
import {VnodeCollectionItem} from '@osm/typings/jsx';
import {
@@ -18,11 +17,11 @@ import {
} from '@osm/Views/Setup/Steps/SetupStep';
import collect from 'collect.js';
import {Vnode} from 'mithril';
+import Stream from 'mithril/stream';
import {
Form,
FormSubmitEvent
} from 'mithril-utilities';
-import Stream from 'mithril/stream';
interface AdminUserStepAttributes extends SetupStepAttributes {
onSaveInstall: (event: FormSubmitEvent) => void;
diff --git a/resources/ts/Views/Setup/Steps/DatabaseStep.tsx b/resources/ts/Views/Setup/Steps/DatabaseStep.tsx
index aef5bfefa..baf312a2f 100644
--- a/resources/ts/Views/Setup/Steps/DatabaseStep.tsx
+++ b/resources/ts/Views/Setup/Steps/DatabaseStep.tsx
@@ -1,4 +1,5 @@
import '@maicol07/material-web-additions/layout-grid/layout-grid.js';
+import '@osm/Components/m3/FilledTextField';
import {
mdiAccountOutline,
@@ -8,8 +9,6 @@ import {
mdiServerNetwork,
mdiTestTube
} from '@mdi/js';
-import '@osm/Components/m3/FilledTextField';
-
import MdIcon from '@osm/Components/MdIcon';
import {VnodeCollectionItem} from '@osm/typings/jsx';
import {showSnackbar} from '@osm/utils/misc';
@@ -18,12 +17,12 @@ import {
Children,
Vnode
} from 'mithril';
+import Stream from 'mithril/stream';
import {
Form,
Request,
RequestError
} from 'mithril-utilities';
-import Stream from 'mithril/stream';
import {
SetupStep,
diff --git a/resources/ts/Views/Setup/Steps/RegionalSettings.tsx b/resources/ts/Views/Setup/Steps/RegionalSettings.tsx
index bd37acc5c..d4e61ecf8 100644
--- a/resources/ts/Views/Setup/Steps/RegionalSettings.tsx
+++ b/resources/ts/Views/Setup/Steps/RegionalSettings.tsx
@@ -3,13 +3,12 @@ import {
mdiCalendarMonthOutline,
mdiClockOutline
} from '@mdi/js';
-
import MdIcon from '@osm/Components/MdIcon';
import {VnodeCollectionItem} from '@osm/typings/jsx';
import collect from 'collect.js';
import dayjs from 'dayjs';
-import {Form} from 'mithril-utilities';
import Stream from 'mithril/stream';
+import {Form} from 'mithril-utilities';
import {
SetupStep,
diff --git a/resources/ts/Views/Setup/Steps/SetupStep.tsx b/resources/ts/Views/Setup/Steps/SetupStep.tsx
index 6e2a79463..86934449f 100644
--- a/resources/ts/Views/Setup/Steps/SetupStep.tsx
+++ b/resources/ts/Views/Setup/Steps/SetupStep.tsx
@@ -4,7 +4,6 @@ import {
mdiChevronLeft,
mdiChevronRight
} from '@mdi/js';
-
import MdIcon from '@osm/Components/MdIcon';
import {
Children,
diff --git a/resources/ts/Views/Setup/Steps/WelcomeStep.tsx b/resources/ts/Views/Setup/Steps/WelcomeStep.tsx
index b15c004c6..ee7a084e2 100644
--- a/resources/ts/Views/Setup/Steps/WelcomeStep.tsx
+++ b/resources/ts/Views/Setup/Steps/WelcomeStep.tsx
@@ -1,9 +1,10 @@
-import type {MdCheckbox} from '@material/web/checkbox/checkbox';
import '@material/web/checkbox/checkbox.js';
import '@material/web/field/outlined-field.js';
import '@material/web/select/filled-select.js';
-import {Select} from '@material/web/select/lib/select';
import '@material/web/select/select-option.js';
+
+import type {MdCheckbox} from '@material/web/checkbox/checkbox';
+import {Select} from '@material/web/select/lib/select';
import {mdiLicense} from '@mdi/js';
import MdIcon from '@osm/Components/MdIcon';
import {
@@ -15,11 +16,11 @@ import {
showSnackbar
} from '@osm/utils/misc';
import {Vnode} from 'mithril';
+import Stream from 'mithril/stream';
import {
Request,
RequestError
} from 'mithril-utilities';
-import Stream from 'mithril/stream';
import {
SetupStep,
diff --git a/resources/ts/Views/Users/UsersRecordDialog.tsx b/resources/ts/Views/Users/UsersRecordDialog.tsx
index 3c920b08f..b9600166d 100644
--- a/resources/ts/Views/Users/UsersRecordDialog.tsx
+++ b/resources/ts/Views/Users/UsersRecordDialog.tsx
@@ -1,10 +1,10 @@
+import '@osm/Components/m3/FilledTextField';
+
import {
mdiAccountOutline,
mdiEmailOutline
} from '@mdi/js';
-
import AddEditRecordDialog from '@osm/Components/Dialogs/AddEditRecordDialog';
-import '@osm/Components/m3/FilledTextField';
import MdIcon from '@osm/Components/MdIcon';
import User, {UserAttributes} from '@osm/Models/User';
import {JSONAPI} from '@osm/typings/request';
diff --git a/resources/ts/app.ts b/resources/ts/app.ts
index 25f844928..24517416b 100644
--- a/resources/ts/app.ts
+++ b/resources/ts/app.ts
@@ -1,5 +1,6 @@
-import {createInertiaApp} from '@maicol07/inertia-mithril';
import '@osm/../scss/app.scss';
+
+import {createInertiaApp} from '@maicol07/inertia-mithril';
import {showSnackbar} from '@osm/utils/misc';
import Mithril from 'mithril';
import {registerSW} from 'virtual:pwa-register';
@@ -25,14 +26,14 @@ window.tr = translator;
window._v = vnodeTranslator;
window.__ = stringTranslator;
-// Load modules bootstrap
+// Load modules bootstrap file
import.meta.glob('../../vendor/**/**/resources/{js,ts}/bootstrap.{tsx,ts,js,jsx}', {eager: true});
await createInertiaApp({
title: ((title) => `${title} - OpenSTAManager`),
// This rule is disabled to avoid a bug in Inertia plugin
// eslint-disable-next-line arrow-body-style
- resolve: resolvePage((page) => {
+ resolve: resolvePage(() => {
return import.meta.glob('./Views/**/*.tsx');
}),
setup({el, App, props}) {
@@ -41,7 +42,7 @@ await createInertiaApp({
}
m.mount(el, {
- view: (vnode) => m(App, props)
+ view: () => m(App, props)
});
}
});
diff --git a/resources/ts/typings/global.d.ts b/resources/ts/typings/global.d.ts
index 32af1f9c5..c2581aed9 100644
--- a/resources/ts/typings/global.d.ts
+++ b/resources/ts/typings/global.d.ts
@@ -1,10 +1,10 @@
/* eslint-disable @typescript-eslint/naming-convention */
// noinspection JSFileReferences,JSUnusedGlobalSymbols,LocalVariableNamingConventionJS
import 'inertia-plugin/client';
-
-import type Mithril from 'mithril';
import 'vite-plugin-pwa/client.d';
import 'vite/client';
+
+import type Mithril from 'mithril';
import type router from 'ziggy-js';
import type {
@@ -25,6 +25,7 @@ declare global {
REVISION: string,
};
+ // noinspection LocalVariableNamingConventionJS
const LARAVEL_TRANSLATIONS: Record>;
interface Window {
@@ -36,6 +37,8 @@ declare global {
const m: typeof Mithril;
const tr: typeof translator;
+ // noinspection LocalVariableNamingConventionJS
const _v: typeof vnodeTranslator;
+ // noinspection LocalVariableNamingConventionJS
const __: typeof stringTranslator;
}
diff --git a/resources/ts/typings/jsx.d.ts b/resources/ts/typings/jsx.d.ts
index a0b7b7626..47c18b44f 100644
--- a/resources/ts/typings/jsx.d.ts
+++ b/resources/ts/typings/jsx.d.ts
@@ -1,7 +1,8 @@
+import 'mithril-utilities/typings';
+
import {LayoutGridAttributes} from '@maicol07/material-web-additions/layout-grid/lib/layout-grid';
import {Collection} from 'collect.js';
import Mithril from 'mithril';
-import 'mithril-utilities/typings';
export type VnodeCollectionItem = Record;
export type VnodeCollection = Collection;
diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php
index e9bf8282d..0e36a666d 100644
--- a/resources/views/app.blade.php
+++ b/resources/views/app.blade.php
@@ -3,7 +3,6 @@
- {{-- --}}
@lang('OpenSTAManager')
@@ -41,16 +40,6 @@
'time_format' => settings('time_format'),
]
]);
- {{--{--}}
- {{-- events: {},--}}
- {{-- locale: '{{app()->getLocale()}}',--}}
- {{-- modules: @js($modules->pluck('modules')->collapse()->all()),--}}
- {{-- theme: @js(session('high-contrast') ? 'high-contrast' : 'light'),--}}
- {{-- translations: @js(cache()->rememberForever('translations', static fn () => Controller::getTranslations()->toArray())),--}}
- {{-- user: @js(auth()->user()),--}}
- {{-- VERSION: @js(trim(file_get_contents(base_path('VERSION')))),--}}
- {{-- REVISION: @js(trim(file_get_contents(base_path('REVISION'))))--}}
- {{--};--}}
@routes
diff --git a/routes/api.php b/routes/api.php
index c57a447ed..023be0f55 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -1,7 +1,5 @@
id === (int) $id;
+Broadcast::channel('App.Models.User.{id}', static function (User $user, string|int $id) {
+ return $user->id === (int) $id;
});
diff --git a/routes/console.php b/routes/console.php
index e05f4c9a1..15fb1efa4 100644
--- a/routes/console.php
+++ b/routes/console.php
@@ -8,12 +8,14 @@ use Illuminate\Support\Facades\Artisan;
| Console Routes
|--------------------------------------------------------------------------
|
-| This file is where you may define all of your Closure based console
+| This file is where you may define all of your Closure-based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
-|
*/
Artisan::command('inspire', function () {
+ /**
+ * @psalm-suppress InvalidScope
+ */
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');
diff --git a/routes/web.php b/routes/web.php
index 7f7c4a69d..f6ac8ac2a 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -1,7 +1,5 @@
group(static function () {
->name('password.reset');
Route::inertia('setup', 'Setup/SetupPage', [
- 'languages' => cache()->rememberForever('app.languages', fn () => array_map(
- static fn ($file) => basename($file, '.json'),
- glob(lang_path('/*.json'), GLOB_NOSORT)
- )),
- 'license' => cache()->rememberForever('app.license', fn () => file_get_contents(base_path('LICENSE'))),
+ 'languages' => app(Controller::class)->getLanguages(),
+ 'license' => cache()->rememberForever('app.license', static fn () => file_get_contents(base_path('LICENSE'))),
'external' => true,
])
->middleware('guest', CheckConfigurationMiddleware::class)
@@ -57,7 +52,7 @@ Route::middleware('auth')->group(static function () {
->name('users.show');
});
-Route::get('refresh_csrf', static fn () => function () {
+Route::get('refresh_csrf', static fn () => static function () {
session()->regenerate();
return response()->json(['token' => csrf_token()]);