discourse/app/assets/javascripts/admin/routes/admin-route-map.js.es6
Sam a3e8c3cd7b FEATURE: Native theme support
This feature introduces the concept of themes. Themes are an evolution
of site customizations.

Themes introduce two very big conceptual changes:

- A theme may include other "child themes", children can include grand
children and so on.

- A theme may specify a color scheme

The change does away with the idea of "enabled" color schemes.

It also adds a bunch of big niceties like

- You can source a theme from a git repo

- History for themes is much improved

- You can only have a single enabled theme. Themes can be selected by
    users, if you opt for it.

On a technical level this change comes with a whole bunch of goodies

- All CSS is now compiled using a custom pipeline that uses libsass
    see /lib/stylesheet

- There is a single pipeline for css compilation (in the past we used
    one for customizations and another one for the rest of the app

- The stylesheet pipeline is now divorced of sprockets, there is no
   reliance on sprockets for CSS bundling

- CSS is generated with source maps everywhere (including themes) this
    makes debugging much easier

- Our "live reloader" is smarter and avoid a flash of unstyled content
   we run a file watcher in "puma" in dev so you no longer need to run
   rake autospec to watch for CSS changes
2017-04-12 10:53:49 -04:00

95 lines
3.8 KiB
JavaScript

export default function() {
this.route('admin', { resetNamespace: true }, function() {
this.route('dashboard', { path: '/' });
this.route('adminSiteSettings', { path: '/site_settings', resetNamespace: true }, function() {
this.route('adminSiteSettingsCategory', { path: 'category/:category_id', resetNamespace: true} );
});
this.route('adminEmail', { path: '/email', resetNamespace: true}, function() {
this.route('sent');
this.route('skipped');
this.route('bounced');
this.route('received');
this.route('rejected');
this.route('previewDigest', { path: '/preview-digest' });
});
this.route('adminCustomize', { path: '/customize', resetNamespace: true } ,function() {
this.route('colors', function() {
this.route('show', {path: '/:scheme_id'});
});
this.route('adminCustomizeThemes', { path: 'themes', resetNamespace: true }, function() {
this.route('show', {path: '/:theme_id'});
this.route('edit', {path: '/:theme_id/:target/:field_name/edit'});
});
this.route('adminSiteText', { path: '/site_texts', resetNamespace: true }, function() {
this.route('edit', { path: '/:id' });
});
this.route('adminUserFields', { path: '/user_fields', resetNamespace: true });
this.route('adminEmojis', { path: '/emojis', resetNamespace: true });
this.route('adminPermalinks', { path: '/permalinks', resetNamespace: true });
this.route('adminEmbedding', { path: '/embedding', resetNamespace: true });
this.route('adminCustomizeEmailTemplates', { path: '/email_templates', resetNamespace: true }, function() {
this.route('edit', { path: '/:id' });
});
});
this.route('adminApi', { path: '/api', resetNamespace: true }, function() {
this.route('adminApiKeys', { path: '/keys', resetNamespace: true });
this.route('adminWebHooks', { path: '/web_hooks', resetNamespace: true }, function() {
this.route('show', { path: '/:web_hook_id' });
this.route('showEvents', { path: '/:web_hook_id/events' });
});
});
this.route('admin.backups', { path: '/backups', resetNamespace: true }, function() {
this.route('logs');
});
this.route('adminReports', { path: '/reports/:type', resetNamespace: true });
this.route('adminFlags', { path: '/flags', resetNamespace: true }, function() {
this.route('list', { path: '/:filter' });
});
this.route('adminLogs', { path: '/logs', resetNamespace: true }, function() {
this.route('staffActionLogs', { path: '/staff_action_logs' });
this.route('screenedEmails', { path: '/screened_emails' });
this.route('screenedIpAddresses', { path: '/screened_ip_addresses' });
this.route('screenedUrls', { path: '/screened_urls' });
});
this.route('adminGroups', { path: '/groups', resetNamespace: true }, function() {
this.route('bulk');
this.route('bulkComplete', { path: 'bulk-complete' });
this.route('adminGroupsType', { path: '/:type', resetNamespace: true }, function() {
this.route('adminGroup', { path: '/:name', resetNamespace: true });
});
});
this.route('adminUsers', { path: '/users', resetNamespace: true }, function() {
this.route('adminUser', { path: '/:user_id/:username', resetNamespace: true }, function() {
this.route('badges');
this.route('tl3Requirements', { path: '/tl3_requirements' });
});
this.route('adminUsersList', { path: '/list', resetNamespace: true }, function() {
this.route('show', { path: '/:filter' });
});
});
this.route('adminBadges', { path: '/badges', resetNamespace: true }, function() {
this.route('show', { path: '/:badge_id' });
});
this.route('adminPlugins', { path: '/plugins', resetNamespace: true }, function() {
this.route('index', { path: '/' });
});
});
};