LoginWithQR: Remove Account Tab Patch
This commit is contained in:
parent
33f59c4ef3
commit
f341350bd6
2 changed files with 10 additions and 10 deletions
|
|
@ -16,7 +16,6 @@ import { preload, unload } from "./images";
|
|||
import { cl } from "./ui";
|
||||
import openQrModal from "./ui/modals/QrModal";
|
||||
|
||||
const qrModalOpen = false;
|
||||
export default definePlugin({
|
||||
name: "LoginWithQR",
|
||||
description: "Allows you to login to another device by scanning a login QR code, just like on mobile!",
|
||||
|
|
@ -53,6 +52,7 @@ export default definePlugin({
|
|||
},
|
||||
},
|
||||
// Insert a Scan QR Code button in the My Account tab
|
||||
/* broken
|
||||
{
|
||||
find: "UserSettingsAccountProfileCard",
|
||||
replacement: {
|
||||
|
|
@ -62,6 +62,7 @@ export default definePlugin({
|
|||
replace: ",$self.insertScanQrButton($1)",
|
||||
},
|
||||
},
|
||||
*/
|
||||
// Insert a Scan QR Code MenuItem in the Swith Accounts popout
|
||||
{
|
||||
find: 'id:"manage-accounts"',
|
||||
|
|
@ -89,7 +90,7 @@ export default definePlugin({
|
|||
}
|
||||
],
|
||||
|
||||
qrModalOpen,
|
||||
qrModalOpen: false,
|
||||
|
||||
insertScanQrButton: (button: ReactElement) => (
|
||||
<div className={cl("settings-btns")}>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
import { BaseText } from "@components/BaseText";
|
||||
import { Button, TextButton } from "@components/Button";
|
||||
import { getIntlMessage } from "@utils/discord";
|
||||
import {
|
||||
ModalContent,
|
||||
|
|
@ -16,7 +17,6 @@ import {
|
|||
} from "@utils/modal";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import {
|
||||
Button,
|
||||
RestAPI,
|
||||
useEffect,
|
||||
useRef,
|
||||
|
|
@ -138,7 +138,7 @@ function VerifyModal({
|
|||
size="md"
|
||||
weight="semibold"
|
||||
color="text-normal"
|
||||
style={{ width: "30rem" }}
|
||||
style={{ width: "30rem", textAlign: "center" }}
|
||||
>
|
||||
{getIntlMessage("QR_CODE_LOGIN_SUCCESS_FLAVOR")}
|
||||
</BaseText>
|
||||
|
|
@ -190,8 +190,8 @@ function VerifyModal({
|
|||
Never scan a login QR code from another user or application.
|
||||
</BaseText>
|
||||
<Button
|
||||
size={Button.Sizes.LARGE}
|
||||
color={Button.Colors.RED}
|
||||
size="medium"
|
||||
variant="dangerPrimary"
|
||||
className={cl("device-confirm")}
|
||||
style={{
|
||||
["--duration" as any]: `${holdDuration}ms`,
|
||||
|
|
@ -212,15 +212,14 @@ function VerifyModal({
|
|||
{getIntlMessage("QR_CODE_LOGIN_FINISH_BUTTON")}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
color={Button.Colors.LINK}
|
||||
look={Button.Looks.FILLED}
|
||||
<TextButton
|
||||
variant="link"
|
||||
onClick={props.onClose}
|
||||
>
|
||||
{state === VerifyState.NotFound
|
||||
? getIntlMessage("CLOSE")
|
||||
: getIntlMessage("CANCEL")}
|
||||
</Button>
|
||||
</TextButton>
|
||||
)}
|
||||
</ModalFooter>
|
||||
</ModalRoot>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue