feat(LoginWithQR): Update (#93)

* fix: fix loginwithqr + devcompanion lazy fix

* Description One Line

---------

Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
nexpid 2024-11-06 20:42:48 +01:00 committed by GitHub
parent a09a3a8a8f
commit 26c7feaa39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -59,7 +59,7 @@ export default definePlugin({
replacement: {
// Find the Edit User Profile button and insert our custom button.
// A bit jank, but whatever
match: /,(.{0,20}\.Button,.{0,100}#{intl::USER_SETTINGS_EDIT_USER_PROFILE}\)}\))/,
match: /,(\(.{1,90}#{intl::USER_SETTINGS_EDIT_USER_PROFILE}\)}\))/,
replace: ",$self.insertScanQrButton($1)",
},
},

View file

@ -282,11 +282,11 @@ export function initWs(isManual = false) {
const { find, replacement } = data as PatchData;
let candidates;
if (data.findType === FindType.STRING)
candidates = search(find.toString());
if (data.findType === FindType.REGEX)
candidates = search(...mkRegexFind(find));
else
candidates = search(...mkRegexFind(find));
candidates = search(find.toString());
// const candidates = search(find);
const keys = Object.keys(candidates);