mirror of
https://github.com/zadam/trilium.git
synced 2025-12-21 23:04:24 +01:00
refactor(script/jsx): "react-widget" -> "preact-widget"
This commit is contained in:
parent
f64de3acca
commit
22a83d9f82
@ -75,7 +75,7 @@ export class WidgetsByParent {
|
||||
}
|
||||
|
||||
add(widget: Widget) {
|
||||
if ("type" in widget && widget.type === "react-widget") {
|
||||
if ("type" in widget && widget.type === "preact-widget") {
|
||||
// React-based script.
|
||||
const reactWidget = widget as WidgetDefinitionWithType;
|
||||
this.preactWidgets[reactWidget.parent] = this.preactWidgets[reactWidget.parent] || [];
|
||||
|
||||
@ -9,7 +9,7 @@ export interface WidgetDefinition {
|
||||
}
|
||||
|
||||
export interface WidgetDefinitionWithType extends WidgetDefinition {
|
||||
type: "react-widget"
|
||||
type: "preact-widget"
|
||||
}
|
||||
|
||||
export const preactAPI = Object.freeze({
|
||||
@ -24,7 +24,7 @@ export const preactAPI = Object.freeze({
|
||||
*/
|
||||
defineWidget(definition: WidgetDefinition) {
|
||||
return {
|
||||
type: "react-widget",
|
||||
type: "preact-widget",
|
||||
...definition
|
||||
};
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user