Make the wiki app use the global id picker.

This commit is contained in:
2024-04-14 13:53:51 +01:00
parent 96cb6f4b12
commit b5e966c9a1
5 changed files with 11 additions and 50 deletions

View File

@ -4,6 +4,9 @@ import * as utils from './utils.js';
let g_hash;
let g_collection_notifies = {};
tfrpc.register(async function getActiveIdentity() {
return ssb.getActiveIdentity();
});
tfrpc.register(async function getOwnerIdentities() {
return ssb.getOwnerIdentities();
});
@ -54,6 +57,9 @@ core.register('message', async function message_handler(message) {
await tfrpc.rpc.hash_changed(message.hash);
}
});
core.register('setActiveIdentity', async function setActiveIdentityHandler(id) {
await tfrpc.rpc.setActiveIdentity(id);
});
tfrpc.register(function set_hash(hash) {
if (g_hash != hash) {