From d63e6d4604dfbe4938c7d66832c9202364c5bb64 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 10 Dec 2021 15:01:12 +0100 Subject: Add ability for plugins to register client routes --- shared/models/plugins/client/index.ts | 1 + shared/models/plugins/client/register-client-route.model.ts | 7 +++++++ .../models/plugins/client/register-client-settings-script.model.ts | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 shared/models/plugins/client/register-client-route.model.ts (limited to 'shared/models/plugins') diff --git a/shared/models/plugins/client/index.ts b/shared/models/plugins/client/index.ts index c500185c9..f3e3fcbcf 100644 --- a/shared/models/plugins/client/index.ts +++ b/shared/models/plugins/client/index.ts @@ -4,4 +4,5 @@ export * from './plugin-element-placeholder.type' export * from './plugin-selector-id.type' export * from './register-client-form-field.model' export * from './register-client-hook.model' +export * from './register-client-route.model' export * from './register-client-settings-script.model' diff --git a/shared/models/plugins/client/register-client-route.model.ts b/shared/models/plugins/client/register-client-route.model.ts new file mode 100644 index 000000000..271b67834 --- /dev/null +++ b/shared/models/plugins/client/register-client-route.model.ts @@ -0,0 +1,7 @@ +export interface RegisterClientRouteOptions { + route: string + + onMount (options: { + rootEl: HTMLElement + }): void +} diff --git a/shared/models/plugins/client/register-client-settings-script.model.ts b/shared/models/plugins/client/register-client-settings-script.model.ts index 481ceef96..117ca4739 100644 --- a/shared/models/plugins/client/register-client-settings-script.model.ts +++ b/shared/models/plugins/client/register-client-settings-script.model.ts @@ -1,6 +1,6 @@ import { RegisterServerSettingOptions } from '../server' -export interface RegisterClientSettingsScript { +export interface RegisterClientSettingsScriptOptions { isSettingHidden (options: { setting: RegisterServerSettingOptions formValues: { [name: string]: any } -- cgit v1.2.3