v1.0.22: refresh projects/users when API token is saved

Previously onPropertyInspectorDidAppear fired once on PI open — if the
token wasn't saved yet (first-time setup), the dropdown stayed empty
forever. Now saving credentials sends a refresh event to the plugin,
which re-fetches and repopulates projects and names immediately.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
pdmarf
2026-04-23 20:49:33 +01:00
parent ad776c9aa9
commit c06240f03b
6 changed files with 66 additions and 48 deletions

View File

@@ -195,6 +195,9 @@
};
$PI.setGlobalSettings(creds);
setCredStatus("Credentials saved.", "ok");
if (creds.notionToken) {
$PI.sendToPlugin({ event: "refresh", notionToken: creds.notionToken });
}
}
function populateUsers(users, savedUserId) {