diff --git a/public/css/default.css b/public/css/default.css index 0ebadc4..11a1baf 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -64,6 +64,14 @@ main display: block; } +main > h1 +{ + font-size: 14px; + font-weight: normal; + margin: 16px 0; + padding: 0 4px; +} + main > form > input[type="text"] { box-sizing: border-box; @@ -71,6 +79,18 @@ main > form > input[type="text"] width: 100%; } +main > ul +{ + margin-bottom: 16px; + margin-left: 16px; + margin-top: 16px; +} + +main > ul > li +{ + margin: 8px 0; +} + footer { display: block; diff --git a/src/Controller/ModuleController.php b/src/Controller/ModuleController.php index f010fa2..0e7e345 100644 --- a/src/Controller/ModuleController.php +++ b/src/Controller/ModuleController.php @@ -48,16 +48,29 @@ class ModuleController extends AbstractController $this->getParameter('app.kevacoin.password') ); + $name = null; + $list = []; + foreach ((array) $client->kevaListNamespaces() as $value) { + if ($value['namespaceId'] == $request->get('namespace')) + { + $name = $value['displayName']; + } + $list[$value['namespaceId']] = $value['displayName']; } + asort($list); + return $this->render( 'default/module/room.html.twig', [ - 'room' => $request->get('room'), + 'room' => [ + 'name' => $name, + 'namespace' => $request->get('namespace') + ], 'list' => $list ] ); diff --git a/src/Controller/RoomController.php b/src/Controller/RoomController.php index 6ba350d..c678e59 100644 --- a/src/Controller/RoomController.php +++ b/src/Controller/RoomController.php @@ -65,6 +65,10 @@ class RoomController extends AbstractController return $this->render( 'default/room/index.html.twig', [ + 'room' => + [ + 'namespace' => $request->get('namespace') + ], 'messages' => $messages, 'request' => $request ] diff --git a/templates/default/module/room.html.twig b/templates/default/module/room.html.twig index d0daa2e..4fac494 100644 --- a/templates/default/module/room.html.twig +++ b/templates/default/module/room.html.twig @@ -1,3 +1,21 @@
\ No newline at end of file + + +{% if room.name %} +