This commit is contained in:
SuperSonic 2020-02-08 17:21:27 +08:00
parent 423bcae826
commit 091941706d
2 changed files with 9 additions and 2 deletions

View file

@ -18,6 +18,7 @@ class Yuuki_WebAdminAPI:
"get_logs": self.get_logs,
"get_helpers": self.get_helpers,
"get_groups_joined": self.get_groups_joined,
"shutdown": self.shutdown,
}
def init(self, *, task="", data=None):
@ -36,6 +37,11 @@ class Yuuki_WebAdminAPI:
def get_logs(self, data):
return self.Yuuki_DataHandle.get_logs(data)
def shutdown(self, data):
if data:
pass
return self.Yuuki.exit()
@staticmethod
def nothing(data):
if data:

View file

@ -44,10 +44,10 @@
</svg>
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">Yuuki Configure</strong>
Yuuki
Settings for the BOT works.
</p>
</a>
<a class="media text-muted pt-3" href="#">
<a class="media text-muted pt-3" href="#" onclick="shutdown();">
<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>Shutdown</title>
@ -68,6 +68,7 @@
<!-- Optional JavaScript -->
{{ bootstrap.load_js() }}
<script src="{{ url_for('static', filename='js/header.js') }}"></script>
<script src="{{ url_for('static', filename='js/settings.js') }}"></script>
</body>
</html>