Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/akismet/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"flarum-extension": {
"title": "Akismet",
"category": "feature",
"category": "moderation",
"icon": {
"image": "icon.jpg",
"backgroundSize": "cover",
Expand Down
2 changes: 1 addition & 1 deletion extensions/approval/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"flarum-extension": {
"title": "Approval",
"category": "feature",
"category": "moderation",
"icon": {
"name": "fas fa-check",
"backgroundColor": "#ABDC88",
Expand Down
2 changes: 1 addition & 1 deletion extensions/bbcode/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "BBCode",
"category": "feature",
"category": "formatting",
"icon": {
"name": "fas fa-bold",
"backgroundColor": "#238C59",
Expand Down
2 changes: 1 addition & 1 deletion extensions/embed/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Embed",
"category": "feature",
"category": "formatting",
"icon": {
"name": "fas fa-code",
"backgroundColor": "#B9D233",
Expand Down
2 changes: 1 addition & 1 deletion extensions/emoji/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"flarum-extension": {
"title": "Emoji",
"category": "feature",
"category": "formatting",
"icon": {
"image": "icon.svg",
"backgroundColor": "#FECC4D"
Expand Down
2 changes: 1 addition & 1 deletion extensions/flags/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Flags",
"category": "feature",
"category": "moderation",
"icon": {
"name": "fas fa-flag",
"backgroundColor": "#D659B5",
Expand Down
2 changes: 1 addition & 1 deletion extensions/gdpr/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"flarum-extension": {
"title": "GDPR Data Management",
"category": "feature",
"category": "moderation",
"icon": {
"image": "resources/logo.svg",
"backgroundColor": "#EBF1FD",
Expand Down
2 changes: 1 addition & 1 deletion extensions/likes/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Likes",
"category": "feature",
"category": "discussion",
"icon": {
"name": "far fa-thumbs-up",
"backgroundColor": "#3A649D",
Expand Down
2 changes: 1 addition & 1 deletion extensions/lock/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Lock",
"category": "feature",
"category": "moderation",
"icon": {
"name": "fas fa-lock",
"backgroundColor": "#ddd",
Expand Down
2 changes: 1 addition & 1 deletion extensions/markdown/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"flarum-extension": {
"title": "Markdown",
"category": "feature",
"category": "formatting",
"icon": {
"image": "icon.svg",
"backgroundColor": "#000",
Expand Down
2 changes: 1 addition & 1 deletion extensions/mentions/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Mentions",
"category": "feature",
"category": "discussion",
"optional-dependencies": [
"flarum/tags"
],
Expand Down
2 changes: 1 addition & 1 deletion extensions/messages/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"extra": {
"flarum-extension": {
"title": "Messages",
"category": "feature",
"category": "discussion",
"optional-dependencies": [
"flarum/tags"
],
Expand Down
2 changes: 1 addition & 1 deletion extensions/nicknames/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Nicknames",
"category": "feature",
"category": "discussion",
"icon": {
"name": "fas fa-user-tag",
"backgroundColor": "#8E4529",
Expand Down
2 changes: 1 addition & 1 deletion extensions/pusher/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"flarum-extension": {
"title": "Pusher",
"category": "feature",
"category": "infrastructure",
"icon": {
"image": "icon.png",
"backgroundSize": "46% 63%",
Expand Down
2 changes: 1 addition & 1 deletion extensions/realtime/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"flarum-extension": {
"title": "Realtime",
"category": "feature",
"category": "infrastructure",
"icon": {
"image": "resources/assets/logo.svg",
"backgroundColor": "#E3E7F1",
Expand Down
2 changes: 1 addition & 1 deletion extensions/statistics/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Statistics",
"category": "feature",
"category": "analytics",
"icon": {
"name": "fas fa-chart-bar",
"backgroundColor": "#6932d1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import app from 'flarum/admin/app';
import DashboardWidget, { IDashboardWidgetAttrs } from 'flarum/admin/components/DashboardWidget';
import LoadingIndicator from 'flarum/common/components/LoadingIndicator';
import Link from 'flarum/common/components/Link';
import Icon from 'flarum/common/components/Icon';

import abbreviateNumber from 'flarum/common/utils/abbreviateNumber';

Expand Down Expand Up @@ -46,7 +47,10 @@ export default class MiniStatisticsWidget extends DashboardWidget {
content() {
return (
<div className="StatisticsWidget-table">
<h4 className="StatisticsWidget-title">{app.translator.trans('flarum-statistics.admin.statistics.mini_heading')}</h4>
<h4 className="StatisticsWidget-title">
<Icon name="fas fa-chart-bar" />
{app.translator.trans('flarum-statistics.admin.statistics.mini_heading')}
</h4>

<div className="StatisticsWidget-entities">
<div className="StatisticsWidget-labels">
Expand Down
15 changes: 13 additions & 2 deletions extensions/statistics/less/admin.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,23 @@
padding: 0;

&--mini {
padding-top: 20px;
padding-top: 0;
}

&-title {
margin: 0 20px;
display: flex;
align-items: center;
gap: 8px;
margin: 0;
padding: 16px 20px 12px;
font-size: 13px;
font-weight: 600;
color: var(--muted-color);

.icon {
font-size: 12px;
opacity: 0.7;
}
}

&-entities {
Expand Down
2 changes: 1 addition & 1 deletion extensions/sticky/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Sticky",
"category": "feature",
"category": "discussion",
"icon": {
"name": "fas fa-thumbtack",
"backgroundColor": "#D13E32",
Expand Down
2 changes: 1 addition & 1 deletion extensions/subscriptions/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Subscriptions",
"category": "feature",
"category": "discussion",
"optional-dependencies": [
"flarum/approval"
],
Expand Down
2 changes: 1 addition & 1 deletion extensions/suspend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"flarum-extension": {
"title": "Suspend",
"category": "feature",
"category": "moderation",
"icon": {
"name": "fas fa-ban",
"backgroundColor": "#ddd",
Expand Down
2 changes: 1 addition & 1 deletion extensions/tags/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"flarum-extension": {
"title": "Tags",
"category": "feature",
"category": "discussion",
"icon": {
"name": "fas fa-tags",
"backgroundColor": "#F28326",
Expand Down
15 changes: 12 additions & 3 deletions framework/core/js/src/admin/AdminApplication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface Extension {
};
};
require?: Record<string, string>;
suggest?: Record<string, string>;
abandoned?: boolean | string;
}

Expand All @@ -56,6 +57,7 @@ export enum DatabaseDriver {

export interface AdminApplicationData extends ApplicationData {
extensions: Record<string, Extension>;
installedPackages: string[];
settings: Record<string, string>;
modelStatistics: Record<string, { total: number }>;
displayNameDrivers: string[];
Expand Down Expand Up @@ -91,9 +93,16 @@ export default class AdminApplication extends Application {
registry = new AdminRegistry();

extensionCategories: Record<string, number> = {
feature: 30,
theme: 20,
language: 10,
feature: 100,
moderation: 90,
discussion: 80,
authentication: 70,
formatting: 60,
infrastructure: 55,
analytics: 52,
other: 50,
theme: 40,
language: 30,
};

history: IHistory = {
Expand Down
Loading
Loading