Browse Source

Merge pull request #4574 in DESIGN/design from feature/10.0 to feature/x

* commit '0b04ec774d4cb3688d03aaf4afa7c24480664608':
  REPORT-53591 远程环境检测及同步-插件名称提示有误
  REPORT-53785 切换工作目录后更新本地组件库
  REPORT-53772 【智能联动】组件名/数据集名替换时,拖入失败时重新再拖入成功 有几率造成多次替换
  登录面板颜色切换
  REPORT-53710 设计器处于未登录状态,切换至远程设计变为登录状态
  REPORT-53651 & REPORT-53591 & REPORT-53610 插件检测结果展示和重启
  REPORT-53651 & REPORT-53591 & REPORT-53610 插件检测结果展示和重启
  REPORT-53714 海外版本访问社区时不提示登录
  fix
  REPORT-53689 点击私人消息/社区,跳转的不是当前设计器登录账号
  REPORT-51360 提供国际化翻译内容
  如果存在更新升级的弹窗,则不显示引导页面
  REPORT-53714 海外版本不显示引导页面
research/11.0
superman 4 years ago
parent
commit
2f75575611
  1. 60
      designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java
  2. 5
      designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java
  3. 52
      designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java
  4. 11
      designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java
  5. 24
      designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java
  6. 13
      designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java
  7. 5
      designer-base/src/main/java/com/fr/design/upm/UpmBridge.java
  8. 26
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  9. 18
      designer-base/src/main/java/com/fr/env/CheckServiceDialog.java
  10. 26
      designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java
  11. 54
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_en_US.js
  12. 54
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_ja_JP.js
  13. 54
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_ko_KR.js
  14. 54
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_zh_TW.js
  15. 2
      designer-base/src/main/resources/com/fr/design/login/login.js
  16. 22
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java
  17. 11
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java
  18. 15
      designer-realize/src/main/java/com/fr/design/share/SharableManager.java
  19. 4
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

60
designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java

