From aa7a5b126be9e23a230d3ec8315ff5fb663df4de Mon Sep 17 00:00:00 2001 From: Erkin Alp Güney Date: Mon, 14 Mar 2022 19:45:25 +0300 Subject: close issue #684 --- api/assets/openapi.json | 4 ++-- api/assets/schemas.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'api') diff --git a/api/assets/openapi.json b/api/assets/openapi.json index 03550323..8e2a54cf 100644 --- a/api/assets/openapi.json +++ b/api/assets/openapi.json @@ -2960,7 +2960,7 @@ "type": { "type": "string" }, - "verifie": { + "verified": { "type": "boolean" }, "visibility": { @@ -2980,7 +2980,7 @@ "type", "user", "user_id", - "verifie", + "verified", "visibility" ] }, diff --git a/api/assets/schemas.json b/api/assets/schemas.json index d531df21..441752ad 100644 --- a/api/assets/schemas.json +++ b/api/assets/schemas.json @@ -355,11 +355,11 @@ "type": { "type": "string" }, - "verifie": { + "verified": { "type": "boolean" } }, - "required": ["name", "type", "verifie"] + "required": ["name", "type", "verified"] } }, "$schema": "http://json-schema.org/draft-07/schema#" -- cgit 1.4.1 From e20fd0454725d57d3fb1e7d7faca381991a7a6a0 Mon Sep 17 00:00:00 2001 From: SpacingBat3 Date: Tue, 1 Mar 2022 23:33:19 +0100 Subject: Fix `servers[0].url` in `openapi.json`. A tiny fix within `openapi.json`, that changes the URL in servers property to the correct ones. --- api/assets/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/assets/openapi.json b/api/assets/openapi.json index 8e2a54cf..a8a657b2 100644 --- a/api/assets/openapi.json +++ b/api/assets/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "servers": [ { - "url": "https://api.fosscord.com/v{version}", + "url": "https://api.fosscord.com/api/v{version}", "description": "Official fosscord instance", "variables": { "version": { -- cgit 1.4.1 From 850ddcf3940a9d41ec5851b01f2899c82f0f6644 Mon Sep 17 00:00:00 2001 From: Luna Alfien Date: Sun, 16 Jan 2022 22:20:33 -0800 Subject: Create fosscord-login.js --- api/assets/preload-plugins/fosscord-login.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 api/assets/preload-plugins/fosscord-login.js (limited to 'api') diff --git a/api/assets/preload-plugins/fosscord-login.js b/api/assets/preload-plugins/fosscord-login.js new file mode 100644 index 00000000..1a36f0bd --- /dev/null +++ b/api/assets/preload-plugins/fosscord-login.js @@ -0,0 +1,8 @@ +// Remove `` from header when we're not accessing `/login` or `/register` +// fosscord-login.css replaces discord's TOS tooltip with something more fitting for fosscord, which when included in the main app, causes other tooltips +// to be affected, which is potentially unwanted. + +var token = JSON.parse(localStorage.getItem("token")); +if (!token && location.pathname !== "/login" && location.pathname !== "/register") { + document.getElementById("logincss").remove(); +} -- cgit 1.4.1 From e8355db1f46b617e892a51cde1cb61892145ec4c Mon Sep 17 00:00:00 2001 From: Luna Alfien Date: Sun, 23 Jan 2022 21:54:40 -0800 Subject: Make comments more accurate to use-case --- api/assets/preload-plugins/fosscord-login.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'api') diff --git a/api/assets/preload-plugins/fosscord-login.js b/api/assets/preload-plugins/fosscord-login.js index 1a36f0bd..38f82200 100644 --- a/api/assets/preload-plugins/fosscord-login.js +++ b/api/assets/preload-plugins/fosscord-login.js @@ -1,6 +1,10 @@ // Remove `` from header when we're not accessing `/login` or `/register` // fosscord-login.css replaces discord's TOS tooltip with something more fitting for fosscord, which when included in the main app, causes other tooltips // to be affected, which is potentially unwanted. +// +// This script removes fosscord-login.css when a user reloads the page. From testing, it appears fosscord already properly removes +// fosscord-login.css after login is successful, but not if you reload the page after logging in. This script is to remove fosscord-login.css in +// that specific case. var token = JSON.parse(localStorage.getItem("token")); if (!token && location.pathname !== "/login" && location.pathname !== "/register") { -- cgit 1.4.1