You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
40 lines
1.3 KiB
4 years ago
|
package com.fr.design.mainframe;
|
||
|
|
||
|
import com.fr.design.i18n.Toolkit;
|
||
|
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo;
|
||
|
import com.fr.design.mainframe.toast.DesignerToastMsgUtil;
|
||
|
import com.fr.design.notification.SnapChat;
|
||
|
import com.fr.design.notification.SnapChatFactory;
|
||
|
import com.fr.design.notification.SnapChatKey;
|
||
|
|
||
|
/**
|
||
|
* Created by kerry on 5/8/21
|
||
|
*/
|
||
|
public class ComponentReuseNotifyUtil {
|
||
|
private static final String COMPONENT_SNAP_CHAT_KEY = "com.fr.component.share-components";
|
||
|
|
||
|
private ComponentReuseNotifyUtil() {
|
||
|
|
||
|
}
|
||
|
|
||
|
public static void enterWidgetLib() {
|
||
|
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_LIB);
|
||
|
enterWidgetLibExtraAction();
|
||
|
}
|
||
|
|
||
|
public static void enterWidgetLibExtraAction() {
|
||
|
if (ComponentReuseNotificationInfo.getInstance().isClickedWidgetLib()) {
|
||
|
return;
|
||
|
}
|
||
|
SnapChat snapChat = SnapChatFactory.createSnapChat(false, new SnapChatKey() {
|
||
|
@Override
|
||
|
public String calc() {
|
||
|
return COMPONENT_SNAP_CHAT_KEY;
|
||
|
}
|
||
|
});
|
||
|
if (snapChat.hasRead()) {
|
||
|
DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Component_Reuse_Merge_Prompt"));
|
||
|
}
|
||
|
}
|
||
|
}
|