Поправил манифест

This commit is contained in:
Александр Кирюхин 2024-01-21 02:29:41 +03:00
parent 5256756411
commit 955fed547c
3 changed files with 20 additions and 16 deletions

View file

@ -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)

View file

@ -53,9 +53,9 @@ const manifest = {
],
theme_color: '#fb923c',
background_color: '#171e26',
display: 'standalone',
display: 'minimal-ui',
scope: '/',
start_url: '/quests'
start_url: '/'
}
}

View file

@ -99,8 +99,10 @@ func main() {
}
}
}
return echo.ErrForbidden
}
return nil
}