mirror of
https://gitlab.com/niansa/discordlistforbots.git
synced 2025-03-06 20:49:22 +01:00
68 lines
2.2 KiB
Text
68 lines
2.2 KiB
Text
<%inc
|
|
/*
|
|
* discordlistforbots
|
|
* Copyright (C) 2021 niansa
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
|
|
#include "controllers/views.h"
|
|
#include "config.h" %>
|
|
<%c++ auto ref = @@.get<std::string>("ref");%>
|
|
<%c++ auto sessionData = @@.get<SessionDataPtr>("sessionData");%>
|
|
|
|
<html>
|
|
<head>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="/global.css">
|
|
<style>
|
|
#items>.special-button{width:100%;margin:unset;border-radius:0;padding:9px 0px;}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div style="text-align:right;">
|
|
<noscript>
|
|
<a href="{%ref%}" class="special-button">→</a>
|
|
</noscript>
|
|
<div id="jsBack" style="display:none;">
|
|
<a href="#" onclick="window.history.back();" class="special-button">→</a>
|
|
</div>
|
|
<script>
|
|
document.getElementById('jsBack').style.display = 'block';
|
|
</script>
|
|
<br>
|
|
</div>
|
|
<div id="items">
|
|
<p style="text-align:center;">{%std::string(sessionData?sessionData->discord_username:"Anonymous")%}</p>
|
|
<a class="special-button" href="/">Start</a><br>
|
|
<%c++ if (sessionData) {%>
|
|
<a class="special-button" href="/bots/@me">My bots</a><br>
|
|
<%c++ if (sessionData->moderator) {%>
|
|
<a class="special-button" href="/bots/@unapproved">Unapproved bots</a><br>
|
|
<%c++ }%>
|
|
<a class="special-button" href="/bots/register">Register bot</a><br>
|
|
<a class="special-button" href="/discorddeauth">Logout</a><br>
|
|
<%c++ } else {%>
|
|
<a class="special-button" href="/discordauth">Login</a><br>
|
|
<%c++ }%>
|
|
<br>
|
|
<a class="special-button" href="{%COMMUNITY%}" style="background-color:#7289da;">Join our Discord</a>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|