update admin page

This commit is contained in:
daria 2025-08-08 12:45:49 +03:00
parent d21f965372
commit 9ae3fb3038
No known key found for this signature in database
GPG Key ID: 3B75240E6B2F2701
3 changed files with 31 additions and 18 deletions

View File

@ -60,7 +60,7 @@ define([
// UNUSED-TRANSLATIONS:START
var categories = {
'general': { // Msg.admin_cat_general
icon: 'fa fa-user-o',
icon: 'register-homepage', // XXX
content: [
'instance-info-notice',
'name',
@ -71,21 +71,21 @@ define([
]
},
'customize': { // Msg.admin_cat_customize
icon: 'fa fa-paint-brush',
icon: 'customize',
content: [
'logo',
'color',
]
},
'admins': {
icon: 'fa fa-users',
icon: 'teams', // XXX
content: [
'list-admins',
'add-admins'
]
},
'broadcast' : { // Msg.admin_cat_broadcast
icon: 'fa fa-bullhorn',
icon: 'broadcast',
content : [
'notice',
'maintenance',
@ -94,20 +94,20 @@ define([
]
},
'security': { // Msg.admin_cat_security
icon: 'fa fa-lock',
icon: 'lock',
content: [
'enableembeds',
'forcemfa',
]
},
'apps': { // Msg.admin_cat_apps
icon: 'fa fa-wrench',
icon: 'apps-settings',
content: [
'apps',
]
},
'users' : { // Msg.admin_cat_users
icon : 'fa fa-address-card-o',
icon : 'user-directory',
content : [
'registration',
'invitation',
@ -115,7 +115,7 @@ define([
]
},
'quota': { // Msg.admin_cat_quota
icon: 'fa fa-hdd-o',
icon: 'drive',
content: [
'defaultlimit',
'setlimit',
@ -123,7 +123,7 @@ define([
]
},
'database' : { // Msg.admin_cat_database
icon : 'fa fa-database',
icon : 'database',
content : [
'account-metadata',
'document-metadata',
@ -133,14 +133,14 @@ define([
]
},
'support' : { // Msg.admin_cat_support
icon : 'fa fa-ambulance',
icon : 'support-mailbox', // XXX
content : [
'support-setup',
'support-team',
]
},
'stats' : { // Msg.admin_cat_stats
icon : 'fa fa-line-chart',
icon : 'stats',
content : [
'refresh-stats',
'uptime',
@ -152,7 +152,7 @@ define([
]
},
'performance' : { // Msg.admin_cat_performance
icon : 'fa fa-heartbeat',
icon : 'performance',
content : [
'refresh-performance',
'performance-profiling',
@ -161,7 +161,7 @@ define([
]
},
'network' : { // Msg.admin_cat_network
icon : 'fa fa-sitemap',
icon : 'network',
content : [
'update-available',
'checkup',

View File

@ -17,7 +17,7 @@ define([
"login": "log-in",
"logout": "log-out",
"logout-everywhere": "unplug",
"register-homepage": "user",
"register-homepage": "user", // XXX
"register": "user-round-plus",
"chevron-left": "chevron-left",
"chevron-right": "chevron-right",
@ -48,7 +48,7 @@ define([
"drive-upload-file": "file-up",
"drive-upload-folder": "folder-up",
"drive-file": "file",
"teams": "users-round",
"teams": "users-round", // XXX change name, multiple usages
"calendar": "calendar-days",
"calendar-inactive": "calendar",
"calendar-add": "calendar-plus-2",
@ -57,7 +57,7 @@ define([
"settings": "settings",
"administration": "monitor-cog",
"support": "life-buoy",
"support-mailbox": "ambulance",
"support-mailbox": "ambulance", // XXX
"homepage": "house",
"file-template": "file-type", // XXX
"file-pad": "file-text",
@ -66,6 +66,7 @@ define([
"access": "lock-open",
"rename": "pen-line",
"color-palette": "palette",
"customize": "brush",
"upload": "hard-drive-upload",
"download": "hard-drive-download",
"destroy": "shredder",
@ -106,6 +107,13 @@ define([
"loading": "loader", // XXX
"notification" : "bell",
"cursor": "text-cursor",
"broadcast": "radio",
"apps-settings": "wrench",
"user-directory": "id-card",
"database": "database",
"stats": "chart-line",
"performance": "heart-pulse",
"network": "network"
};
Icons.get = (name, attrs = {}) => {

View File

@ -12,6 +12,8 @@ define([
'/common/common-hash.js',
'/customize/messages.js',
'/common/hyperscript.js',
'/customize/fonts/lucide.js',
'/common/common-icons.js',
], function(
$,
ApiConfig,
@ -21,7 +23,9 @@ define([
Util,
Hash,
Messages,
h
h,
Lucide,
Icons
) {
const Sidebar = {};
const keyToCamlCase = (key) => {
@ -380,7 +384,7 @@ define([
if (!active && !i) { active = key; }
var category = categories[key];
var icon;
if (category.icon) { icon = h('span', { class: category.icon }); }
if (category.icon) { icon = Icons.get(category.icon); }
var item = h('li.cp-sidebarlayout-category', {
'role': 'menuitem',
'tabindex': 0,
@ -407,6 +411,7 @@ define([
common.setHash(active);
setTimeout(() => { sidebar.openCategory(active); });
setTimeout( () => Lucide.createIcons());
$leftside.append(container);
};