From c26a1dca22fcced7b9cd37ace7a20ae71491fd66 Mon Sep 17 00:00:00 2001 From: winter Date: Wed, 26 Mar 2025 23:45:22 +0000 Subject: add plugin admin page --- templates/admin/overview_page.php | 13 +++++++++++++ templates/admin/plugin_card.php | 30 ++++++++++++++++++++++++++++++ templates/admin/plugin_download_form.php | 16 ++++++++++++++++ templates/admin/plugins_page.php | 18 ++++++++++++++++++ templates/mobilepane_right.php | 2 +- templates/navigation/left_side.php | 2 +- 6 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 templates/admin/overview_page.php create mode 100644 templates/admin/plugin_card.php create mode 100644 templates/admin/plugin_download_form.php create mode 100644 templates/admin/plugins_page.php (limited to 'templates') diff --git a/templates/admin/overview_page.php b/templates/admin/overview_page.php new file mode 100644 index 0000000..d3325ef --- /dev/null +++ b/templates/admin/overview_page.php @@ -0,0 +1,13 @@ + __('admin.pageTitle')], function () { + call_template('navigation/side_links', ['links' => [ + [ + 'icon' => 'settings-outline', + 'label' => __('globalSettings.category.instance'), + 'href' => '/admin/settings/instance' + ], [ + 'icon' => 'extension-outline', + 'label' => __('admin.plugins.pageTitle'), + 'href' => '/admin/plugins' + ] + ]]); +}); \ No newline at end of file diff --git a/templates/admin/plugin_card.php b/templates/admin/plugin_card.php new file mode 100644 index 0000000..4a32e07 --- /dev/null +++ b/templates/admin/plugin_card.php @@ -0,0 +1,30 @@ + + +homepage)): ?> + + + +
+
+
name ?>
+
version)) ?>
+
author)) ?>
+
+
+ +
+ +
+
+ + homepage)): ?> +
+ \ No newline at end of file diff --git a/templates/admin/plugin_download_form.php b/templates/admin/plugin_download_form.php new file mode 100644 index 0000000..2e9b2a8 --- /dev/null +++ b/templates/admin/plugin_download_form.php @@ -0,0 +1,16 @@ +
+
+
+ + +
+
+ +
+
+ + + +
\ No newline at end of file diff --git a/templates/admin/plugins_page.php b/templates/admin/plugins_page.php new file mode 100644 index 0000000..e32536b --- /dev/null +++ b/templates/admin/plugins_page.php @@ -0,0 +1,18 @@ + __('admin.plugins.pageTitle')], function () { ?> + 'info', 'message' => __('admin.plugins.info')]); ?> + +

+ $metadata) { + call_template('admin/plugin_card', ['meta' => $metadata, 'filename' => basename($filename)]); + } + if (count(PluginLoader::$loadedPlugins) == 0) { + call_template('placeholder_text'); + } ?> + +

+ + - <?= __('writeNote.label') ?> — <?= $settings->get('instance.name') ?> + <?= __('notifications.heading') ?> — <?= $settings->get('instance.name') ?> diff --git a/templates/navigation/left_side.php b/templates/navigation/left_side.php index 219e7a1..a7e782c 100644 --- a/templates/navigation/left_side.php +++ b/templates/navigation/left_side.php @@ -21,7 +21,7 @@ if ($user != null) { 'label' => __('preferences.pageTitle') ]]; if ($user->isAdmin) { - $links[] = ['href' => '/admin/settings/instance', 'icon' => 'settings-outline', 'label' => __('navigation.instanceSettings')]; + $links[] = ['href' => '/admin', 'icon' => 'admin-panel-settings-outline', 'label' => __('admin.pageTitle')]; } } $links[] = [ -- cgit v1.3