mirror of
https://github.com/kevachat/webapp.git
synced 2025-01-22 04:24:18 +00:00
return room list on main page by default
This commit is contained in:
parent
a45702308f
commit
725bfa28cb
6
.env
6
.env
@ -19,7 +19,7 @@ APP_ENV=dev
|
||||
APP_SECRET=EDIT_ME
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
APP_VERSION=1.12.1
|
||||
APP_VERSION=1.13.0
|
||||
|
||||
APP_NAME=KevaChat
|
||||
|
||||
@ -57,13 +57,13 @@ APP_KEVACOIN_MINE_SOLO_URL=https://kevacoin.org/tutorial_solo_mining.html
|
||||
APP_KEVACOIN_EXPLORER_URL=https://keva.one/explorer/address/
|
||||
|
||||
# Pinned room namespaces, separated with |
|
||||
APP_KEVACOIN_ROOM_NAMESPACES_PINNED=EDIT_ME
|
||||
APP_KEVACOIN_ROOM_NAMESPACES_PINNED=
|
||||
|
||||
# Allowed room namespaces for read only (e.g. project news) separated with |
|
||||
APP_KEVACOIN_ROOM_NAMESPACES_READONLY=
|
||||
|
||||
# Redirect from index page to default room
|
||||
APP_KEVACOIN_ROOM_NAMESPACE_DEFAULT=EDIT_ME
|
||||
APP_KEVACOIN_ROOM_NAMESPACE_DEFAULT=
|
||||
|
||||
# Session expire
|
||||
APP_SESSION_DEFAULT_TIMEOUT=2592000
|
||||
|
@ -62,7 +62,7 @@ Application package contain settings preset, just few steps required to launch:
|
||||
* Send few coins to this address and wait for new block to continue
|
||||
* To allow users registration, create namespace `kevacoin-cli keva_namespace "_KEVACHAT_USERS_"`
|
||||
* Create at least one room namespace with Web UI or CLI `kevacoin-cli keva_namespace "sandbox"`
|
||||
* Provide at least one namespace for default chat room to `env`.`APP_KEVACOIN_ROOM_NAMESPACE_DEFAULT` (for homepage redirects)
|
||||
* Optionally, provide namespace for default chat room at `env`.`APP_KEVACOIN_ROOM_NAMESPACE_DEFAULT` (for homepage redirect)
|
||||
|
||||
## Contribution
|
||||
|
||||
|
@ -29,12 +29,21 @@ class RoomController extends AbstractController
|
||||
?Request $request
|
||||
): Response
|
||||
{
|
||||
return $this->redirectToRoute(
|
||||
'room_namespace',
|
||||
[
|
||||
'namespace' => $request->get('namespace') ? $request->get('namespace') : $this->getParameter('app.kevacoin.room.namespace.default'),
|
||||
'_fragment' => 'latest'
|
||||
]
|
||||
// Redirect to default room on defined
|
||||
if ($this->getParameter('app.kevacoin.room.namespace.default'))
|
||||
{
|
||||
return $this->redirectToRoute(
|
||||
'room_namespace',
|
||||
[
|
||||
'namespace' => $request->get('namespace') ? $request->get('namespace') : $this->getParameter('app.kevacoin.room.namespace.default'),
|
||||
'_fragment' => 'latest'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// Return room list by default
|
||||
return $this->list(
|
||||
$request
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
{% endif %}
|
||||
<h2>
|
||||
<i>
|
||||
{% if 'room_list' == request.get('_route') %}
|
||||
{% if 'room_index' == request.get('_route') || 'room_list' == request.get('_route') %}
|
||||
{{ 'rooms' | trans }}
|
||||
{% else %}
|
||||
<a href="{{ path('room_list') }}">{{ 'rooms' | trans }}</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user