summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelson Vibber <kelson@pobox.com>2023-09-21 01:03:57 +0000
committerKelson Vibber <kelson@pobox.com>2023-09-21 01:03:57 +0000
commit03f956b14e34245fc38fd6f8c0a3dc97c374c6f5 (patch)
tree11b62fefd0d437e30fc5f809bb194260064435b2
parent1ccd1b2a1a30a7ca75e017bdf939b7bb8202c895 (diff)
Explicitly support dark mode to fix mismatched colors in clients like Tusky
-rw-r--r--mastoapi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 1c0ad87..e166b2a 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -147,6 +147,10 @@ int token_del(const char *id)
const char *login_page = ""
"<!DOCTYPE html>\n"
+"<html>\n"
+"<head>\n"
+"<style>:root {color-scheme: light dark}</style>\n"
+"</head>\n"
"<body><h1>%s OAuth identify</h1>\n"
"<div style=\"background-color: red; color: white\">%s</div>\n"
"<form method=\"post\" action=\"https:/" "/%s/%s\">\n"
@@ -156,7 +160,7 @@ const char *login_page = ""
"<input type=\"hidden\" name=\"cid\" value=\"%s\">\n"
"<input type=\"hidden\" name=\"state\" value=\"%s\">\n"
"<input type=\"submit\" value=\"OK\">\n"
-"</form><p>%s</p></body>\n"
+"</form><p>%s</p></body></html>\n"
"";
int oauth_get_handler(const xs_dict *req, const char *q_path,