diff options
| author | 2023-09-21 01:03:57 +0000 | |
|---|---|---|
| committer | 2023-09-21 01:03:57 +0000 | |
| commit | 03f956b14e34245fc38fd6f8c0a3dc97c374c6f5 (patch) | |
| tree | 11b62fefd0d437e30fc5f809bb194260064435b2 /mastoapi.c | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-03f956b14e34245fc38fd6f8c0a3dc97c374c6f5.tar.gz snac2-03f956b14e34245fc38fd6f8c0a3dc97c374c6f5.tar.xz snac2-03f956b14e34245fc38fd6f8c0a3dc97c374c6f5.zip | |
Explicitly support dark mode to fix mismatched colors in clients like Tusky
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -147,6 +147,10 @@ int token_del(const char *id) | |||
| 147 | 147 | ||
| 148 | const char *login_page = "" | 148 | const char *login_page = "" |
| 149 | "<!DOCTYPE html>\n" | 149 | "<!DOCTYPE html>\n" |
| 150 | "<html>\n" | ||
| 151 | "<head>\n" | ||
| 152 | "<style>:root {color-scheme: light dark}</style>\n" | ||
| 153 | "</head>\n" | ||
| 150 | "<body><h1>%s OAuth identify</h1>\n" | 154 | "<body><h1>%s OAuth identify</h1>\n" |
| 151 | "<div style=\"background-color: red; color: white\">%s</div>\n" | 155 | "<div style=\"background-color: red; color: white\">%s</div>\n" |
| 152 | "<form method=\"post\" action=\"https:/" "/%s/%s\">\n" | 156 | "<form method=\"post\" action=\"https:/" "/%s/%s\">\n" |
| @@ -156,7 +160,7 @@ const char *login_page = "" | |||
| 156 | "<input type=\"hidden\" name=\"cid\" value=\"%s\">\n" | 160 | "<input type=\"hidden\" name=\"cid\" value=\"%s\">\n" |
| 157 | "<input type=\"hidden\" name=\"state\" value=\"%s\">\n" | 161 | "<input type=\"hidden\" name=\"state\" value=\"%s\">\n" |
| 158 | "<input type=\"submit\" value=\"OK\">\n" | 162 | "<input type=\"submit\" value=\"OK\">\n" |
| 159 | "</form><p>%s</p></body>\n" | 163 | "</form><p>%s</p></body></html>\n" |
| 160 | ""; | 164 | ""; |
| 161 | 165 | ||
| 162 | int oauth_get_handler(const xs_dict *req, const char *q_path, | 166 | int oauth_get_handler(const xs_dict *req, const char *q_path, |