From 66bdcf04f431d615b5fac93e7677e7304888e90c Mon Sep 17 00:00:00 2001
From: winter
Date: Sat, 18 Jan 2025 20:02:39 +0000
Subject: implement settings editor page
---
templates/skeleton.php | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
(limited to 'templates/skeleton.php')
diff --git a/templates/skeleton.php b/templates/skeleton.php
index b274484..3aaf132 100644
--- a/templates/skeleton.php
+++ b/templates/skeleton.php
@@ -1,5 +1,6 @@
@@ -28,7 +29,7 @@ $user = Digitigrade\Model\UserAccount::findByCurrentSession();
]);
call_template('navigation_links', ['links' => $links]);
?>
- = __('digitigrade') ?>
+ = GlobalSettings::getInstance()->get('instance.name') ?>
[
@@ -47,15 +48,17 @@ $user = Digitigrade\Model\UserAccount::findByCurrentSession();
[
- [
- 'href' => '/followrequests',
- 'icon' => 'person_add',
- 'label' => __('navigation.followRequests'),
- 'unreadCount' => FollowRelation::countWhere("object = ? AND status = 'pending'", [$user->actor->id])
- ],
- ['href' => '/logout', 'icon' => 'logout', 'label' => __('navigation.logout')]
- ]]);
+ $links = [[
+ 'href' => '/followrequests',
+ 'icon' => 'person_add',
+ 'label' => __('navigation.followRequests'),
+ 'unreadCount' => FollowRelation::countWhere("object = ? AND status = 'pending'", [$user->actor->id])
+ ]];
+ if ($user->isAdmin) {
+ $links[] = ['href' => '/admin/settings/instance', 'icon' => 'settings', 'label' => __('navigation.instanceSettings')];
+ }
+ $links[] = ['href' => '/logout', 'icon' => 'logout', 'label' => __('navigation.logout')];
+ call_template('side_navigation', ['links' => $links]);
}
?>
--
cgit v1.3