Compare commits

..

No commits in common. "87b48af551d2ed023f77ca57d033ed0079d303f3" and "2a47c0ba5e7344d44c3acd15d8f3efeb11722677" have entirely different histories.

7 changed files with 4 additions and 77 deletions

View File

@ -42,7 +42,6 @@ from snek.view.terminal import TerminalSocketView, TerminalView
from snek.view.upload import UploadView from snek.view.upload import UploadView
from snek.view.web import WebView from snek.view.web import WebView
from snek.webdav import WebdavApplication from snek.webdav import WebdavApplication
from snek.view.settings import SettingsView
SESSION_KEY = b"c79a0c5fda4b424189c427d28c9f7c34" SESSION_KEY = b"c79a0c5fda4b424189c427d28c9f7c34"
@ -138,7 +137,6 @@ class Application(BaseApplication):
self.router.add_view("/docs.html", DocsHTMLView) self.router.add_view("/docs.html", DocsHTMLView)
self.router.add_view("/docs.md", DocsMDView) self.router.add_view("/docs.md", DocsMDView)
self.router.add_view("/status.json", StatusView) self.router.add_view("/status.json", StatusView)
self.router.add_view("/settings.html", SettingsView)
self.router.add_view("/web.html", WebView) self.router.add_view("/web.html", WebView)
self.router.add_view("/login.html", LoginView) self.router.add_view("/login.html", LoginView)
self.router.add_view("/login.json", LoginView) self.router.add_view("/login.json", LoginView)

View File

@ -347,15 +347,3 @@ a {
color: #fff; color: #fff;
} }
@media only screen and (max-width: 600px) {
header{
position: sticky;
display: block;
.logo {
display:block;
}
}
.chat-input {
position:sticky;
}
}

View File

@ -1,36 +0,0 @@
{% extends "app.html" %}
{% block sidebar %}
{% include "sidebar_settings.html" %}
{% endblock %}
{% block head %}
<link href="https://cdn.bootcdn.net/ajax/libs/monaco-editor/0.20.0/min/vs/editor/editor.main.min.css" rel="stylesheet">
<script src="https://cdn.bootcdn.net/ajax/libs/monaco-editor/0.20.0/min/vs/loader.min.js"></script>
{% endblock %}
{% block main %}
<h1>Setting page</h1>
<div id="profile_description"></div>
<script type="module">
require.config({ paths: { 'vs': 'https://cdn.bootcdn.net/ajax/libs/monaco-editor/0.20.0/min/vs' } });
require(['vs/editor/editor.main'], function () {
var editor = monaco.editor.create(document.getElementById('profile_description'), {
value: phpCode,
language: 'php'
});
})
</script>
{% endblock main %}

View File

@ -1,14 +0,0 @@
<style>
.channel-list-item-highlight {
/* xxx */
}
</style>
<aside class="sidebar" id="channelSidebar">
<h2>Settings</h2>
<ul>
<li><a class="no-select" href="/settings.html">Profile</a></li>
<li><a class="no-select" href="/settings-notifications.html">Notifications</a></li>
<li><a class="no-select" href="/settings-privacy.html">Privacy</a></li>
</ul>
</aside>

View File

@ -12,10 +12,10 @@
{% endfor %} {% endfor %}
</div> </div>
<chat-window style="display:none" class="chat-area"></chat-window> <chat-window style="display:none" class="chat-area"></chat-window>
<footer class="chat-input"> <div class="chat-input">
<textarea placeholder="Type a message..." rows="2"></textarea> <textarea placeholder="Type a message..." rows="2"></textarea>
<upload-button channel="{{ channel.uid.value }}"></upload-button> <upload-button channel="{{ channel.uid.value }}"></upload-button>
</footer> </div>
</section> </section>
<script type="module"> <script type="module">

View File

@ -1,8 +0,0 @@
from snek.system.view import BaseView
class SettingsView(BaseView):
login_required = True
async def get(self):
return await self.render_template('settings.html')

View File

@ -219,9 +219,8 @@ class WebdavApplication(aiohttp.web.Application):
etree.SubElement(prop, "{DAV:}displayname").text = full_path.name etree.SubElement(prop, "{DAV:}displayname").text = full_path.name
etree.SubElement(prop, "{DAV:}lockdiscovery") etree.SubElement(prop, "{DAV:}lockdiscovery")
mimetype, _ = mimetypes.guess_type(full_path.name) mimetype, _ = mimetypes.guess_type(full_path.name)
if full_path.is_file(): etree.SubElement(prop, "{DAV:}contenttype").text = mimetype
etree.SubElement(prop, "{DAV:}contenttype").text = mimetype etree.SubElement(prop, "{DAV:}getcontentlength").text = str(
etree.SubElement(prop, "{DAV:}getcontentlength").text = str(
full_path.stat().st_size full_path.stat().st_size
if full_path.is_file() if full_path.is_file()
else self.get_directory_size(full_path) else self.get_directory_size(full_path)