mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 16:01:02 +08:00
Add h
helper to plugin-api
in v0.3
This commit is contained in:
parent
71ef6ea518
commit
b10b6c673d
|
@ -8,12 +8,14 @@ import { addWidgetCleanCallback } from 'discourse/components/mount-widget';
|
|||
import { createWidget, decorateWidget, changeSetting } from 'discourse/widgets/widget';
|
||||
import { onPageChange } from 'discourse/lib/page-tracker';
|
||||
import { preventCloak } from 'discourse/widgets/post-stream';
|
||||
import { h } from 'virtual-dom';
|
||||
|
||||
class PluginApi {
|
||||
constructor(version, container) {
|
||||
this.version = version;
|
||||
this.container = container;
|
||||
this._currentUser = container.lookup('current-user:main');
|
||||
this.h = h;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -286,7 +288,7 @@ class PluginApi {
|
|||
|
||||
let _pluginv01;
|
||||
function getPluginApi(version) {
|
||||
if (version === "0.1" || version === "0.2") {
|
||||
if (version === "0.1" || version === "0.2" || version === "0.3") {
|
||||
if (!_pluginv01) {
|
||||
_pluginv01 = new PluginApi(version, Discourse.__container__);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user