@ -1,22 +1,14 @@
package com.fr.design.login;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.general.log.MessageFormatter;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.third.org.bouncycastle.util.encoders.Hex;
import java.awt.event.ActionEvent;
import java.security.SecureRandom;
import java.util.HashMap;
import java.util.Map;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/**
* @author Lanlan
@ -25,30 +17,19 @@ import javax.crypto.spec.SecretKeySpec;
*/
public abstract class AbstractDesignerSSO extends UpdateAction {
private static final String PRODUCT_FINEREPORT = "product-finereport";
private static final String KEY = "i7hP48WAcuTrmxfN";
@Override
public void actionPerformed(ActionEvent event) {
String url = getJumpUrl();
if (!SupportOSImpl.DESIGNER_LOGIN.support()) {
BrowseUtils.browser(url);
return;
}
DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
int uid = manager.getDesignerLoginUid();
if (uid > 0) {
String ssoUrl = CloudCenter.getInstance().acquireUrlByKind("designer.sso.api", "https://id.fanruan.com/api/app/?code={}&referrer={}");
try {
String code = generateLoginCode();
MessageFormatter.FormattingTuple tuple = MessageFormatter.arrayFormat(ssoUrl, new String[]{code, url});
BrowseUtils.browser(tuple.getMessage());
} catch (Exception e) {
String ssoUrl = DesignerLoginUtils.generateDesignerSSOUrl(url);
BrowseUtils.browser(ssoUrl);
} else {
if (!SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv()) {
BrowseUtils.browser(url);
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return;
}
} else {
boolean loginRemindBeforeJumpBBS = manager.isLoginRemindBeforeJumpBBS();
if (loginRemindBeforeJumpBBS) {
Map<String, String> params = new HashMap<>();
@ -61,32 +42,5 @@ public abstract class AbstractDesignerSSO extends UpdateAction {
}
}
private String generateLoginCode() throws Exception {
DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
JSONObject jo = JSONObject.create();
jo.put("uid", manager.getDesignerLoginUid());
jo.put("username", manager.getDesignerLoginUsername());
jo.put("source", PRODUCT_FINEREPORT);
byte[] iv = randomIv();
return new String(Hex.encode(iv)) + encrypt(jo.toString(), KEY.getBytes(), iv);
}
private static byte[] randomIv() {
byte[] salt = new byte[16];
SecureRandom secureRandom = new SecureRandom();
secureRandom.setSeed(System.currentTimeMillis());
secureRandom.nextBytes(salt);
return salt;
}
public static String encrypt(String content, byte[] key, byte[] iv) throws Exception {
SecretKeySpec secretKeySpec = new SecretKeySpec(key, "AES");
Cipher cipher = Cipher.getInstance("AES/CTR/PKCS5Padding");
IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);
cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, ivParameterSpec);
byte[] resultBytes = cipher.doFinal(content.getBytes());
return new String(Hex.encode(resultBytes));
}
public abstract String getJumpUrl();
}

5
designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java

@ -1,10 +1,12 @@
package com.fr.design.login.guide;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.UIDialog;
import com.fr.design.event.DesignerOpenedListener;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.update.push.DesignerPushUpdateManager;
import com.fr.stable.StringUtils;
import javax.swing.WindowConstants;
@ -32,7 +34,8 @@ public class DesignerGuideHelper {
}
public static void prepareShowGuideDialog() {
if (!SupportOSImpl.DESIGNER_LOGIN.support()) {
// 如果存在更新升级的弹窗,则不显示引导页面
if (!SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) {
return;
}
if (isActivatedForOneWeek()) {

52
designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java

@ -2,9 +2,18 @@ package com.fr.design.login.utils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.toast.DesignerToastMsgUtil;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.general.log.MessageFormatter;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.third.org.bouncycastle.util.encoders.Hex;
import java.security.SecureRandom;
import java.util.HashMap;
import java.util.Map;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/**
* @author Lanlan
@ -13,6 +22,10 @@ import java.util.Map;
*/
public class DesignerLoginUtils {
private static final String PRODUCT_FINEREPORT = "product-finereport";
private static final String KEY = "i7hP48WAcuTrmxfN";
public static Map<String, String> renderMap() {
Map<String, String> map4Tpl = new HashMap<>();
map4Tpl.put("language", GeneralContext.getLocale().toString());
@ -32,4 +45,43 @@ public class DesignerLoginUtils {
}
}
}
public static String generateDesignerSSOUrl(String referrer) {
String ssoTemplate = CloudCenter.getInstance().acquireUrlByKind("designer.sso.api", "https://id.fanruan.com/api/app/?code={}&referrer={}");
try {
String code = generateLoginCode();
MessageFormatter.FormattingTuple tuple = MessageFormatter.arrayFormat(ssoTemplate, new String[]{code, referrer});
return tuple.getMessage();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return referrer;
}
private static String generateLoginCode() throws Exception {
DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
JSONObject jo = JSONObject.create();
jo.put("uid", manager.getDesignerLoginUid());
jo.put("username", manager.getDesignerLoginUsername());
jo.put("source", PRODUCT_FINEREPORT);
byte[] iv = randomIv();
return new String(Hex.encode(iv)) + encrypt(jo.toString(), KEY.getBytes(), iv);
}
private static byte[] randomIv() {
byte[] salt = new byte[16];
SecureRandom secureRandom = new SecureRandom();
secureRandom.setSeed(System.currentTimeMillis());
secureRandom.nextBytes(salt);
return salt;
}
private static String encrypt(String content, byte[] key, byte[] iv) throws Exception {
SecretKeySpec secretKeySpec = new SecretKeySpec(key, "AES");
Cipher cipher = Cipher.getInstance("AES/CTR/PKCS5Padding");
IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);
cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, ivParameterSpec);
byte[] resultBytes = cipher.doFinal(content.getBytes());
return new String(Hex.encode(resultBytes));
}
}

11
designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java

@ -30,6 +30,7 @@ import com.fr.event.Listener;
import com.fr.log.FineLoggerFactory;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -51,7 +52,7 @@ public class ContentReplacerCenter {
}
private List<ContentChange> contentChangeList = new ArrayList<>();
private List<ContentChangeItem> items = new ArrayList<>();
private Map<ChangeItem, ContentChangeItem> itemsMap = new HashMap<>();
private ContentReplacerCenter() {
@ -61,21 +62,21 @@ public class ContentReplacerCenter {
if (param.getChangeMap().isEmpty()) {
return;
}
items.add(param);
itemsMap.put(param.getChangeItem(), param);
}
});
EventDispatcher.listen(TableDataModifyEvent.INSTANCE, new Listener<ContentChangeItem>() {
@Override
public void on(Event event, ContentChangeItem param) {
items.add(param);
itemsMap.put(param.getChangeItem(), param);
long start = System.currentTimeMillis();
ContentObjectManager.getInstance().searchObject(param.getObject());
FineLoggerFactory.getLogger().debug("search object spend {} ms", (System.currentTimeMillis() - start));
FineLoggerFactory.getLogger().debug("search result: {}", ContentObjectManager.getInstance().getObjectMap() == null
? null : ContentObjectManager.getInstance().getObjectMap().keySet());
List<ContentChangeItem> itemsCopy = new ArrayList<>(items);
items.clear();
List<ContentChangeItem> itemsCopy = new ArrayList<>(itemsMap.values());
itemsMap.clear();
onRename(itemsCopy, contentChangeList);
}
});

24
designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java

@ -5,6 +5,7 @@ import com.fr.decision.update.info.UpdateCallBack;
import com.fr.decision.update.info.UpdateProgressCallBack;
import com.fr.design.i18n.Toolkit;
import com.fr.design.versioncheck.VersionCheckUtils;
import com.fr.env.SyncFailedPluginsDialog;
import com.fr.json.JSONArray;
import com.fr.log.FineLoggerFactory;
import java.util.concurrent.ExecutionException;
@ -14,11 +15,12 @@ import javax.swing.SwingWorker;
public abstract class SyncFileProcess extends SwingWorker<Boolean, Void> {
private String buildNo;
private JProgressBar bar;
private JSONArray syncFailedPlugins;
private SyncFailedPluginsDialog syncFailedPluginsDialog;
public SyncFileProcess(JProgressBar bar, String buildNo) {
public SyncFileProcess(JProgressBar bar, String buildNo, SyncFailedPluginsDialog syncFailedPluginsDialog) {
this.bar = bar;
this.buildNo = buildNo;
this.syncFailedPluginsDialog = syncFailedPluginsDialog;
}
@Override
@ -26,8 +28,19 @@ public abstract class SyncFileProcess extends SwingWorker<Boolean, Void> {
UpdateCallBack callBack = new UpdateProgressCallBack(bar);
bar.setValue(0);
bar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins"));
syncFailedPlugins = VersionCheckUtils.syncPlugins(VersionCheckUtils.checkLocalAndRemotePlugin());
return SyncExecutor.getInstance().execute(callBack, buildNo);
JSONArray syncFailedPlugins = VersionCheckUtils.syncPlugins(VersionCheckUtils.checkLocalAndRemotePlugin());
if (syncFailedPlugins.size() > 0) {
syncFailedPluginsDialog.showSyncFailedPluginsInfo(syncFailedPlugins);
}
RecoverForDesigner recoverForDesigner = new RecoverForDesigner();
if (!recoverForDesigner.backup()) {
return false;
}
boolean result = SyncExecutor.getInstance().execute(callBack, buildNo);
if (!result) {
recoverForDesigner.recover();
}
return result;
}
@Override
@ -48,9 +61,6 @@ public abstract class SyncFileProcess extends SwingWorker<Boolean, Void> {
}
}
public JSONArray getSyncFailedPlugins(){
return syncFailedPlugins;
}
/**
* 下载成功

13
designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java

@ -27,6 +27,8 @@ public class DesignerPushUpdateManager {
private DesignerUpdateInfo updateInfo;
private boolean shouldPopUp = false;
private DesignerPushUpdateManager() {
}
@ -91,13 +93,14 @@ public class DesignerPushUpdateManager {
* 检查更新如果有合适的更新版本则弹窗
*/
private void checkAndPop() {
checkUpdateService.execute(new Runnable() {
@Override
public void run() {
if (!shouldPopUp()) {
this.shouldPopUp = true;
FineLoggerFactory.getLogger().debug("skip push update");
return;
}
checkUpdateService.execute(new Runnable() {
@Override
public void run() {
final DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
DesignerPushUpdateDialog.createAndShow(designerFrame, updateInfo);
}
@ -139,6 +142,10 @@ public class DesignerPushUpdateManager {
return StringUtils.isNotEmpty(prefix) && fullCurrentVersion.contains(SPLIT_CHAR);
}
public boolean isShouldPopUp() {
return shouldPopUp;
}
/**
* 跳转到更新升级窗口并自动开始更新
*/

5
designer-base/src/main/java/com/fr/design/upm/UpmBridge.java

@ -18,9 +18,11 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.locale.impl.BbsRegisterMark;
import com.fr.design.locale.impl.BbsResetMark;
import com.fr.design.locale.impl.BbsSpaceMark;
import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.upm.event.DownloadEvent;
import com.fr.design.upm.exec.UpmBrowserExecutor;
import com.fr.design.upm.task.UpmTaskWorker;
import com.fr.design.utils.BrowseUtils;
import com.fr.event.EventDispatcher;
import com.fr.general.GeneralUtils;
import com.fr.general.locale.LocaleCenter;
@ -424,7 +426,8 @@ public class UpmBridge {
public void getPriviteMessage() {
try {
LocaleMark<String> spaceMark = LocaleCenter.getMark(BbsSpaceMark.class);
Desktop.getDesktop().browse(new URI(spaceMark.getValue()));
String ssoUrl = DesignerLoginUtils.generateDesignerSSOUrl(spaceMark.getValue());
BrowseUtils.browser(ssoUrl);
} catch (Exception exp) {
FineLoggerFactory.getLogger().info(exp.getMessage());
}

26
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -2,13 +2,11 @@ package com.fr.design.versioncheck;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.NotificationDialog;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.DesignerWorkspaceType;
import com.fr.design.env.RemoteWorkspace;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.env.CheckServiceDialog;
import com.fr.env.VersionCheckMessageDialog;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralUtils;
@ -24,6 +22,7 @@ import com.fr.plugin.manage.control.PluginControllerHelper;
import com.fr.plugin.manage.control.PluginTaskCallback;
import com.fr.plugin.manage.control.PluginTaskResult;
import com.fr.plugin.manage.control.ProgressCallback;
import com.fr.report.ReportHelper;
import com.fr.rpc.Result;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
@ -33,9 +32,6 @@ import com.fr.workspace.engine.base.FineObjectPool;
import com.fr.workspace.engine.channel.http.FunctionalHttpRequest;
import com.fr.workspace.engine.exception.WorkspaceConnectionException;
import com.fr.workspace.engine.rpc.WorkspaceProxyPool;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.lang.reflect.Method;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
@ -206,10 +202,7 @@ public class VersionCheckUtils {
}
private static boolean needCheckBranch(DesignerWorkspaceInfo selectedEnv) {
if (selectedEnv.getType() == DesignerWorkspaceType.Remote) {
return true;
}
return false;
return selectedEnv.getType() == DesignerWorkspaceType.Remote;
}
public static JSONArray checkLocalAndRemotePlugin() {
@ -221,21 +214,26 @@ public class VersionCheckUtils {
localPluginsMap.put(pluginContext.getID(), pluginContext);
}
JSONObject remotePlugin;
Map<String, String> pluginsNameMap = ReportHelper.getPluginNameMap();
for (int i = 0; i < remotePlugins.size(); i++) {
remotePlugin = remotePlugins.getJSONObject(i);
if (localPluginsMap.containsKey(remotePlugin.getString(ID))) {
if (ComparatorUtils.equals(localPluginsMap.get(remotePlugin.getString(ID)).getVersion(), remotePlugin.getString(VERSION))) {
if (ComparatorUtils.equals(remotePlugin.getString("running"), "false")) {
continue;
}
String remotePluginID = remotePlugin.getString(ID);
if (localPluginsMap.containsKey(remotePluginID)) {
if (ComparatorUtils.equals(localPluginsMap.get(remotePluginID).getVersion(), remotePlugin.getString(VERSION))) {
continue;
} else {
if (remotePlugin.getString(NAME) == null) {
remotePlugin.put(NAME, localPluginsMap.get(remotePlugin.getString(ID)).getName());
remotePlugin.put(NAME, localPluginsMap.get(remotePluginID).getName());
}
remotePlugin.put("type", INCONSISTENCY);
}
} else {
remotePlugin.put("type", MISSING);
if (remotePlugin.getString(NAME) == null) {
remotePlugin.put(NAME, remotePlugin.getString("id"));
remotePlugin.put(NAME, pluginsNameMap.getOrDefault(remotePluginID, remotePluginID));
}
}
differentPlugins.put(remotePlugin);
@ -333,8 +331,10 @@ public class VersionCheckUtils {
@Override
public void done(PluginTaskResult result) {
latch.countDown();
if(result.isSuccess()) {
FineLoggerFactory.getLogger().info("installPlugin: " + result.getCurrentTask().getMarker().getPluginID());
}
}
});
}
try {

18
designer-base/src/main/java/com/fr/env/CheckServiceDialog.java vendored

@ -308,33 +308,31 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
private MouseListener syncButtonClickListener = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
ignoreButton.setEnabled(false);
String[] option = {Toolkit.i18nText("Fine-Design_Report_Yes"), Toolkit.i18nText("Fine-Design_Report_No")};
if (!jarConsistency) {
int a = FineJOptionPane.showOptionDialog(getParent(), Toolkit.i18nText("Fine-Design_Basic_Sync_Info_Information"),
Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION, QUESTION_MESSAGE, IOUtils.readIcon("com/fr/design/icon/versioncheck/question.png"), option, 1);
if (0 == a) {
//jar包一致的话只更新插件
progressBar.setVisible(true);
progressBar.setString(Toolkit.i18nText("Fine-Design_Update_Info_Wait_Message"));
syncButton.setEnabled(false);
if (!jarConsistency) {
deletePreviousPropertyFile();
final String installLib = StableUtils.pathJoin(StableUtils.getInstallHome(), ProjectConstants.LOGS_NAME, UpdateConstants.INSTALL_LIB);
final JFrame frame = DesignerContext.getDesignerFrame();
final RestartHelper helper = new RestartHelper();
FineProcessContext.getParentPipe().fire(FineProcessEngineEvent.DESTROY);
SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(),JSONArray.create());
new SyncFileProcess(progressBar, remoteBuildNo) {
SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(frame, JSONArray.create());
new SyncFileProcess(progressBar, remoteBuildNo, syncFailedPluginsDialog) {
@Override
public void onDownloadSuccess() {
deleteForDesignerUpdate(installLib);
progressBar.setVisible(false);
JSONArray syncFailedPlugins = getSyncFailedPlugins();
if (syncFailedPlugins.size() > 0) {
syncFailedPluginsDialog.showSyncFailedPluginsInfo(syncFailedPlugins);
syncFailedPluginsDialog.setVisible(true);
}
syncFailedPluginsDialog.showDialog();
if (!syncFailedPluginsDialog.restartClicked()) {
helper.restartForUpdate(frame);
}
}
@Override
public void onDownloadFailed() {
@ -345,6 +343,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
helper.restartForUpdate(frame);
}
}.execute();
}
} else {
//到这边说明主jar是一致的,就只尝试同步插件
new SwingWorker<JSONArray, Void>() {
@ -379,7 +378,6 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
}.execute();
}
}
}
};
private boolean deletePreviousPropertyFile() {

26
designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java vendored

@ -10,6 +10,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.json.JSONArray;
@ -25,6 +26,7 @@ import java.util.Locale;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
@ -39,7 +41,11 @@ public class SyncFailedPluginsDialog extends JDialog {
private UILabel detailsLabel;
private JScrollPane scrollPane;
private UITextArea detailsTextArea;
public SyncFailedPluginsDialog(Frame parent, JSONArray syncFailedPlugins) {
private JFrame frame = DesignerContext.getDesignerFrame();
private RestartHelper restartHelper = new RestartHelper();
private UIButton restartButton;
private boolean show = false;
public SyncFailedPluginsDialog(JFrame parent, JSONArray syncFailedPlugins) {
super(parent, true);
JPanel body = FRGUIPaneFactory.createBorderLayout_L_Pane();
@ -79,7 +85,7 @@ public class SyncFailedPluginsDialog extends JDialog {
centerPanel.add(scrollPane,BorderLayout.CENTER);
JPanel southPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
UIButton restartButton = new UIButton(Toolkit.i18nText("Fine-Design_Updater_Restart_Designer"));
restartButton = new UIButton(Toolkit.i18nText("Fine-Design_Updater_Restart_Designer"));
restartButton.addMouseListener(restartButtonClickListener);
southPane.add(restartButton);
@ -104,6 +110,15 @@ public class SyncFailedPluginsDialog extends JDialog {
detailsText.append(plugin.getString("name")).append(",").append(Toolkit.i18nText("Fine-Design_Basic_Sync_Server_Version")).append(plugin.getString("version")).append("\n");
}
detailsTextArea.setText(detailsText.toString());
if(!ComparatorUtils.equals(detailsTextArea.getText(),StringUtils.EMPTY)){
show = true;
}
}
public void showDialog(){
if(show){
this.setVisible(true);
}
}
private MouseListener detailsLabelClickListener = new MouseAdapter() {
@ -119,10 +134,15 @@ public class SyncFailedPluginsDialog extends JDialog {
}
};
public boolean restartClicked(){
return !restartButton.isEnabled();
}
private MouseListener restartButtonClickListener = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
RestartHelper.restartForUpdate(DesignerContext.getDesignerFrame());
restartButton.setEnabled(false);
restartHelper.restartForUpdate(frame);
}
};
}

54
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_en_US.js

@ -1,5 +1,59 @@
var Store = {
i18n : {
'Designer-Login_User_Name': 'Username/Email/Phone number',
'Designer-Login_User_Name_Hint': 'Please enter username/email/phone number',
'Designer-Login_Password': 'Password',
'Designer-Login_Password_Hint': 'Please enter the password',
'Designer-Login': 'Login',
'Designer-Login_Title': 'FanRuan Passport Login',
'Designer-Login_I_Have_Read': 'I have read',
'Designer-Login_Service_Terms': 'Terms of Service',
'Designer-Login_Forget_Password': 'Forgot your password?',
'Designer-Login_Sms': 'SMS login',
'Designer-Login_Normal': 'Password login',
'Designer-Login_Phone': 'Phone number',
'Designer-Login_Phone_Hint': 'Please enter your phone number',
'Designer-Login_Code': 'Captcha',
'Designer-Login_Code_Hint': 'Please enter the captcha',
'Designer-Login_Code_Request': 'Get captcha',
'Designer-Login_Code_Request_Again': 'Re-acquire',
'Designer-Login_Register_Or_Login': 'Register/Login',
'Designer-Basic_Chinese_Mainland': 'Mainland China',
'Designer-Basic_Chinese_Hong_Kong': 'Hong Kong',
'Designer-Basic_Chinese_Macao': 'Macao',
'Designer-Basic_Chinese_Taiwan': 'Taiwan',
'Designer-Basic_Turkey': 'Turkey',
'Designer-Basic_South_Korea': 'South Korea',
'Designer-Basic_Japan': 'Japan',
'Designer-Basic_Singapore': 'Singapore',
'Designer-Basic_Malaysia': 'Malaysia',
'Designer-Login_Username_Not_Null': 'Username cannot be empty',
'Designer-Login_Password_Not_Null': 'Password cannot be empty',
'Designer-Login_Username_Or_Password_Incorrect': 'The username or password is incorrect, please check',
'Designer-Login_Phone_Not_Null': 'The phone number format is illegal',
'Designer-Login_Code_Not_Null': 'The captcha cannot be empty',
'Designer-Login_Code_Incorrect': 'The captcha has expired, please get it again',
'Designer-Login_Password_Setting_Hint': 'Enter the login password (6-16 digits password can be entered)',
'Designer-Login_Store_User_Not_Exist': 'The username does not exist',
'Designer-Login_Store_User_Password_Error': 'Username or password is incorrect',
'Designer-Login_Token_Request_Failed': 'Failed to get registration token',
'Designer-Login_Unexpected_Error': 'Unexpected error',
'Designer-Login_Internal_Error': 'Server internal error',
'Designer-Guide_Do_Not_Remind': 'No reminders within one month',
'Designer-Guide_Login': 'Login now',
'Designer-BBS_Register_Timeout': 'Register timeout, please resend the captcha',
'Designer-BBS_Phone_Is_Register': 'The phone number is already registered',
'Designer-BBS_Captcha_Send_Exceed_Limit': 'The captcha can only be sent once every 60s',
'Designer-BBS_Phone_Format_Error': 'Failed to send, the phone number format is incorrect',
'Designer-BBS_Captcha_Out_Of_Date': 'The captcha has expired, please get it again',
'Designer-BBS_Captcha_Try_Exceed_Limit': 'The number of attempts of the captcha has reached the upper limit, please get it again',
'Designer-BBS_Captcha_Error': 'Captcha error',
'Designer-BBS_Username_Format_Error': 'The nickname only supports Chinese, English and numbers',
'Designer-BBS_Username_Too_Short': 'The length of the nickname is too short',
'Designer-BBS_Username_Too_Long': 'The length of this nickname has reached the upper limit',
'Designer-BBS_Username_Is_Register': 'The user has been registered',
'Designer-BBS_Please_Enter_Correct_Phone': 'Please enter the correct phone number',
'Designer-Login_Network_Connected_Failed': 'Network connection failed',
}}
window.Store = Store;

54
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_ja_JP.js

@ -1,5 +1,59 @@
var Store = {
i18n : {
'Designer-Login_User_Name': 'ユーザ名/メールアドレス/携帯番号',
'Designer-Login_User_Name_Hint': 'ユーザ名/メールアドレス/携帯番号を入力してください。',
'Designer-Login_Password': 'パスワード',
'Designer-Login_Password_Hint': 'パスワードを入力してください。',
'Designer-Login': 'ログイン',
'Designer-Login_Title': 'FanRuanアカウントでログイン',
'Designer-Login_I_Have_Read': '承認する',
'Designer-Login_Service_Terms': '利用規約',
'Designer-Login_Forget_Password': 'パスワードをお忘れですか',
'Designer-Login_Sms': '認証コードログイン',
'Designer-Login_Normal': 'パスワードでログイン',
'Designer-Login_Phone': '携帯番号',
'Designer-Login_Phone_Hint': '携帯番号を入力してください。',
'Designer-Login_Code': '認証コード',
'Designer-Login_Code_Hint': '認証コードを入力してください。',
'Designer-Login_Code_Request': '認証コードを取得',
'Designer-Login_Code_Request_Again': '再取得',
'Designer-Login_Register_Or_Login': '登録/ログイン',
'Designer-Basic_Chinese_Mainland': '中国大陸',
'Designer-Basic_Chinese_Hong_Kong': '中国香港',
'Designer-Basic_Chinese_Macao': '中国澳門',
'Designer-Basic_Chinese_Taiwan': '中国台湾',
'Designer-Basic_Turkey': 'トルコ共和国',
'Designer-Basic_South_Korea': '韓国',
'Designer-Basic_Japan': '日本',
'Designer-Basic_Singapore': 'シンガポール',
'Designer-Basic_Malaysia': 'マレーシア',
'Designer-Login_Username_Not_Null': 'ユーザ名は空白不可。',
'Designer-Login_Password_Not_Null': 'パスワードは空白不可。',
'Designer-Login_Username_Or_Password_Incorrect': 'ユーザ名又はパスワードが間違っています。ご確認ください。',
'Designer-Login_Phone_Not_Null': '携帯番号の形式が正しくない。',
'Designer-Login_Code_Not_Null': '認証コードは空白不可。',
'Designer-Login_Code_Incorrect': '認証コードが無効になりました。再取得してください。',
'Designer-Login_Password_Setting_Hint': 'パスワードを入力してください。(6‐16桁入力可能)',
'Designer-Login_Store_User_Not_Exist': 'ユーザ名は存在しません',
'Designer-Login_Store_User_Password_Error': 'ユーザ名又はパスワードが間違っています。',
'Designer-Login_Token_Request_Failed': '登録Token取得に失敗',
'Designer-Login_Unexpected_Error': '未知のエラー',
'Designer-Login_Internal_Error': 'サーバ内部エラー',
'Designer-Guide_Do_Not_Remind': '一か月内アラートしません。',
'Designer-Guide_Login': 'ログイン',
'Designer-BBS_Register_Timeout': '登録Timeout、検証コードをもう一度取得してください。',
'Designer-BBS_Phone_Is_Register': 'この携帯は既に登録されています。',
'Designer-BBS_Captcha_Send_Exceed_Limit': '認証コードは60s内に一回しか送信できません。',
'Designer-BBS_Phone_Format_Error': '携帯番号の形式が間違っています、検証コード送信失敗。',
'Designer-BBS_Captcha_Out_Of_Date': '認証コードが無効になりました。再取得してください。',
'Designer-BBS_Captcha_Try_Exceed_Limit': '認証コードの試行回数が上限に達しています。再取得してください。',
'Designer-BBS_Captcha_Error': '認証コードが間違っています。',
'Designer-BBS_Username_Format_Error': 'ユーザ名は漢字、アルバイトと数字しかサポートできません。',
'Designer-BBS_Username_Too_Short': 'ユーザ名が短すぎます。',
'Designer-BBS_Username_Too_Long': 'ユーザ名が長すぎます。',
'Designer-BBS_Username_Is_Register': 'このユーザは登録済みです。',
'Designer-BBS_Please_Enter_Correct_Phone': '正確な携帯番号を入力してください。',
'Designer-Login_Network_Connected_Failed': 'インターネット接続失敗',
}}
window.Store = Store;

54
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_ko_KR.js

@ -1,5 +1,59 @@
var Store = {
i18n : {
'Designer-Login_User_Name': 'Username/Email/Phone number',
'Designer-Login_User_Name_Hint': 'Please enter username/email/phone number',
'Designer-Login_Password': 'Password',
'Designer-Login_Password_Hint': 'Please enter the password',
'Designer-Login': 'Login',
'Designer-Login_Title': 'FanRuan Passport Login',
'Designer-Login_I_Have_Read': 'I have read',
'Designer-Login_Service_Terms': 'Terms of Service',
'Designer-Login_Forget_Password': 'Forgot your password?',
'Designer-Login_Sms': 'SMS login',
'Designer-Login_Normal': 'Password login',
'Designer-Login_Phone': 'Phone number',
'Designer-Login_Phone_Hint': 'Please enter your phone number',
'Designer-Login_Code': 'Captcha',
'Designer-Login_Code_Hint': 'Please enter the captcha',
'Designer-Login_Code_Request': 'Get captcha',
'Designer-Login_Code_Request_Again': 'Re-acquire',
'Designer-Login_Register_Or_Login': 'Register/Login',
'Designer-Basic_Chinese_Mainland': 'Mainland China',
'Designer-Basic_Chinese_Hong_Kong': 'Hong Kong',
'Designer-Basic_Chinese_Macao': 'Macao',
'Designer-Basic_Chinese_Taiwan': 'Taiwan',
'Designer-Basic_Turkey': 'Turkey',
'Designer-Basic_South_Korea': 'South Korea',
'Designer-Basic_Japan': 'Japan',
'Designer-Basic_Singapore': 'Singapore',
'Designer-Basic_Malaysia': 'Malaysia',
'Designer-Login_Username_Not_Null': 'Username cannot be empty',
'Designer-Login_Password_Not_Null': 'Password cannot be empty',
'Designer-Login_Username_Or_Password_Incorrect': 'The username or password is incorrect, please check',
'Designer-Login_Phone_Not_Null': 'The phone number format is illegal',
'Designer-Login_Code_Not_Null': 'The captcha cannot be empty',
'Designer-Login_Code_Incorrect': 'The captcha has expired, please get it again',
'Designer-Login_Password_Setting_Hint': 'Enter the login password (6-16 digits password can be entered)',
'Designer-Login_Store_User_Not_Exist': 'The username does not exist',
'Designer-Login_Store_User_Password_Error': 'Username or password is incorrect',
'Designer-Login_Token_Request_Failed': 'Failed to get registration token',
'Designer-Login_Unexpected_Error': 'Unexpected error',
'Designer-Login_Internal_Error': 'Server internal error',
'Designer-Guide_Do_Not_Remind': 'No reminders within one month',
'Designer-Guide_Login': 'Login now',
'Designer-BBS_Register_Timeout': 'Register timeout, please resend the captcha',
'Designer-BBS_Phone_Is_Register': 'The phone number is already registered',
'Designer-BBS_Captcha_Send_Exceed_Limit': 'The captcha can only be sent once every 60s',
'Designer-BBS_Phone_Format_Error': 'Failed to send, the phone number format is incorrect',
'Designer-BBS_Captcha_Out_Of_Date': 'The captcha has expired, please get it again',
'Designer-BBS_Captcha_Try_Exceed_Limit': 'The number of attempts of the captcha has reached the upper limit, please get it again',
'Designer-BBS_Captcha_Error': 'Captcha error',
'Designer-BBS_Username_Format_Error': 'The nickname only supports Chinese, English and numbers',
'Designer-BBS_Username_Too_Short': 'The length of the nickname is too short',
'Designer-BBS_Username_Too_Long': 'The length of this nickname has reached the upper limit',
'Designer-BBS_Username_Is_Register': 'The user has been registered',
'Designer-BBS_Please_Enter_Correct_Phone': 'Please enter the correct phone number',
'Designer-Login_Network_Connected_Failed': 'Network connection failed',
}}
window.Store = Store;

54
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_zh_TW.js

@ -1,5 +1,59 @@
var Store = {
i18n : {
'Designer-Login_User_Name': '帳號/郵箱/手機號',
'Designer-Login_User_Name_Hint': '請輸入帳號/郵箱/手機號',
'Designer-Login_Password': '密碼',
'Designer-Login_Password_Hint': '請輸入密碼',
'Designer-Login': '登入',
'Designer-Login_Title': '帆軟通行證登入',
'Designer-Login_I_Have_Read': '我已閱讀',
'Designer-Login_Service_Terms': '服務條款',
'Designer-Login_Forget_Password': '忘記密碼?',
'Designer-Login_Sms': '驗證碼登入',
'Designer-Login_Normal': '密碼登入',
'Designer-Login_Phone': '手機號碼',
'Designer-Login_Phone_Hint': '請輸入手機號碼',
'Designer-Login_Code': '驗證碼',
'Designer-Login_Code_Hint': '請輸入驗證碼',
'Designer-Login_Code_Request': '獲取驗證碼',
'Designer-Login_Code_Request_Again': '重新獲取',
'Designer-Login_Register_Or_Login': '註冊/登入',
'Designer-Basic_Chinese_Mainland': '中國大陸',
'Designer-Basic_Chinese_Hong_Kong': '中國香港',
'Designer-Basic_Chinese_Macao': '中國澳門',
'Designer-Basic_Chinese_Taiwan': '中國臺灣',
'Designer-Basic_Turkey': '土耳其',
'Designer-Basic_South_Korea': '韓國',
'Designer-Basic_Japan': '日本',
'Designer-Basic_Singapore': '新加坡',
'Designer-Basic_Malaysia': '馬來西亞',
'Designer-Login_Username_Not_Null': '使用者名稱不能為空',
'Designer-Login_Password_Not_Null': '密碼不能為空',
'Designer-Login_Username_Or_Password_Incorrect': '使用者名稱或者密碼錯誤,請檢查',
'Designer-Login_Phone_Not_Null': '手機號碼格式不正確',
'Designer-Login_Code_Not_Null': '驗證碼不能為空',
'Designer-Login_Code_Incorrect': '驗證碼已過期,請重新獲取',
'Designer-Login_Password_Setting_Hint': '輸入登入密碼(可輸入6-16位密碼)',
'Designer-Login_Store_User_Not_Exist': '帳號不存在',
'Designer-Login_Store_User_Password_Error': '帳號或密碼錯誤',
'Designer-Login_Token_Request_Failed': '註冊令牌獲取失敗',
'Designer-Login_Unexpected_Error': '未知錯誤',
'Designer-Login_Internal_Error': '伺服器內部錯誤',
'Designer-Guide_Do_Not_Remind': '一個月內不再提醒',
'Designer-Guide_Login': '立即登入',
'Designer-BBS_Register_Timeout': '註冊超時,請重新發送驗證碼',
'Designer-BBS_Phone_Is_Register': '該手機號碼已註冊',
'Designer-BBS_Captcha_Send_Exceed_Limit': '驗證碼每60s只能傳送一次',
'Designer-BBS_Phone_Format_Error': '傳送失敗,手機號格式錯誤',
'Designer-BBS_Captcha_Out_Of_Date': '驗證碼已過期,請重新獲取',
'Designer-BBS_Captcha_Try_Exceed_Limit': '驗證碼嘗試次數已達上限,請重新獲取',
'Designer-BBS_Captcha_Error': '驗證碼錯誤',
'Designer-BBS_Username_Format_Error': '暱稱只支援中英文和數字',
'Designer-BBS_Username_Too_Short': '暱稱長度太短',
'Designer-BBS_Username_Too_Long': '這個暱稱長度已經達到了上限',
'Designer-BBS_Username_Is_Register': '該帳號已被註冊',
'Designer-BBS_Please_Enter_Correct_Phone': '請輸入正確的手機號',
'Designer-Login_Network_Connected_Failed': '網路連線失敗',
}}
window.Store = Store;

2
designer-base/src/main/resources/com/fr/design/login/login.js

File diff suppressed because one or more lines are too long

22
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -14,14 +14,12 @@ import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.locale.impl.BbsSpaceMark;
import com.fr.design.login.DesignerLoginHelper;
import com.fr.design.login.DesignerLoginSource;
import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.upm.event.CertificateEvent;
import com.fr.design.utils.BrowseUtils;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.general.DateUtils;
@ -31,17 +29,14 @@ import com.fr.general.locale.LocaleMark;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils;
import java.awt.Color;
import javax.swing.SwingConstants;
import java.awt.Cursor;
import java.awt.Desktop;
import java.awt.Frame;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.URI;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -80,13 +75,17 @@ public class UserInfoLabel extends UILabel {
@Override
public void mouseEntered(MouseEvent e) {
UserInfoLabel.this.setCursor(new Cursor(Cursor.HAND_CURSOR));
if (StringUtils.isEmpty(DesignerEnvManager.getEnvManager().getDesignerLoginUsername())) {
UserInfoLabel.this.setBackground(UIConstants.DESIGNER_LOGIN_BACKGROUND_ONCLICK);
}
}
@Override
public void mouseExited(MouseEvent e) {
if (StringUtils.isEmpty(DesignerEnvManager.getEnvManager().getDesignerLoginUsername())) {
UserInfoLabel.this.setBackground(UIConstants.DESIGNER_LOGIN_BACKGROUND);
}
}
@Override
public void mouseClicked(MouseEvent e) {
@ -104,7 +103,8 @@ public class UserInfoLabel extends UILabel {
if (StringUtils.isNotEmpty(userName)) {
try {
LocaleMark<String> spaceMark = LocaleCenter.getMark(BbsSpaceMark.class);
Desktop.getDesktop().browse(new URI(spaceMark.getValue()));
String ssoUrl = DesignerLoginUtils.generateDesignerSSOUrl(spaceMark.getValue());
BrowseUtils.browser(ssoUrl);
} catch (Exception exp) {
FineLoggerFactory.getLogger().info(exp.getMessage());
}
@ -211,12 +211,6 @@ public class UserInfoLabel extends UILabel {
DesignerLoginHelper.showLoginDialog(source);
}
});
EventDispatcher.listen(CertificateEvent.LOGIN, new Listener<String>() {
@Override
public void on(Event event, String text) {
setText(text);
}
});
}
private void clearLoginInformation() {

11
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -9,6 +9,10 @@ import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.upm.event.CertificateEvent;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.general.DateUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -75,6 +79,13 @@ public class UserInfoPane extends BasicPane {
autoPushLoginDialog();
this.add(userInfoLabel, BorderLayout.CENTER);
EventDispatcher.listen(CertificateEvent.LOGIN, new Listener<String>() {
@Override
public void on(Event event, String text) {
markSignIn(text);
}
});
}
public UserInfoLabel getUserInfoLabel() {

15
designer-realize/src/main/java/com/fr/design/share/SharableManager.java

@ -9,15 +9,21 @@ import com.fr.design.mainframe.share.collect.ComponentCollector;
import com.fr.design.mainframe.share.collect.SharableCollectorManager;
import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptSelectionClipboardHandler;
import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptTransferableClipboardHandler;
import com.fr.design.mainframe.share.ui.block.LocalWidgetBlock;
import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane;
import com.fr.design.mainframe.share.util.ShareComponentUtils;
import com.fr.design.share.utils.EffectItemUtils;
import com.fr.form.share.ShareLoader;
import com.fr.general.GeneralContext;
import com.fr.json.JSONArray;
import com.fr.stable.EnvChangedListener;
import java.util.List;
public class SharableManager {
public static void start() {
SharableCollectorManager.getInstance().execute();
listenEnv();
ClipboardFilter.registerClipboardHandler(EncryptSelectionClipboardHandler.getInstance());
ClipboardFilter.registerClipboardHandler(EncryptTransferableClipboardHandler.getInstance());
}
@ -44,4 +50,13 @@ public class SharableManager {
}
}
}
private static void listenEnv() {
GeneralContext.addEnvChangedListenerToLast(new EnvChangedListener() {
@Override
public void envChanged() {
LocalWidgetRepoPane.getInstance().refreshPane();
}
});
}
}

4
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -122,6 +122,7 @@ import com.fr.stable.xml.ObjectTokenizer;
import com.fr.stable.xml.ObjectXMLWriterFinder;
import com.fr.start.BBSGuestPaneProvider;
import com.fr.task.Once;
import com.fr.workspace.WorkContext;
import com.fr.xml.ReportXMLUtils;
import java.util.ArrayList;
@ -435,6 +436,9 @@ public class DesignerActivator extends Activator implements Prepare {
}
private void migrateBBSInfoFromFineDB() {
if (!WorkContext.getCurrent().isLocal()) {
return;
}
DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
if (manager.isCurrentVersionFirstLaunch()) {
int newUid = manager.getDesignerLoginUid();

Loading…
Cancel
Save