add button to copy url of dropbox

This commit is contained in:
fyears 2022-01-05 09:30:07 +08:00
parent b91c0e694c
commit f0dd3bb5ef

View File

@ -120,6 +120,21 @@ class DropboxAuthModal extends Modal {
contentEl.createEl("p", {
text: "Finally you should be redirected to Obsidian.",
});
const div2 = contentEl.createDiv();
div2.createEl(
"button",
{
text: "Click to copy the auth url",
},
(el) => {
el.onclick = async () => {
await navigator.clipboard.writeText(authUrl);
new Notice("the auth url copied to clipboard!");
};
}
);
contentEl.createEl("p").createEl("a", {
href: authUrl,
text: authUrl,