fix(loginwithqr): fix qr code icon

This commit is contained in:
nexpid 2024-08-09 21:54:32 +02:00
parent 6692f069e5
commit bcdf29c3ad
No known key found for this signature in database
GPG key ID: 51CB6F26638B5CA5
2 changed files with 6 additions and 7 deletions

View file

@ -12,7 +12,7 @@ import { Button, Forms, i18n, Menu, TabBar } from "@webpack/common";
import { ReactElement } from "react";
import { preload, unload } from "./images";
import { cl, QrCodeCameraIcon } from "./ui";
import { cl, QrCodeIcon } from "./ui";
import openQrModal from "./ui/modals/QrModal";
export default definePlugin({
@ -106,7 +106,7 @@ export default definePlugin({
<Menu.MenuItem
id="scan-qr"
label={i18n.Messages.USER_SETTINGS_SCAN_QR_CODE}
icon={QrCodeCameraIcon}
icon={QrCodeIcon}
action={openQrModal}
showIconFirst
focusedClassName={menuItemFocused}

View file

@ -37,11 +37,10 @@ export const { Spinner } = proxyLazy(() => Forms as any as {
SpinnerTypes: typeof SpinnerTypes;
});
export const { QrCodeCameraIcon } = findByPropsLazy("QrCodeCameraIcon") as {
QrCodeCameraIcon: ComponentType<{
size: number;
}>;
};
const icons = findByPropsLazy("PencilIcon");
export const QrCodeIcon = proxyLazy(() => icons.QrCodeCameraIcon ?? icons.QrCodeIcon) as ComponentType<{
size: number;
}>;
export const cl = classNameFactory("qrlogin-");