diff --git a/src/snek/app.py b/src/snek/app.py
index 8a3481e..3a61c2b 100644
--- a/src/snek/app.py
+++ b/src/snek/app.py
@@ -65,6 +65,13 @@ class Application(BaseApplication):
self.setup_router()
self.db.query("PRAGMA journal_mode=WAL")
self.db.query("PRAGMA syncnorm=off")
+ if not self.db["user"].has_index("username"):
+ self.db["user"].create_index("username", unique=True)
+ if not self.db["channel_member"].has_index(["channel_uid","user_uid"]):
+ self.db["channel_member"].create_index(["channel_uid","user_uid"])
+ if not self.db["channel_message"].has_index(["channel_uid","user_uid"]):
+ self.db["channel_message"].create_index(["channel_uid","user_uid"])
+
self.cache = Cache(self)
self.services = get_services(app=self)
self.mappers = get_mappers(app=self)
diff --git a/src/snek/static/base.css b/src/snek/static/base.css
index 400c392..e42784b 100644
--- a/src/snek/static/base.css
+++ b/src/snek/static/base.css
@@ -111,6 +111,21 @@ a {
height: 200px;
background: #1a1a1a;
}
+.container {
+ flex: 1;
+ padding: 10px;
+ ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+ a {
+ font-size: 20px;
+ color: #f05a28;
+ }
+
+}
+
.chat-messages::-webkit-scrollbar {
display: none;
}
diff --git a/src/snek/static/manifest.json b/src/snek/static/manifest.json
index 6af4db1..faa7381 100644
--- a/src/snek/static/manifest.json
+++ b/src/snek/static/manifest.json
@@ -4,7 +4,7 @@
"description": "Danger noodle",
"display": "standalone",
"orientation": "portrait",
- "scope": "/web.html",
+ "scope": "/",
"theme_color": "#000000",
"background_color": "#000000",
"related_applications": [],
diff --git a/src/snek/system/template.py b/src/snek/system/template.py
index 1b63aec..22d007d 100644
--- a/src/snek/system/template.py
+++ b/src/snek/system/template.py
@@ -74,10 +74,6 @@ def set_link_target_blank(text):
element.attrs['rel'] = 'noopener noreferrer'
element.attrs['referrerpolicy'] = 'no-referrer'
element.attrs['href'] = element.attrs['href'].strip(".")
- #if element.attrs['href'].startswith("https://www.you") and "?v=" in element.attrs["href"]:
- # video_name = element.attrs["href"].split("?v=")[1].split("&")[0]
- # embed_template = f''
- # element.replace_with(BeautifulSoup(embed_template, 'html.parser'))
return str(soup)
@@ -93,7 +89,7 @@ def embed_youtube(text):
def embed_image(text):
soup = BeautifulSoup(text, 'html.parser')
for element in soup.find_all("a"):
- for extension in [".png", ".jpeg", ".gif", ".webp", ".svg", ".bmp", ".tiff", ".ico", ".heif"]:
+ for extension in [".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg", ".bmp", ".tiff", ".ico", ".heif"]:
if extension in element.attrs['href'].lower():
embed_template = f'
'
element.replace_with(BeautifulSoup(embed_template, 'html.parser'))
diff --git a/src/snek/templates/app.html b/src/snek/templates/app.html
index 42ba78f..88a6335 100644
--- a/src/snek/templates/app.html
+++ b/src/snek/templates/app.html
@@ -34,7 +34,7 @@
{% block sidebar %}