mirror of https://git.sr.ht/~ashkeel/strimertul
fix: remove unneeded reset of the twitch client when authorizing new chat user
This commit is contained in:
parent
422c70c9d4
commit
c186c0b942
|
@ -74,7 +74,7 @@
|
|||
"chat": {
|
||||
"header": "Chat settings",
|
||||
"cooldown-tip": "Global chat cooldown for commands (in seconds)",
|
||||
"default-user": "Using stream account, use the button below to authenticate with a different account.",
|
||||
"default-user": "Currently using stream account, use the button above to authenticate with a different account.",
|
||||
"chat-account": "Chat account",
|
||||
"clear-button": "Revert to default account",
|
||||
"account-copy": "You can use a different account for repling to chat commands and writing alerts instead of your channel one. To do so, click the button below and authenticate and authorize using your secondary account."
|
||||
|
|
|
@ -341,7 +341,7 @@
|
|||
"cooldown-tip": "Tempo minimo di attesa tra comandi (in secondi)",
|
||||
"chat-account": "Account chat",
|
||||
"header": "Impostazioni chat",
|
||||
"default-user": "Utilizzando l'account principale, usa il pulsante qui sotto per autenticarti con un account diverso per le funzionalità di chat.",
|
||||
"default-user": "Utilizzando l'account principale, usa il pulsante qui sopra per autenticarti con un account diverso per le funzionalità di chat.",
|
||||
"clear-button": "Torna ad usare l'account principale",
|
||||
"account-copy": "Puoi utilizzare un account diverso per rispondendere ai comandi della chat e invia notifiche al posto di quello del tuo canale. \nPer fare ciò, fai clic sul pulsante in basso e autentica e autorizza l'utilizzo del tuo account secondario."
|
||||
},
|
||||
|
|
|
@ -20,7 +20,6 @@ export default function TwitchChatSettings() {
|
|||
const [chatConfig, setChatConfig, loadStatus] = useModule(
|
||||
modules.twitchChatConfig,
|
||||
);
|
||||
const [twitchConfig, setTwitchConfig] = useModule(modules.twitchConfig);
|
||||
const kv = useAppSelector((state) => state.api.client);
|
||||
const authKey = 'twitch/chat/chatter-account';
|
||||
const authKeyValue = useLiveKeyString('twitch/chat/chatter-account');
|
||||
|
@ -32,7 +31,6 @@ export default function TwitchChatSettings() {
|
|||
return (
|
||||
<form
|
||||
onSubmit={(ev) => {
|
||||
void dispatch(setTwitchConfig(twitchConfig));
|
||||
void dispatch(setChatConfig(chatConfig));
|
||||
ev.preventDefault();
|
||||
}}
|
||||
|
@ -44,6 +42,7 @@ export default function TwitchChatSettings() {
|
|||
<FlexRow align="left" spacing="1" css={{ marginBottom: '1rem' }}>
|
||||
<Button
|
||||
variation="primary"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
void startAuthFlow('chat');
|
||||
}}
|
||||
|
@ -53,6 +52,7 @@ export default function TwitchChatSettings() {
|
|||
{authKeyValue && (
|
||||
<Button
|
||||
variation="danger"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
kv.deleteKey(authKey);
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue