diff --git a/frontend/src/components/Layout.jsx b/frontend/src/components/Layout.jsx index 9279613..b6ace7e 100644 --- a/frontend/src/components/Layout.jsx +++ b/frontend/src/components/Layout.jsx @@ -35,20 +35,6 @@ const AppLayout = () => { label: 'Квесты', link: '/quests' }, - hasRole('creator') - ? { - key: 'quest/new', - label: 'Создать квест', - link: '/quest/new' - } - : null, - hasRole('admin') - ? { - key: 'admin', - label: 'Админка', - link: '/admin' - } - : null, { key: 'me', label: `${user.username} [${user.level}]`, @@ -60,6 +46,22 @@ const AppLayout = () => { onClick: logout } ] + + if (hasRole('creator')) { + items.push({ + key: 'quest/new', + label: 'Создать квест', + link: '/quest/new' + }) + } + + if (hasRole('admin')) { + items.push({ + key: 'admin', + label: 'Админка', + link: '/admin' + }) + } } const menuHandler = (x) => { const item = items.find(y => y.key === x.key) diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 58bae82..44d960d 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -53,9 +53,9 @@ const manifest = { ], theme_color: '#fb923c', background_color: '#171e26', - display: 'standalone', + display: 'minimal-ui', scope: '/', - start_url: '/quests' + start_url: '/' } } diff --git a/main.go b/main.go index db83bf2..4fb4ecb 100644 --- a/main.go +++ b/main.go @@ -99,8 +99,10 @@ func main() { } } } + return echo.ErrForbidden } + return nil }