From 622c0456b3ebd8b66f498d05493636d8536d17cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 2 Sep 2021 16:50:46 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-57881=2010.0.19=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=86=92=E7=83=9F-=E6=96=AD=E7=BD=91=E6=97=B6=E6=89=93?= =?UTF-8?q?=E5=BC=80=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=86=85=E7=BD=AE=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E6=96=87=E6=A1=A3=EF=BC=8C=E6=97=A5=E5=BF=97=E4=B8=AD?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E7=A6=BB=E7=BA=BF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/help/TutorialAction.java | 5 +++++ .../java/com/fr/design/login/AbstractDesignerSSO.java | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java index cf4f02f40..3e08b1399 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java @@ -1,5 +1,6 @@ package com.fr.design.actions.help; +import com.fr.design.i18n.Toolkit; import com.fr.design.login.AbstractDesignerSSO; import com.fr.design.menu.MenuKeySet; import com.fr.general.CloudCenter; @@ -52,6 +53,10 @@ public class TutorialAction extends AbstractDesignerSSO { } } + public String getOffLineWarnMessage() { + return Toolkit.i18nText("Fine-Design_Offline_Helptutorial_Msg"); + } + public static final MenuKeySet HELP_TUTORIAL = new MenuKeySet() { @Override public char getMnemonic() { diff --git a/designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java b/designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java index 2662198bb..f38fc1d08 100644 --- a/designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java +++ b/designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java @@ -6,6 +6,9 @@ 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.log.FineLoggerFactory; +import com.fr.stable.StringUtils; + import java.awt.event.ActionEvent; import java.util.HashMap; import java.util.Map; @@ -21,6 +24,10 @@ public abstract class AbstractDesignerSSO extends UpdateAction { public void actionPerformed(ActionEvent event) { String url = getJumpUrl(); if (!DesignerLoginUtils.isOnline()) { + String message = getOffLineWarnMessage(); + if (StringUtils.isNotEmpty(message)) { + FineLoggerFactory.getLogger().warn(message); + } BrowseUtils.browser(url); return; } @@ -47,4 +54,8 @@ public abstract class AbstractDesignerSSO extends UpdateAction { } public abstract String getJumpUrl(); + + public String getOffLineWarnMessage() { + return StringUtils.EMPTY; + } }