Browse Source

Merge pull request #4726 in DESIGN/design from feature/10.0 to feature/big-screen

* commit 'a77da210fc8baac8db5e981fa9e2315e1669cb1c':
  REPORT-54332 mac设计器:帆软通行证在插件管理打开时的提示文本被插件管理遮挡
  REPORT-54317 登录页面优化-密码登录-UI问题
  REPORT-54252 登录页面-手机区号无法下拉选择
  REPORT-54301 点击模板商城支持单点登录
  REPORT-54277 消息推送-消息中心-看不到推送的消息
  REPORT-54277 消息推送-消息中心-看不到推送的消息
  REPORT-54277 消息推送-消息中心-看不到推送的消息
feature/big-screen
superman 3 years ago
parent
commit
d20d3dd134
  1. 8
      designer-base/src/main/java/com/fr/design/actions/community/TemplateStoreAction.java
  2. 2
      designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
  3. 6
      designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java
  4. 23
      designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java
  5. 16
      designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java
  6. 6
      designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java
  7. 18
      designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java
  8. 4
      designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java
  9. 2
      designer-base/src/main/java/com/fr/design/upm/UpmFinder.java
  10. 2
      designer-base/src/main/resources/com/fr/design/login/login.js

8
designer-base/src/main/java/com/fr/design/actions/community/TemplateStoreAction.java

