refactor: app settings

This commit is contained in:
2024-10-30 10:57:43 +07:00
parent 11dcef4e87
commit 618a45d349
33 changed files with 617 additions and 629 deletions

View File

@@ -97,21 +97,12 @@ export const LumeWindow = {
});
},
openEditor: async (reply_to?: string, quote?: string) => {
let url: string;
if (reply_to) {
url = `/new-post?reply_to=${reply_to}`;
}
if (quote?.length) {
url = `/new-post?quote=${quote}`;
}
if (!reply_to?.length && !quote?.length) {
url = "/new-post";
}
const label = `editor-${reply_to ? reply_to : 0}`;
const url = reply_to
? `/new-post?reply_to=${reply_to}`
: quote?.length
? `/new-post?quote=${quote}`
: "/new-post";
const query = await commands.openWindow({
label,
url,
@@ -145,7 +136,7 @@ export const LumeWindow = {
hidden_title: true,
closable: true,
});
} else {
} else if (account) {
await LumeWindow.openSettings(account, "wallet");
}
},