updated sidebar
This commit is contained in:
parent
23abb818eb
commit
a18e85a41c
@ -70,6 +70,15 @@ async def plugin_store() -> str:
|
||||
)
|
||||
|
||||
|
||||
@app.get("/plugin/installed")
|
||||
async def installed_plugins() -> str:
|
||||
return await render_template(
|
||||
"installed_plugins.html",
|
||||
# plugins=plugins,
|
||||
**shared_template_context(),
|
||||
)
|
||||
|
||||
|
||||
@app.get("/plugin/<name>")
|
||||
async def plugin(name: str) -> str:
|
||||
# TODO check that plugin exists
|
||||
|
||||
9
tutordash/server/static/img/Edly Red Icon.svg
Normal file
9
tutordash/server/static/img/Edly Red Icon.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 75 KiB |
3
tutordash/server/static/img/shopping-bag.svg
Normal file
3
tutordash/server/static/img/shopping-bag.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="20" height="17" viewBox="0 0 20 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.25 0.351562H1.75C1.35218 0.351563 0.970644 0.509598 0.68934 0.790902C0.408035 1.07221 0.25 1.45374 0.25 1.85156V15.3516C0.25 15.7494 0.408035 16.1309 0.68934 16.4122C0.970644 16.6935 1.35218 16.8516 1.75 16.8516H18.25C18.6478 16.8516 19.0294 16.6935 19.3107 16.4122C19.592 16.1309 19.75 15.7494 19.75 15.3516V1.85156C19.75 1.45374 19.592 1.07221 19.3107 0.790902C19.0294 0.509598 18.6478 0.351563 18.25 0.351562ZM18.25 15.3516H1.75V1.85156H18.25V15.3516ZM14.5 4.85156C14.5 6.04504 14.0259 7.18963 13.182 8.03354C12.3381 8.87746 11.1935 9.35156 10 9.35156C8.80653 9.35156 7.66193 8.87746 6.81802 8.03354C5.97411 7.18963 5.5 6.04504 5.5 4.85156C5.5 4.65265 5.57902 4.46188 5.71967 4.32123C5.86032 4.18058 6.05109 4.10156 6.25 4.10156C6.44891 4.10156 6.63968 4.18058 6.78033 4.32123C6.92098 4.46188 7 4.65265 7 4.85156C7 5.64721 7.31607 6.41027 7.87868 6.97288C8.44129 7.53549 9.20435 7.85156 10 7.85156C10.7956 7.85156 11.5587 7.53549 12.1213 6.97288C12.6839 6.41027 13 5.64721 13 4.85156C13 4.65265 13.079 4.46188 13.2197 4.32123C13.3603 4.18058 13.5511 4.10156 13.75 4.10156C13.9489 4.10156 14.1397 4.18058 14.2803 4.32123C14.421 4.46188 14.5 4.65265 14.5 4.85156Z" fill="#414651"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
3
tutordash/server/static/img/stack.svg
Normal file
3
tutordash/server/static/img/stack.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M19.6478 14.7265C19.7469 14.8984 19.7738 15.1025 19.7226 15.2942C19.6715 15.4859 19.5465 15.6496 19.375 15.7493L10.375 20.9993C10.2603 21.0662 10.1299 21.1014 9.99719 21.1014C9.86443 21.1014 9.73406 21.0662 9.61938 20.9993L0.619375 15.7493C0.450338 15.6477 0.328111 15.4837 0.279156 15.2926C0.230202 15.1016 0.25846 14.899 0.357813 14.7286C0.457166 14.5582 0.619617 14.4339 0.809996 14.3824C1.00037 14.331 1.20336 14.3566 1.375 14.4537L10 19.4834L18.625 14.4537C18.7969 14.3546 19.0011 14.3277 19.1927 14.3788C19.3844 14.43 19.5481 14.555 19.6478 14.7265ZM18.625 9.95368L10 14.9834L1.375 9.95368C1.20423 9.86865 1.00748 9.85189 0.824786 9.90682C0.642097 9.96174 0.487203 10.0842 0.391631 10.2493C0.296059 10.4144 0.266993 10.6097 0.310348 10.7955C0.353703 10.9813 0.466221 11.1436 0.625 11.2493L9.625 16.4993C9.73968 16.5662 9.87006 16.6014 10.0028 16.6014C10.1356 16.6014 10.2659 16.5662 10.3806 16.4993L19.3806 11.2493C19.4671 11.2004 19.5429 11.1348 19.6038 11.0563C19.6647 10.9779 19.7094 10.8881 19.7353 10.7922C19.7612 10.6963 19.7679 10.5963 19.7548 10.4978C19.7417 10.3994 19.7092 10.3045 19.6592 10.2187C19.6091 10.1329 19.5426 10.0579 19.4633 9.99804C19.384 9.93818 19.2937 9.89466 19.1975 9.87001C19.1013 9.84536 19.0011 9.84006 18.9028 9.85442C18.8046 9.86878 18.7101 9.90252 18.625 9.95368ZM0.25 6.10149C0.250299 5.97013 0.285096 5.84115 0.350907 5.72746C0.416718 5.61377 0.511236 5.51936 0.625 5.45368L9.625 0.203675C9.73968 0.1368 9.87006 0.101562 10.0028 0.101562C10.1356 0.101562 10.2659 0.1368 10.3806 0.203675L19.3806 5.45368C19.4938 5.51973 19.5878 5.6143 19.6531 5.72796C19.7183 5.84163 19.7527 5.97041 19.7527 6.10149C19.7527 6.23256 19.7183 6.36135 19.6531 6.47501C19.5878 6.58868 19.4938 6.68325 19.3806 6.7493L10.3806 11.9993C10.2659 12.0662 10.1356 12.1014 10.0028 12.1014C9.87006 12.1014 9.73968 12.0662 9.625 11.9993L0.625 6.7493C0.511236 6.68362 0.416718 6.58921 0.350907 6.47552C0.285096 6.36183 0.250299 6.23285 0.25 6.10149ZM2.48875 6.10149L10 10.4834L17.5112 6.10149L10 1.71961L2.48875 6.10149Z" fill="#717680"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
7
tutordash/server/static/js/dash.js
Normal file
7
tutordash/server/static/js/dash.js
Normal file
@ -0,0 +1,7 @@
|
||||
if (window.location.href.indexOf("/plugin/store") > -1) {
|
||||
document.querySelectorAll('.sidebar-tab')[0].classList.toggle('sidebar-tab-selected');
|
||||
document.querySelectorAll('.tab-logo')[0].classList.toggle('sidebar-tab-logo-selected');
|
||||
} else {
|
||||
document.querySelectorAll('.sidebar-tab')[1].classList.toggle('sidebar-tab-selected');
|
||||
document.querySelectorAll('.tab-logo')[1].classList.toggle('sidebar-tab-logo-selected');
|
||||
}
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='/img/favicon.png') }}">
|
||||
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
|
||||
<!-- CSS -->
|
||||
<!-- <link rel="stylesheet" href="css/normalize.css"> -->
|
||||
<!-- <link rel="stylesheet" href="css/styles.css"> -->
|
||||
@ -25,31 +26,24 @@
|
||||
<div class="sidebar">
|
||||
<div class="section">
|
||||
<div class="header">
|
||||
Administration
|
||||
<img src="{{ url_for('static', filename='/img/Edly Red Icon.svg') }}" height="40rem"/>
|
||||
<span>Edly</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li><a href="{{ url_for('plugin_store') }}">Plugin store</a></li>
|
||||
<li><a href="{{ url_for('cli_logs') }}">Command logs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="header">
|
||||
Plugins
|
||||
</div>
|
||||
<div class="content">
|
||||
<ul>
|
||||
{% for plugin in installed_plugins %}
|
||||
<li><a href="{{ url_for('plugin', name=plugin) }}">{{ plugin }} {% if plugin in enabled_plugins %} ✅{% endif %}</a></li>
|
||||
{% endfor %}
|
||||
<form action="{{ url_for('cli_local_launch') }}" method="POST">
|
||||
<button type="submit">Launch (local)</button>
|
||||
</form>
|
||||
<form action="{{ url_for('cli_stop') }}" method="POST">
|
||||
<button type="submit">Stop</button>
|
||||
</form>
|
||||
<a href="{{ url_for('plugin_store') }}">
|
||||
<li class="sidebar-tab">
|
||||
<img class="tab-logo" src="{{ url_for('static', filename='/img/shopping-bag.svg') }}" height="20rem"/>
|
||||
<span>Plugin Marketplace</span>
|
||||
</li>
|
||||
</a>
|
||||
<p></p>
|
||||
<a href="{{ url_for('installed_plugins') }}">
|
||||
<li class="sidebar-tab">
|
||||
<img class="tab-logo" src="{{ url_for('static', filename='/img/stack.svg') }}" height="25rem"/>
|
||||
<span>My Plugins</span>
|
||||
</li>
|
||||
</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -64,7 +58,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{{ url_for('static', filename='/js/dash.js') }}"></script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
|
||||
|
||||
13
tutordash/server/templates/installed_plugins.html
Normal file
13
tutordash/server/templates/installed_plugins.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block workspace_header %}My Plugins{% endblock %}
|
||||
|
||||
{% block workspace_content %}
|
||||
<form action="{{ url_for('plugins_update') }}" method="POST">
|
||||
<button type="submit">Refresh</button>
|
||||
</form>
|
||||
|
||||
{% for plugin in installed_plugins %}
|
||||
<li><a href="{{ url_for('plugin', name=plugin) }}">{{ plugin }} {% if plugin in enabled_plugins %} ✅{% endif %}</a></li>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@ -1,6 +1,6 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block workspace_header %}Plugin store{% endblock %}
|
||||
{% block workspace_header %}Plugin Marketplace{% endblock %}
|
||||
|
||||
{% block workspace_content %}
|
||||
<form action="{{ url_for('plugins_update') }}" method="POST">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user