mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-31 17:19:56 +08:00
b4be9118ad
#### PR Dependency Tree * **PR #14426** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Admin dashboard: view workspace analytics (storage, sync activity, top shared links) with charts and configurable windows. * Document analytics tab: see total/unique/guest views and trends over selectable time windows. * Last-accessed members: view who last accessed a document, with pagination. * Shared links analytics: browse and paginate all shared links with view/unique/guest metrics and share URLs. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
63 lines
1.6 KiB
TypeScript
63 lines
1.6 KiB
TypeScript
// #region Path Parameter Types
|
|
export interface RouteParamsTypes {
|
|
admin: { settings: { module: { module: string } } };
|
|
}
|
|
// #endregion
|
|
|
|
// #region Absolute Paths
|
|
export const ROUTES = {
|
|
index: '/',
|
|
admin: {
|
|
index: '/admin',
|
|
auth: '/admin/auth',
|
|
setup: '/admin/setup',
|
|
dashboard: '/admin/dashboard',
|
|
accounts: '/admin/accounts',
|
|
workspaces: '/admin/workspaces',
|
|
queue: '/admin/queue',
|
|
ai: '/admin/ai',
|
|
settings: { index: '/admin/settings', module: '/admin/settings/:module' },
|
|
about: '/admin/about',
|
|
notFound: '/admin/404',
|
|
},
|
|
};
|
|
// #endregion
|
|
|
|
// #region Relative Paths
|
|
export const RELATIVE_ROUTES = {
|
|
index: '/',
|
|
admin: {
|
|
index: 'admin',
|
|
auth: 'auth',
|
|
setup: 'setup',
|
|
dashboard: 'dashboard',
|
|
accounts: 'accounts',
|
|
workspaces: 'workspaces',
|
|
queue: 'queue',
|
|
ai: 'ai',
|
|
settings: { index: 'settings', module: ':module' },
|
|
about: 'about',
|
|
notFound: '404',
|
|
},
|
|
};
|
|
// #endregion
|
|
|
|
// #region Path Factories
|
|
const home = () => '/';
|
|
const admin = () => '/admin';
|
|
admin.auth = () => '/admin/auth';
|
|
admin.setup = () => '/admin/setup';
|
|
admin.dashboard = () => '/admin/dashboard';
|
|
admin.accounts = () => '/admin/accounts';
|
|
admin.workspaces = () => '/admin/workspaces';
|
|
admin.queue = () => '/admin/queue';
|
|
admin.ai = () => '/admin/ai';
|
|
const admin_settings = () => '/admin/settings';
|
|
admin_settings.module = (params: { module: string }) =>
|
|
`/admin/settings/${params.module}`;
|
|
admin.settings = admin_settings;
|
|
admin.about = () => '/admin/about';
|
|
admin.notFound = () => '/admin/404';
|
|
export const FACTORIES = { admin, home };
|
|
// #endregion
|