@ -2,6 +2,7 @@ package com.fr.design.actions.community;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.share.collect.ComponentCollector;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils; import com.fr.design.utils.BrowseUtils;
@ -13,7 +14,7 @@ import java.awt.event.ActionEvent;
/** /**
* created by Harrison on 2020/03/24 * created by Harrison on 2020/03/24
**/ **/
public class TemplateStoreAction extends UpdateAction { public class TemplateStoreAction extends AbstractDesignerSSO {
public TemplateStoreAction() { public TemplateStoreAction() {
@ -44,9 +45,8 @@ public class TemplateStoreAction extends UpdateAction {
}; };
@Override @Override
public void actionPerformed(ActionEvent e) { public String getJumpUrl() {
ComponentCollector.getInstance().collectTepMenuEnterClick(); ComponentCollector.getInstance().collectTepMenuEnterClick();
String url = CloudCenter.getInstance().acquireUrlByKind("design.market.template", "https://market.fanruan.com/template"); return CloudCenter.getInstance().acquireUrlByKind("design.market.template", "https://market.fanruan.com/template");
BrowseUtils.browser(url);
} }
} }

2
designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java

@ -207,7 +207,7 @@ public class WebViewDlgHelper {
UIDialog dlg = new ShopDialog(DesignerContext.getDesignerFrame(), managerPane); UIDialog dlg = new ShopDialog(DesignerContext.getDesignerFrame(), managerPane);
PluginWebBridge.getHelper().setDialogHandle(dlg); PluginWebBridge.getHelper().setDialogHandle(dlg);
dlg.setVisible(true); dlg.setVisible(true);
DesignerLoginUtils.showPluginRemindOnFirstLaunch(); DesignerLoginUtils.showPluginRemindOnFirstLaunch(dlg);
} catch (Exception e) { } catch (Exception e) {
// ignored // ignored
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);

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

@ -8,6 +8,7 @@ import com.fr.general.log.MessageFormatter;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.third.org.bouncycastle.util.encoders.Hex; import com.fr.third.org.bouncycastle.util.encoders.Hex;
import java.awt.Window;
import java.security.SecureRandom; import java.security.SecureRandom;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -32,14 +33,15 @@ public class DesignerLoginUtils {
return map4Tpl; return map4Tpl;
} }
public static void showPluginRemindOnFirstLaunch() { public static void showPluginRemindOnFirstLaunch(Window parent) {
DesignerEnvManager manager = DesignerEnvManager.getEnvManager(); DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
int uid = manager.getDesignerLoginUid(); int uid = manager.getDesignerLoginUid();
if (uid > 0) { if (uid > 0) {
boolean pluginRemindOnFirstLaunch = manager.isPluginRemindOnFirstLaunch(); boolean pluginRemindOnFirstLaunch = manager.isPluginRemindOnFirstLaunch();
if (pluginRemindOnFirstLaunch) { if (pluginRemindOnFirstLaunch) {
DesignerToastMsgUtil.toastWarning( DesignerToastMsgUtil.toastWarning(
com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Plugin_Tip") com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Plugin_Tip"),
parent
); );
manager.setPluginRemindOnFirstLaunch(false); manager.setPluginRemindOnFirstLaunch(false);
} }

23
designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java

@ -6,6 +6,9 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.Window;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.JEditorPane; import javax.swing.JEditorPane;
@ -30,12 +33,15 @@ public class DesignerToastMsgUtil {
public static void toastPrompt(JPanel contendPane) { public static void toastPrompt(JPanel contendPane) {
toastPane(PROMPT_ICON, contendPane); toastPane(PROMPT_ICON, contendPane, DesignerContext.getDesignerFrame());
} }
public static void toastWarning(JPanel contendPane) { public static void toastWarning(JPanel contendPane) {
toastPane(WARNING_ICON, contendPane); toastPane(WARNING_ICON, contendPane, DesignerContext.getDesignerFrame());
}
public static void toastWarning(JPanel contendPane, Window parent) {
toastPane(WARNING_ICON, contendPane, parent);
} }
public static void toastPrompt(String promptInfo) { public static void toastPrompt(String promptInfo) {
@ -46,6 +52,10 @@ public class DesignerToastMsgUtil {
toastWarning(toastPane(warningInfo)); toastWarning(toastPane(warningInfo));
} }
public static void toastWarning(String warningInfo, Window parent) {
toastWarning(toastPane(warningInfo), parent);
}
private static JPanel toastPane(String text) { private static JPanel toastPane(String text) {
UILabel promptLabel = new UILabel("<html>" + text + "</html>"); UILabel promptLabel = new UILabel("<html>" + text + "</html>");
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -58,7 +68,7 @@ public class DesignerToastMsgUtil {
return jPanel; return jPanel;
} }
private static void toastPane(Icon icon, JPanel contendPane) { private static void toastPane(Icon icon, JPanel contendPane, Window parent) {
JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane();
UILabel uiLabel = new UILabel(icon); UILabel uiLabel = new UILabel(icon);
uiLabel.setVerticalAlignment(SwingConstants.TOP); uiLabel.setVerticalAlignment(SwingConstants.TOP);
@ -67,7 +77,12 @@ public class DesignerToastMsgUtil {
pane.add(contendPane, BorderLayout.CENTER); pane.add(contendPane, BorderLayout.CENTER);
pane.setBorder(BorderFactory.createEmptyBorder(8, 15, 8, 15)); pane.setBorder(BorderFactory.createEmptyBorder(8, 15, 8, 15));
contendPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); contendPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
ToastMsgDialog dialog = new ToastMsgDialog(DesignerContext.getDesignerFrame(), pane); ToastMsgDialog dialog;
if (parent instanceof Dialog) {
dialog = new ToastMsgDialog((Dialog) parent, pane);
} else {
dialog = new ToastMsgDialog((Frame) parent, pane);
}
dialog.setVisible(true); dialog.setVisible(true);
} }

16
designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java

@ -5,6 +5,7 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.module.ModuleContext; import com.fr.module.ModuleContext;
import java.awt.Dialog;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Frame; import java.awt.Frame;
@ -26,14 +27,23 @@ public class ToastMsgDialog extends UIDialog {
public ToastMsgDialog(Frame parent, JPanel panel) { public ToastMsgDialog(Frame parent, JPanel panel) {
super(parent); super(parent);
init(panel);
}
public ToastMsgDialog(Dialog parent, JPanel panel) {
super(parent);
init(panel);
}
private void init(JPanel panel) {
setFocusable(false); setFocusable(false);
setAutoRequestFocus(false); setAutoRequestFocus(false);
setUndecorated(true); setUndecorated(true);
contentPane = panel; contentPane = panel;
initComponent(parent); initComponent();
} }
private void initComponent(Frame parent) { private void initComponent() {
this.getContentPane().setLayout(null); this.getContentPane().setLayout(null);
this.getContentPane().add(contentPane); this.getContentPane().add(contentPane);
Dimension dimension = calculatePreferSize(); Dimension dimension = calculatePreferSize();
@ -42,7 +52,7 @@ public class ToastMsgDialog extends UIDialog {
contentPane.setSize(dimension); contentPane.setSize(dimension);
setLocationRelativeTo(DesignerContext.getDesignerFrame().getContentFrame()); setLocationRelativeTo(DesignerContext.getDesignerFrame().getContentFrame());
int positionY = DesignerContext.getDesignerFrame().getContentFrame().getLocationOnScreen().y + 10; int positionY = DesignerContext.getDesignerFrame().getContentFrame().getLocationOnScreen().y + 10;
setLocation((parent.getWidth() - dimension.width) / 2, positionY); setLocation((DesignerContext.getDesignerFrame().getWidth() - dimension.width) / 2, positionY);
addMouseEvent(contentPane); addMouseEvent(contentPane);
} }

6
designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java

@ -26,12 +26,12 @@ public class NotificationCenter {
} }
public void removeNotification(int index){ public void removeNotification(int index){
notifications.remove(index); notifications.remove(index);
NotificationCenterPane.getNotificationCenterPane().refreshButton(); NotificationCenterPane.getNotificationCenterPane().refreshButton();
} }
public Notification getNotification(int index){ public Notification getNotification(int index){
return notifications.get(index); return notifications.get(index);
} }
public void clearAllNotifications(){ public void clearAllNotifications(){

18
designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java

@ -2,7 +2,6 @@ package com.fr.design.notification.ui;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.notification.Notification; import com.fr.design.notification.Notification;
import com.fr.design.notification.NotificationCenter; import com.fr.design.notification.NotificationCenter;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -26,9 +25,8 @@ public class NotificationCenterDialog extends JDialog {
private UILabel deleteLabel; private UILabel deleteLabel;
private static final int NOTIFICATIONCOUNT = 5; private static final int NOTIFICATIONCOUNT = 5;
private static NotificationCenterDialog instance;
private NotificationCenterDialog(Frame parent) { public NotificationCenterDialog(Frame parent) {
super(parent); super(parent);
setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Notification")); setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Notification"));
setResizable(false); setResizable(false);
@ -42,13 +40,6 @@ public class NotificationCenterDialog extends JDialog {
initComponents(); initComponents();
} }
public static NotificationCenterDialog getInstance() {
if (instance == null) {
instance = new NotificationCenterDialog(DesignerContext.getDesignerFrame());
}
return instance;
}
private void initComponents() { private void initComponents() {
centerPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); centerPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
addNotification(); addNotification();
@ -89,14 +80,15 @@ public class NotificationCenterDialog extends JDialog {
return deleteLabel; return deleteLabel;
} }
public void showDialog() {
this.setVisible(true);
}
public void hideDialog() { public void hideDialog() {
this.dispose(); this.dispose();
} }
public void showDialog() {
this.setVisible(true);
}
public void addNotification() { public void addNotification() {
notificationNeedShow.clear(); notificationNeedShow.clear();

4
designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java

@ -4,6 +4,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.notification.NotificationCenter; import com.fr.design.notification.NotificationCenter;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -27,7 +28,8 @@ public class NotificationCenterPane extends BasicPane {
notificationCenterButton.addMouseListener(new MouseAdapter() { notificationCenterButton.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
NotificationCenterDialog.getInstance().showDialog(); NotificationCenterDialog notificationCenterDialog = new NotificationCenterDialog(DesignerContext.getDesignerFrame());
notificationCenterDialog.showDialog();
} }
}); });
this.setBackground(UIConstants.TEMPLATE_TAB_PANE_BACKGROUND); this.setBackground(UIConstants.TEMPLATE_TAB_PANE_BACKGROUND);

2
designer-base/src/main/java/com/fr/design/upm/UpmFinder.java

@ -98,7 +98,7 @@ public class UpmFinder {
dialog = new UpmShowDialog(DesignerContext.getDesignerFrame(), upmPane); dialog = new UpmShowDialog(DesignerContext.getDesignerFrame(), upmPane);
} }
dialog.setVisible(true); dialog.setVisible(true);
DesignerLoginUtils.showPluginRemindOnFirstLaunch(); DesignerLoginUtils.showPluginRemindOnFirstLaunch(dialog);
} }
} }

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

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save