Update and remove page-transitions for some security reason

This commit is contained in:
SuperSonic 2020-02-07 22:11:44 +08:00
parent 98ffd6c03c
commit 52088d391b
13 changed files with 257 additions and 316 deletions

View file

@ -5,4 +5,35 @@ Yuuki_Libs
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
"""
from .reader import Yuuki_WebDataReader
class Yuuki_WebAdminAPI:
def __init__(self, YuukiData):
self.YukkiData = YuukiData
self.Yuuki_DataHandle = Yuuki_WebDataReader(YuukiData)
self.events = {
"": self.nothing,
"get_logs": self.get_logs,
"get_groups_joined": self.get_groups_joined,
}
def init(self, **action):
action.setdefault('task', "")
action.setdefault('data', None)
return self.events[action["task"]](action["data"])
def get_groups_joined(self, **data):
data.setdefault('data', None)
return self.YukkiData.getData(["Global", "GroupJoined"])
def get_logs(self, **data):
data.setdefault('name', None)
if data.get("name"):
return self.Yuuki_DataHandle.get_log(data["name"])
return self.Yuuki_DataHandle.get_all_logs()
@staticmethod
def nothing(data):
if data:
pass

View file

@ -15,11 +15,11 @@ from flask import Flask, render_template, Response, request, redirect
from flask_bootstrap import Bootstrap
from gevent.pywsgi import WSGIServer
from .reader import Yuuki_WebDataReader
from .api import Yuuki_WebAdminAPI
wa_app = Flask(__name__)
Yuuki_Handle = None
Yuuki_DataHandle = None
Yuuki_APIHandle = None
passports = []
password = str(hash(random.random()))
@ -27,9 +27,9 @@ password = str(hash(random.random()))
class Yuuki_WebAdmin:
def __init__(self, Yuuki):
global Yuuki_Handle, Yuuki_DataHandle
global Yuuki_Handle, Yuuki_APIHandle
Yuuki_Handle = Yuuki
Yuuki_DataHandle = Yuuki_WebDataReader(Yuuki_Handle.data)
Yuuki_APIHandle = Yuuki_WebAdminAPI(Yuuki_Handle.data)
self.app = wa_app
Bootstrap(self.app)
@ -99,7 +99,7 @@ class Yuuki_WebAdmin:
if "yuuki_admin" in request.cookies:
if request.cookies["yuuki_admin"] in passports:
return render_template(
'manage/groups.html'
'manage/settings.html'
)
response = redirect("/")
response.set_cookie(
@ -155,16 +155,15 @@ class Yuuki_WebAdmin:
return response
@staticmethod
@wa_app.route("/api/logs")
@wa_app.route("/api/logs/<name>")
def logs(name=""):
@wa_app.route("/api", methods=['GET', 'POST'])
def api():
result = {"status": 403}
if "yuuki_admin" in request.cookies:
if request.method == "POST" and "task" in request.values:
if request.cookies.get("yuuki_admin") in passports:
if name:
result = Yuuki_DataHandle.get_log(name)
else:
result = Yuuki_DataHandle.get_all_logs()
query_result = Yuuki_APIHandle.init(request.values)
result = {"status": 200, "result": query_result}
else:
result = {"status": 401}
return Response(json.dumps(result), mimetype='application/json')
@staticmethod

View file

@ -0,0 +1,16 @@
$(function () {
$.ajax({
url: "/api",
type: "GET",
data: {
user_name: $("#user_name").val()
},
error: function(xhr) {
alert("Something was wrong.");
},
success: function(response) {
$("#msg_user_name").html(response);
$("#msg_user_name").fadeIn();
}
});
})

View file

@ -13,7 +13,7 @@
if (window.location.pathname === p_key)
nav_list += "<a class=\"nav-link active\" href=\"" + p_key + "\">" + page_list[p_key] + "</a>";
else
nav_list += "<a class=\"nav-link js-lookforward\" data-transition-enter=\"slideleft\" href=\"" + p_key + "\">" + page_list[p_key] + "</a>";
nav_list += "<a class=\"nav-link\" data-transition-enter=\"slideleft\" href=\"" + p_key + "\">" + page_list[p_key] + "</a>";
}
var html_text =
"<nav class=\"navbar navbar-expand-md navbar-dark fixed-top bg-dark\">" +

View file

@ -8,7 +8,7 @@
<!-- Bootstrap CSS -->
{{ bootstrap.load_css() }}
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}"/>
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}"/>
<title>Star Yuuki BOT - WebAdmin</title>
</head>
@ -53,7 +53,7 @@
<!-- Optional JavaScript -->
{{ bootstrap.load_js() }}
<script src="https://cdn.jsdelivr.net/npm/js-cookie@beta/dist/js.cookie.min.js"></script>
<script src="{{ url_for('static', filename='verify.js') }}"></script>
<script src="{{ url_for('static', filename='js/verify.js') }}"></script>
</body>
</html>

View file

@ -9,188 +9,28 @@
<!-- Bootstrap CSS -->
{{ bootstrap.load_css() }}
<link rel="stylesheet" href="https://unpkg.com/lookforward@0.1.1/css/lookforward.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}"/>
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}" />
<title>Star Yuuki BOT - WebAdmin</title>
</head>
<body>
{% from 'bootstrap/nav.html' import render_nav_item %}
{% from 'bootstrap/nav.html' import render_nav_item %}
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="/">{{ name }} - WebAdmin</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse"
aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
{{ render_nav_item('index') }}
</ul>
<a href="/logout">
<button class="btn btn-outline-success my-2 my-sm-0">Logout</button>
</a>
</div>
</nav>
<div class="nav-scroller bg-white shadow-sm">
<nav class="nav nav-underline">
<a class="nav-link active" href="/">Dashboard</a>
<a class="nav-link js-lookforward" data-transition-enter="slideup" data-transition-leave="slidedown"
href="/groups">Groups
<span class="badge badge-pill bg-light align-text-bottom">27</span>
</a>
<a class="nav-link js-lookforward" data-transition-enter="slideup" data-transition-leave="slidedown"
href="/helpers">Helpers
<span class="badge badge-pill bg-light align-text-bottom">27</span>
</a>
<a class="nav-link js-lookforward" data-transition-enter="slideup" data-transition-leave="slidedown"
href="/settings">Settings</a>
</nav>
</div>
<main role="main" class="container">
<div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded shadow-sm">
<img class="mr-3" src="{{ LINE_Media_server}}/{{pictureStatus }}" alt="" width="48" height="48">
<div class="lh-100">
<h6 class="mb-0 text-white lh-100">{{ profileName }}</h6>
<small>on {{ name }} {{ version }}</small>
</div>
</div>
<div class="container marketing">
<div class="row">
<div class="col-lg-2">
<a href="#">
<svg class="bd-placeholder-img rounded-circle" width="140" height="140"
xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false"
role="img" aria-label="Placeholder: 140x140">
<title>Action</title>
<rect width="100%" height="100%" fill="#777"/>
<text x="50%" y="50%" fill="#777"
dy=".3em">140x140
</text>
</svg>
</a>
</div>
<div class="col-lg-2">
<a href="#">
<svg class="bd-placeholder-img rounded-circle" width="140" height="140"
xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false"
role="img" aria-label="Placeholder: 140x140">
<title>Action</title>
<rect width="100%" height="100%" fill="#777"/>
<text x="50%" y="50%" fill="#777"
dy=".3em">140x140
</text>
</svg>
</a>
</div>
<div class="col-lg-2">
<a href="#">
<svg class="bd-placeholder-img rounded-circle" width="140" height="140"
xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false"
role="img" aria-label="Placeholder: 140x140">
<title>Action</title>
<rect width="100%" height="100%" fill="#777"/>
<text x="50%" y="50%" fill="#777"
dy=".3em">140x140
</text>
</svg>
</a>
</div>
<div class="col-lg-2">
<a href="#">
<svg class="bd-placeholder-img rounded-circle" width="140" height="140"
xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false"
role="img" aria-label="Placeholder: 140x140">
<title>Action</title>
<rect width="100%" height="100%" fill="#777"/>
<text x="50%" y="50%" fill="#777"
dy=".3em">140x140
</text>
</svg>
</a>
</div>
<div class="col-lg-2">
<a href="#">
<svg class="bd-placeholder-img rounded-circle" width="140" height="140"
xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false"
role="img" aria-label="Placeholder: 140x140">
<title>Action</title>
<rect width="100%" height="100%" fill="#777"/>
<text x="50%" y="50%" fill="#777"
dy=".3em">140x140
</text>
</svg>
</a>
</div>
</div>
<div id="header"></div>
<main role="main" class="container">
<div class="my-3 p-3 bg-white rounded shadow-sm">
<h6 class="border-bottom border-gray pb-2 mb-0">Recent updates</h6>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32"
xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false"
role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#007bff"/>
<text x="50%" y="50%" fill="#007bff"
dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Kick Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32"
xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false"
role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#e83e8c"/>
<text x="50%" y="50%" fill="#e83e8c"
dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Cancel Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32"
xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false"
role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#6f42c1"/>
<text x="50%" y="50%" fill="#6f42c1"
dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Join Event]</strong>
Yuuki
</p>
</div>
<small class="d-block text-right mt-3">
<a href="/logs" target="_blank">All updates</a>
</small>
<div id="events"></div>
</div>
</div>
</main>
</main>
<!-- Optional JavaScript -->
{{ bootstrap.load_js() }}
<script src="{{ url_for('static', filename='header.js') }}"></script>
<script src="https://unpkg.com/lookforward@0.1.1/js/lookforward.min.js"></script>
<script>
new LookForward('.js-lookforward');
</script>
<!-- Optional JavaScript -->
{{ bootstrap.load_js() }}
<script src="{{ url_for('static', filename='js/header.js') }}"></script>
<script src="{{ url_for('static', filename='js/events.js') }}"></script>
</body>
</html>

View file

@ -9,77 +9,68 @@
<!-- Bootstrap CSS -->
{{ bootstrap.load_css() }}
<link rel="stylesheet" href="https://unpkg.com/lookforward@0.1.1/css/lookforward.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}"/>
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}" />
<title>Star Yuuki BOT - WebAdmin</title>
</head>
<body>
{% from 'bootstrap/nav.html' import render_nav_item %}
{% from 'bootstrap/nav.html' import render_nav_item %}
<div id="header"></div>
<div id="header"></div>
<main role="main" class="container">
<div class="my-3 p-3 bg-white rounded shadow-sm">
<h6 class="border-bottom border-gray pb-2 mb-0">Recent updates</h6>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#007bff"/>
<text x="50%" y="50%" fill="#007bff"
dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Kick Event]</strong>
Yuuki
</p>
<main role="main" class="container">
<div class="my-3 p-3 bg-white rounded shadow-sm">
<h6 class="border-bottom border-gray pb-2 mb-0">Recent updates</h6>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#007bff" />
<text x="50%" y="50%" fill="#007bff" dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Kick Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#e83e8c" />
<text x="50%" y="50%" fill="#e83e8c" dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Cancel Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#6f42c1" />
<text x="50%" y="50%" fill="#6f42c1" dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Join Event]</strong>
Yuuki
</p>
</div>
<small class="d-block text-right mt-3">
<a href="/events">All updates</a>
</small>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#e83e8c"/>
<text x="50%" y="50%" fill="#e83e8c"
dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Cancel Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#6f42c1"/>
<text x="50%" y="50%" fill="#6f42c1"
dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Join Event]</strong>
Yuuki
</p>
</div>
<small class="d-block text-right mt-3">
<a href="/events" target="_blank">All updates</a>
</small>
</div>
</div>
</main>
</main>
<!-- Optional JavaScript -->
{{ bootstrap.load_js() }}
<script src="{{ url_for('static', filename='header.js') }}"></script>
<script src="https://unpkg.com/lookforward@0.1.1/js/lookforward.min.js"></script>
<script>
new LookForward('.js-lookforward');
</script>
<!-- Optional JavaScript -->
{{ bootstrap.load_js() }}
<script src="{{ url_for('static', filename='js/header.js') }}"></script>
</body>
</html>

View file

@ -9,85 +9,76 @@
<!-- Bootstrap CSS -->
{{ bootstrap.load_css() }}
<link rel="stylesheet" href="https://unpkg.com/lookforward@0.1.1/css/lookforward.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}"/>
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}" />
<title>Star Yuuki BOT - WebAdmin</title>
</head>
<body>
{% from 'bootstrap/nav.html' import render_nav_item %}
{% from 'bootstrap/nav.html' import render_nav_item %}
<div id="header"></div>
<div id="header"></div>
<main role="main" class="container">
<div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded shadow-sm">
<img class="mr-3" src="{{ LINE_Media_server}}/{{pictureStatus }}" alt="" width="48" height="48">
<div class="lh-100">
<h6 class="mb-0 text-white lh-100">{{ profileName }}</h6>
<small>on {{ name }} {{ version }}</small>
<main role="main" class="container">
<div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded shadow-sm">
<img class="mr-3" src="{{ LINE_Media_server}}/{{pictureStatus }}" alt="" width="48" height="48">
<div class="lh-100">
<h6 class="mb-0 text-white lh-100">{{ profileName }}</h6>
<small>on {{ name }} {{ version }}</small>
</div>
</div>
</div>
<div class="my-3 p-3 bg-white rounded shadow-sm">
<h6 class="border-bottom border-gray pb-2 mb-0">Recent updates</h6>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#007bff"/>
<text x="50%" y="50%" fill="#007bff"
dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Kick Event]</strong>
Yuuki
</p>
<div class="my-3 p-3 bg-white rounded shadow-sm">
<h6 class="border-bottom border-gray pb-2 mb-0">Recent updates</h6>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#007bff" />
<text x="50%" y="50%" fill="#007bff" dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Kick Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#e83e8c" />
<text x="50%" y="50%" fill="#e83e8c" dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Cancel Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#6f42c1" />
<text x="50%" y="50%" fill="#6f42c1" dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Join Event]</strong>
Yuuki
</p>
</div>
<small class="d-block text-right mt-3">
<a href="/events">All updates</a>
</small>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#e83e8c"/>
<text x="50%" y="50%" fill="#e83e8c"
dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Cancel Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#6f42c1"/>
<text x="50%" y="50%" fill="#6f42c1"
dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Join Event]</strong>
Yuuki
</p>
</div>
<small class="d-block text-right mt-3">
<a href="/events" target="_blank">All updates</a>
</small>
</div>
</div>
</main>
</main>
<!-- Optional JavaScript -->
{{ bootstrap.load_js() }}
<script src="{{ url_for('static', filename='header.js') }}"></script>
<script src="https://unpkg.com/lookforward@0.1.1/js/lookforward.min.js"></script>
<script>
new LookForward('.js-lookforward');
</script>
<!-- Optional JavaScript -->
{{ bootstrap.load_js() }}
<script src="{{ url_for('static', filename='js/header.js') }}"></script>
</body>
</html>

View file

@ -0,0 +1,73 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
{{ bootstrap.load_css() }}
<link rel="stylesheet" href="https://unpkg.com/lookforward@0.1.1/css/lookforward.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}" />
<title>Star Yuuki BOT - WebAdmin</title>
</head>
<body>
{% from 'bootstrap/nav.html' import render_nav_item %}
<div id="header"></div>
<main role="main" class="container">
<div class="my-3 p-3 bg-white rounded shadow-sm">
<h6 class="border-bottom border-gray pb-2 mb-0">Settings</h6>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#007bff" />
<text x="50%" y="50%" fill="#007bff" dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Kick Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#e83e8c" />
<text x="50%" y="50%" fill="#e83e8c" dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Cancel Event]</strong>
Yuuki
</p>
</div>
<div class="media text-muted pt-3">
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32">
<title>Event</title>
<rect width="100%" height="100%" fill="#6f42c1" />
<text x="50%" y="50%" fill="#6f42c1" dy=".3em">32x32
</text>
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">[Join Event]</strong>
Yuuki
</p>
</div>
</div>
</main>
<!-- Optional JavaScript -->
{{ bootstrap.load_js() }}
<script src="{{ url_for('static', filename='js/header.js') }}"></script>
</body>
</html>

View file

@ -18,7 +18,7 @@ from libs import Yuuki, Yuuki_Config
config = Yuuki_Config()
Console = Yuuki(config)
Console = Yuuki(config,1)
Console.cleanMyGroupInvitations()
###########################Start!#############################