diff --git a/charts/huesoporro/Chart.yaml b/charts/huesoporro/Chart.yaml
index 3d392ad..22ca75f 100644
--- a/charts/huesoporro/Chart.yaml
+++ b/charts/huesoporro/Chart.yaml
@@ -21,4 +21,4 @@ version: 0.2.4
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
-appVersion: "0.2.5"
+appVersion: "0.2.4"
diff --git a/charts/huesoporro/values.yaml b/charts/huesoporro/values.yaml
index ea27e5a..48b749a 100644
--- a/charts/huesoporro/values.yaml
+++ b/charts/huesoporro/values.yaml
@@ -11,7 +11,7 @@ image:
# This sets the pull policy for images.
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
- tag: "0.2.5"
+ tag: "0.2.4"
# This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
imagePullSecrets: []
diff --git a/pyproject.toml b/pyproject.toml
index 1da3c58..5b913bf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "huesoporro"
-version = "0.2.5"
+version = "0.2.4"
description = "Misc Twitch bots"
readme = "README.md"
authors = [
diff --git a/src/huesoporro/api/routes/api.py b/src/huesoporro/api/routes/api.py
index 9412598..d427cde 100644
--- a/src/huesoporro/api/routes/api.py
+++ b/src/huesoporro/api/routes/api.py
@@ -19,7 +19,7 @@ class ManageBotDTO(BaseModel):
"/tts",
media_type=MediaType.HTML,
)
-async def get_tts_overlay(user: User) -> Template:
+async def get_tts_overlay() -> Template:
return Template(template_name="tts.html")
diff --git a/src/huesoporro/static/js/utils.js b/src/huesoporro/static/js/utils.js
index 9bb1116..e014ab2 100644
--- a/src/huesoporro/static/js/utils.js
+++ b/src/huesoporro/static/js/utils.js
@@ -7,3 +7,36 @@ function getWebsocketProtocol() {
return "wss://";
}
}
+
+function addLogoutEvent() {
+ const logoutButton = document.getElementById("logoutButton");
+ logoutButton.addEventListener("click", () => {
+ document.cookie = "twitchLoginData=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
+ window.location.href = "/";
+ });
+
+}
+
+function setCookie(name, value, days) {
+ const date = new Date();
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+ const expires = `expires=${date.toUTCString()}`;
+ document.cookie = `${name}=${value};${expires};path=/;SameSite=Strict`;
+}
+
+function getCookie(name) {
+ const cookieName = `${name}=`;
+ const decodedCookie = decodeURIComponent(document.cookie);
+ const cookieArray = decodedCookie.split(';');
+
+ for (let i = 0; i < cookieArray.length; i++) {
+ let cookie = cookieArray[i];
+ while (cookie.charAt(0) === ' ') {
+ cookie = cookie.substring(1);
+ }
+ if (cookie.indexOf(cookieName) === 0) {
+ return cookie.substring(cookieName.length, cookie.length);
+ }
+ }
+ return null;
+}
diff --git a/src/huesoporro/templates/index.html b/src/huesoporro/templates/index.html
index b17419f..bdf08ee 100644
--- a/src/huesoporro/templates/index.html
+++ b/src/huesoporro/templates/index.html
@@ -5,10 +5,12 @@
| Sentence | +Sentence | Action |
|---|---|---|
| {{ sentence.sentence }} | -- - | +