From 89a59865a5cb73869ba8b15166ba1aaa4b1fdee2 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Thu, 13 Jul 2023 19:28:27 +0300 Subject: [PATCH] Improved UI --- src/pages/settings/index.html | 2 +- src/pages/settings/widgets/lemmy/lemmy.js | 2 +- src/pages/settings/widgets/lemmy/lemmy.pug | 2 +- src/pages/settings/widgets/mastodon/mastodon.pug | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/settings/index.html b/src/pages/settings/index.html index 08b5fea..28cc8ac 100644 --- a/src/pages/settings/index.html +++ b/src/pages/settings/index.html @@ -1,4 +1,4 @@ Settings

General


Lemmy


Your instance

Username or Email

Password

jwt


(Username and Password) or (jwt) are required for resolving /post and /comment. If Username and Password didn't work, go to your instance's cookies and copy your jwt.

Username and Password will not work if your instance server has it's policy accepting ONLY http origins. FediRedirect sends a moz-extension:// request so contact your instance maintainer.

Mastodon


Your instance

Code


FediRedirect requires authorization to be able to use search.
\ No newline at end of file +General
Lemmy
Mastodon
About

General


Lemmy


Your instance

Username or Email

Password

jwt


(Username and Password) or (jwt) are required for resolving /post and /comment. If Username and Password didn't work, go to your instance's cookies and copy your jwt.

Username and Password will not work if your instance server has it's policy accepting ONLY http origins. FediRedirect sends a moz-extension:// request so contact your instance maintainer.

Mastodon


Your instance

Code


FediRedirect requires authorization to be able to use search.
\ No newline at end of file diff --git a/src/pages/settings/widgets/lemmy/lemmy.js b/src/pages/settings/widgets/lemmy/lemmy.js index 25c77a3..13090a1 100644 --- a/src/pages/settings/widgets/lemmy/lemmy.js +++ b/src/pages/settings/widgets/lemmy/lemmy.js @@ -25,7 +25,7 @@ form.addEventListener("submit", async e => { } catch { return } - if (jwt.value == "") jwt.value = await getJwt(url, username.value, password.value) + if (jwt.value == "" && username.value != '' && password.value != '') jwt.value = await getJwt(url, username.value, password.value) if (jwt.value != "") { browser.storage.local.set( { lemmy: { instance: `${url.protocol}//${url.hostname}`, auth: jwt.value } }, diff --git a/src/pages/settings/widgets/lemmy/lemmy.pug b/src/pages/settings/widgets/lemmy/lemmy.pug index b6b52de..b4306e1 100644 --- a/src/pages/settings/widgets/lemmy/lemmy.pug +++ b/src/pages/settings/widgets/lemmy/lemmy.pug @@ -19,7 +19,7 @@ section(class="option-block" id="lemmy_page") div(class="block option-input") div h4 jwt - input(class="custom-instance" type="password" class="jwt") + input(class="custom-instance" type="text" class="jwt") div(class="block") button(type="submit" class="button button-inline") Save diff --git a/src/pages/settings/widgets/mastodon/mastodon.pug b/src/pages/settings/widgets/mastodon/mastodon.pug index db1b476..cff0ff6 100644 --- a/src/pages/settings/widgets/mastodon/mastodon.pug +++ b/src/pages/settings/widgets/mastodon/mastodon.pug @@ -11,7 +11,7 @@ section(class="option-block" id="mastodon_page") div(class="block option-input") div h4 Code - input(class="code" type="password") + input(class="code" type="text") div(class="block") button(type="submit" class="button button-inline") Save