Browse Source

Pull request #8525: REPORT-69324 插件-新插件管理-设计器内插件管理版本号显示异常

Merge in DESIGN/design from ~HADES/design:release/11.0 to release/11.0

* commit '5b836f0b8c5d8fbbe23011cfad82f3d97050b1d0':
  REPORT-69324 插件-新插件管理-设计器内插件管理版本号显示异常
bugfix/11.0
Hades 3 years ago
parent
commit
97d49ba002
  1. 19
      designer-base/src/main/java/com/fr/design/upm/UpmShowPane.java

19
designer-base/src/main/java/com/fr/design/upm/UpmShowPane.java

@ -32,23 +32,14 @@ public class UpmShowPane extends BasicPane {
UpmShowPane() {
setLayout(new BorderLayout());
modernUIPane = ModernUIPaneFactory.modernUIPaneBuilder()
.prepareForV6(new ScriptContextAdapter() {
modernUIPane = new ModernUIPane.Builder<>()
.prepare(new ScriptContextAdapter() {
@Override
public void onScriptContextCreated(ScriptContextEvent event) {
// 6.x
JSValue window = event.getBrowser().executeJavaScriptAndReturnValue("window");
window.asObject().setProperty("PluginHelper", UpmBridge.getBridge(event.getBrowser()));
}
})
.prepareForV7(params -> {
// 7.x
JsObject window = params.frame().executeJavaScript("window");
if (window != null) {
window.putProperty("PluginHelper", NewUpmBridge.getBridge(window));
}
return InjectJsCallback.Response.proceed();
})
.withURL(UpmFinder.getMainResourcePath(), UpmUtils.renderMap())
.build();
EventDispatcher.listen(DownloadEvent.UPDATE, new Listener<String>() {
@ -57,6 +48,12 @@ public class UpmShowPane extends BasicPane {
modernUIPane.redirect(UpmFinder.getMainResourcePath(), UpmUtils.renderMap());
}
});
EventDispatcher.listen(DownloadEvent.UPDATE, new Listener<String>() {
@Override
public void on(Event event, String param) {
modernUIPane.redirect(UpmFinder.getMainResourcePath(), UpmUtils.renderMap());
}
});
add(modernUIPane, BorderLayout.CENTER);
}
}

Loading…
Cancel
Save