mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-16 12:01:13 +00:00
* feat: rebuild plugin pages with host rendering and native settings * fix(plugins): contain host-view errors, isolate editing, and migrate fixtures * fix(plugins): migrate remaining permission fixture hosts
17 lines
614 B
JavaScript
17 lines
614 B
JavaScript
import { registerHostDomView } from '@netcatty/plugin-sdk/host-dom';
|
|
import plugin from './browser.js';
|
|
import { mount } from './page.js';
|
|
import html from './view.html';
|
|
import css from './view.css';
|
|
import manifest from './netcatty.plugin.json';
|
|
export default {
|
|
async activate(context) {
|
|
await plugin.activate(context);
|
|
for (const view of manifest.contributes.views) context.subscriptions.add(registerHostDomView(context.views, view.id, (root, stateScope) => {
|
|
root.innerHTML = html;
|
|
return mount(root, context, view.id, stateScope);
|
|
}, css));
|
|
},
|
|
deactivate: plugin.deactivate,
|
|
};
|