com.xd.sdk.common 7.1.1 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/Android/XDCommonAndroidGradleProcessor.cs +2 -0
- package/Editor/XD.SDK.Common.Editor.asmdef +2 -1
- package/Plugins/Android/libs/XDGBridgeCommon_v7_7.2.0.aar +0 -0
- package/Plugins/Android/libs/XDGCommon_7.2.0.aar +0 -0
- package/Plugins/Android/libs/XDGTapTapWrapperInternal_7.2.0.aar +0 -0
- package/Plugins/Android/libs/{XDTapTapWrapper_7.1.0.aar → XDTapTapWrapper_7.2.0.aar} +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_chat.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_chat.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_invite.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_invite.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_unfollow.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_unfollow.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark.meta +8 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_chat.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_chat.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_invite.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_invite.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_unfollow.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_unfollow.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light.meta +8 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_achievement.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_achievement.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_achievement_platinum.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_achievement_platinum.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_arrow.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_arrow.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_close.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_close.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_default_background.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_default_background.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_logo.png +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_logo.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile.meta +8 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/NSError+XDG.h +1 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalRouterSchemes.h +2 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDConfigManager.h +1 -1
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAnnouncementConfig.h.meta +7 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAnnouncementManager.h.meta +7 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCloudLogHelper.h +4 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGConfig.h +2 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGInitParam.h +5 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDTapTapInfo.h +7 -1
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDVersion.h +3 -3
- package/Plugins/iOS/XDCommonSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDCommonSDK.framework/XDCommonSDK +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Headers/XDTapSDK4WrapperSDK-Swift.h +1 -1
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Headers/XDTapSDK4WrapperSDK.h +3 -3
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/XDTapSDK4WrapperSDK +0 -0
- package/Resources/Prefabs/AccountCell.prefab +24 -15
- package/Resources/Prefabs/AgreementOptionAll.prefab +15 -9
- package/Resources/Prefabs/AgreementOptionNormal.prefab +16 -10
- package/Resources/Prefabs/AreaCodeCell.prefab +13 -8
- package/Resources/Prefabs/CancelAccountAlert.prefab +23 -23
- package/Resources/Prefabs/CenterErrorView.prefab +8 -8
- package/Resources/Prefabs/ConfirmDialog.prefab +20 -20
- package/Resources/Prefabs/DeleteAccountAlert.prefab +48 -45
- package/Resources/Prefabs/DeleteCell.prefab +6 -6
- package/Resources/Prefabs/Dialog.prefab +24 -24
- package/Resources/Prefabs/DisagreeConfirmAlert.prefab +15 -15
- package/Resources/Prefabs/GeneralAgreementAlert.prefab +53 -31
- package/Resources/Prefabs/LoadFailedView.prefab +12 -12
- package/Resources/Prefabs/LoadingView.prefab +9 -6
- package/Resources/Prefabs/PayHintAlert.prefab +17 -15
- package/Resources/Prefabs/PayLoadFailedView.prefab +13 -13
- package/Resources/Prefabs/PaymentAlert.prefab +9 -5
- package/Resources/Prefabs/SmallLoadingView.prefab +4 -4
- package/Resources/Prefabs/UserCenterAlert.prefab +76 -46
- package/Resources/Prefabs/XDCodeUnbindAlert.prefab +56 -34
- package/Resources/Prefabs/XDEmailAlert.prefab +84 -49
- package/Resources/Prefabs/XDPhoneAlertIO.prefab +129 -65
- package/Resources/Prefabs/XDPhoneNumberInputAlert.prefab +46 -28
- package/Resources/Prefabs/XDRiskControlAlert.prefab +12 -7
- package/Resources/Prefabs/XDSDKUI.prefab +3 -3
- package/Resources/Prefabs/XDVerifyCodeInputAlert.prefab +47 -28
- package/Resources/Prefabs/XDWebBridgeView.prefab +11 -11
- package/Resources/Prefabs/XDWebViewAlert.prefab +10 -10
- package/Resources/Shaders/UI/UI-Default-Gamma.shader +129 -0
- package/Resources/Shaders/UI/UI-Default-Gamma.shader.meta +9 -0
- package/Resources/Shaders/UI/UI_Default-Gamma.mat +36 -0
- package/Resources/Shaders/UI/UI_Default-Gamma.mat.meta +8 -0
- package/Resources/Shaders/UI/UI_Default-Mask.mat +36 -0
- package/Resources/Shaders/UI/UI_Default-Mask.mat.meta +8 -0
- package/Resources/Shaders/UI.meta +8 -0
- package/Resources/Shaders.meta +8 -0
- package/Runtime/Internal/Events/XDGEventBus.cs +140 -17
- package/Runtime/Internal/Mobile/CommonFeaturesImpl.cs +11 -10
- package/Runtime/Internal/Mobile/Http/CommonParamsInterceptor.cs +1 -1
- package/Runtime/Internal/Standalone/Agreement/AgreementModule.cs +4 -4
- package/Runtime/Internal/Standalone/CommonFeaturesImpl.cs +7 -5
- package/Runtime/Internal/Standalone/Config/AppConfig.cs +3 -1
- package/Runtime/Internal/Standalone/Config/ConfigModule.cs +5 -2
- package/Runtime/Internal/Standalone/Http/Interceptor/MacAuthenticationInterceptor.cs +7 -7
- package/Runtime/Internal/Standalone/Http/Interceptor/StandaloneErrorHandlingInterceptor.cs +5 -5
- package/Runtime/Internal/Standalone/Http/XDHttpUtils.cs +39 -16
- package/Runtime/Internal/Standalone/IPInfo/IPInfoModule.cs +42 -20
- package/Runtime/Internal/Standalone/IPInfo/XDGAreaCode.cs +1 -1
- package/Runtime/Internal/Standalone/Persistence/Persistence.cs +42 -22
- package/Runtime/Internal/Standalone/Steam/SteamUtils.cs +14 -7
- package/Runtime/Internal/Standalone/Track/AliyunTrack.cs +41 -34
- package/Runtime/Internal/Standalone/UI/Base/UIManager.cs +4 -3
- package/Runtime/Internal/Standalone/UI/Base/XDGCommonUIResources.cs +107 -0
- package/Runtime/Internal/Standalone/UI/Base/XDGCommonUIResources.cs.meta +11 -0
- package/Runtime/Internal/Standalone/UI/Controllers/CancelAccountAlert.cs +69 -33
- package/Runtime/Internal/Standalone/UI/Controllers/GeneralAgreementAlert.cs +29 -22
- package/Runtime/Internal/Standalone/UI/Controllers/XDWebViewAlert.cs +4 -5
- package/Runtime/Internal/Standalone/Utils/SteamWrapper.cs +2 -2
- package/Runtime/Internal/Standalone/Utils/TaskDispatcher.cs +1 -1
- package/Runtime/Internal/Standalone/Utils/WindowsRegistryAccess.cs +7 -7
- package/Runtime/Internal/Standalone/Web/Function/BackgroundColorWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/ClipboardWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/CloseWebFunction.cs +13 -4
- package/Runtime/Internal/Standalone/Web/Function/DeviceInfoWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/GameMessageWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/GetSafeAreaWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/GetStorageWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/HttpRequestWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/LoadingWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/LogWebFunction.cs +5 -5
- package/Runtime/Internal/Standalone/Web/Function/NavigationWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/OpenPageWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/PutStorageWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/ToastWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/TrackEventWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/WebBridgeController.cs +6 -7
- package/Runtime/Internal/Standalone/Web/WebRequest.cs +3 -3
- package/Runtime/Internal/Standalone/Web/XDWebBridgeView.cs +1 -1
- package/Runtime/Internal/XDGCommonInternal.cs +1 -1
- package/package.json +2 -2
- package/Plugins/Android/libs/XDGBridgeCommon_v7_7.1.0.aar +0 -0
- package/Plugins/Android/libs/XDGCommon_7.1.0.aar +0 -0
- package/Plugins/Android/libs/XDGTapTapWrapperInternal_7.1.0.aar +0 -0
- package/Runtime/Internal/Core/ReflectionUtils.cs +0 -640
- package/Runtime/Internal/Core/ReflectionUtils.cs.meta +0 -3
- /package/Plugins/Android/libs/{XDGBridgeCommon_v7_7.1.0.aar.meta → XDGBridgeCommon_v7_7.2.0.aar.meta} +0 -0
- /package/Plugins/Android/libs/{XDGCommon_7.1.0.aar.meta → XDGCommon_7.2.0.aar.meta} +0 -0
- /package/Plugins/Android/libs/{XDGTapTapWrapperInternal_7.1.0.aar.meta → XDGTapTapWrapperInternal_7.2.0.aar.meta} +0 -0
- /package/Plugins/Android/libs/{XDTapTapWrapper_7.1.0.aar.meta → XDTapTapWrapper_7.2.0.aar.meta} +0 -0
|
@@ -5,11 +5,14 @@ using UnityEngine.UI;
|
|
|
5
5
|
using Vuplex.WebView;
|
|
6
6
|
using Vuplex.WebView.Internal;
|
|
7
7
|
|
|
8
|
-
namespace XD.SDK.Common.Internal.Standalone
|
|
9
|
-
|
|
8
|
+
namespace XD.SDK.Common.Internal.Standalone
|
|
9
|
+
{
|
|
10
|
+
public class CancelAccountAlert : UIElement
|
|
11
|
+
{
|
|
10
12
|
public const int CANCEL_DONE_CODE = 0;
|
|
11
13
|
|
|
12
|
-
static readonly string[] ALLOWN_KEYS = new string[]
|
|
14
|
+
static readonly string[] ALLOWN_KEYS = new string[]
|
|
15
|
+
{
|
|
13
16
|
"Tab", "ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", "Escape", "Delete", "Home", "End", "Insert", "PageUp", "PageDown", "Help", "Backspace"
|
|
14
17
|
};
|
|
15
18
|
|
|
@@ -27,7 +30,8 @@ namespace XD.SDK.Common.Internal.Standalone {
|
|
|
27
30
|
|
|
28
31
|
private bool hasCancelled;
|
|
29
32
|
|
|
30
|
-
private void Awake()
|
|
33
|
+
private void Awake()
|
|
34
|
+
{
|
|
31
35
|
Input.imeCompositionMode = IMECompositionMode.On;
|
|
32
36
|
|
|
33
37
|
titleText = transform.Find("Header/Title").GetComponent<Text>();
|
|
@@ -59,7 +63,8 @@ namespace XD.SDK.Common.Internal.Standalone {
|
|
|
59
63
|
loadFailedGO.SetActive(false);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
|
-
private async void Start()
|
|
66
|
+
private async void Start()
|
|
67
|
+
{
|
|
63
68
|
await canvasWebViewPrefab.WaitUntilInitialized();
|
|
64
69
|
|
|
65
70
|
canvasWebViewPrefab.WebView.FocusedInputFieldChanged += OnFocusedInputFieldChanged;
|
|
@@ -76,26 +81,33 @@ namespace XD.SDK.Common.Internal.Standalone {
|
|
|
76
81
|
LoadCancelAccountPage();
|
|
77
82
|
}
|
|
78
83
|
|
|
79
|
-
private void Update()
|
|
80
|
-
|
|
84
|
+
private void Update()
|
|
85
|
+
{
|
|
86
|
+
if (!webInputFocused)
|
|
87
|
+
{
|
|
81
88
|
return;
|
|
82
89
|
}
|
|
83
90
|
|
|
84
91
|
Event curEvt = new Event();
|
|
85
|
-
while (Event.PopEvent(curEvt))
|
|
92
|
+
while (Event.PopEvent(curEvt))
|
|
93
|
+
{
|
|
86
94
|
char ch = curEvt.character;
|
|
87
|
-
if (ch == '\0')
|
|
95
|
+
if (ch == '\0')
|
|
96
|
+
{
|
|
88
97
|
continue;
|
|
89
98
|
}
|
|
99
|
+
|
|
90
100
|
canvasWebViewPrefab.WebView.SendKey(ch.ToString());
|
|
91
101
|
}
|
|
92
102
|
}
|
|
93
103
|
|
|
94
|
-
private void OnDestroy()
|
|
104
|
+
private void OnDestroy()
|
|
105
|
+
{
|
|
95
106
|
nativeKeyboardListener.KeyDownReceived -= OnKeyDownReceived;
|
|
96
107
|
nativeKeyboardListener.KeyUpReceived -= OnKeyUpReceived;
|
|
97
108
|
|
|
98
|
-
if (nativeKeyboardListener.gameObject)
|
|
109
|
+
if (nativeKeyboardListener.gameObject)
|
|
110
|
+
{
|
|
99
111
|
Destroy(nativeKeyboardListener?.gameObject);
|
|
100
112
|
}
|
|
101
113
|
|
|
@@ -105,54 +117,68 @@ namespace XD.SDK.Common.Internal.Standalone {
|
|
|
105
117
|
canvasWebViewPrefab.WebView.TitleChanged -= OnTitleChanged;
|
|
106
118
|
}
|
|
107
119
|
|
|
108
|
-
void OnTitleChanged(object sender, EventArgs<string> args)
|
|
120
|
+
void OnTitleChanged(object sender, EventArgs<string> args)
|
|
121
|
+
{
|
|
109
122
|
titleText.text = args.Value;
|
|
110
123
|
}
|
|
111
124
|
|
|
112
|
-
void OnUrlChanged(object sender, UrlChangedEventArgs eventArgs)
|
|
125
|
+
void OnUrlChanged(object sender, UrlChangedEventArgs eventArgs)
|
|
126
|
+
{
|
|
113
127
|
string url = eventArgs.Url;
|
|
114
128
|
Uri uri = new Uri(url);
|
|
115
129
|
string path = uri.AbsolutePath;
|
|
116
|
-
if (!string.IsNullOrEmpty(path) && path.Contains("success"))
|
|
130
|
+
if (!string.IsNullOrEmpty(path) && path.Contains("success"))
|
|
131
|
+
{
|
|
117
132
|
// 注销完成
|
|
118
|
-
XDGLogger.Debug("注销成功");
|
|
133
|
+
XDGLogger.Debug("注销成功", XDGLoggerTag.Common);
|
|
119
134
|
hasCancelled = true;
|
|
120
135
|
}
|
|
121
136
|
}
|
|
122
137
|
|
|
123
|
-
void OnPageLoadFailed(object sender, EventArgs eventArgs)
|
|
138
|
+
void OnPageLoadFailed(object sender, EventArgs eventArgs)
|
|
139
|
+
{
|
|
124
140
|
ShowError(XDLocalization.GetCurrentLocalizableString().LoadError);
|
|
125
141
|
}
|
|
126
142
|
|
|
127
|
-
void OnCloseButtonClicked()
|
|
143
|
+
void OnCloseButtonClicked()
|
|
144
|
+
{
|
|
128
145
|
UIManager.Dismiss();
|
|
129
|
-
if (hasCancelled)
|
|
146
|
+
if (hasCancelled)
|
|
147
|
+
{
|
|
130
148
|
OnCallback(CANCEL_DONE_CODE, null);
|
|
131
149
|
}
|
|
132
150
|
}
|
|
133
151
|
|
|
134
|
-
void OnRetryButtonClicked()
|
|
152
|
+
void OnRetryButtonClicked()
|
|
153
|
+
{
|
|
135
154
|
loadFailedGO.SetActive(false);
|
|
136
155
|
LoadCancelAccountPage();
|
|
137
156
|
}
|
|
138
157
|
|
|
139
|
-
void LoadCancelAccountPage()
|
|
140
|
-
|
|
158
|
+
void LoadCancelAccountPage()
|
|
159
|
+
{
|
|
160
|
+
if (Application.internetReachability == NetworkReachability.NotReachable)
|
|
161
|
+
{
|
|
141
162
|
// 没网
|
|
142
163
|
ShowError(XDLocalization.GetCurrentLocalizableString().NetError);
|
|
143
|
-
}
|
|
164
|
+
}
|
|
165
|
+
else
|
|
166
|
+
{
|
|
144
167
|
string url = Extra["url"] as string;
|
|
145
168
|
canvasWebViewPrefab.WebView.LoadUrl(url);
|
|
146
169
|
}
|
|
147
170
|
}
|
|
148
171
|
|
|
149
|
-
void ShowError(string message)
|
|
172
|
+
void ShowError(string message)
|
|
173
|
+
{
|
|
150
174
|
loadFailedTipsText.text = message;
|
|
151
175
|
loadFailedGO.SetActive(true);
|
|
152
176
|
}
|
|
153
177
|
|
|
154
|
-
void OnKeyDownReceived(object sender, KeyboardEventArgs eventArgs)
|
|
155
|
-
|
|
178
|
+
void OnKeyDownReceived(object sender, KeyboardEventArgs eventArgs)
|
|
179
|
+
{
|
|
180
|
+
if (!IsAllownKey(eventArgs))
|
|
181
|
+
{
|
|
156
182
|
return;
|
|
157
183
|
}
|
|
158
184
|
|
|
@@ -160,32 +186,42 @@ namespace XD.SDK.Common.Internal.Standalone {
|
|
|
160
186
|
webViewWithKeyDown?.KeyDown(eventArgs.Key, eventArgs.Modifiers);
|
|
161
187
|
}
|
|
162
188
|
|
|
163
|
-
void OnKeyUpReceived(object sender, KeyboardEventArgs eventArgs)
|
|
164
|
-
|
|
189
|
+
void OnKeyUpReceived(object sender, KeyboardEventArgs eventArgs)
|
|
190
|
+
{
|
|
191
|
+
if (!IsAllownKey(eventArgs))
|
|
192
|
+
{
|
|
165
193
|
return;
|
|
166
194
|
}
|
|
195
|
+
|
|
167
196
|
IWithKeyDownAndUp webViewWithKeyUp = canvasWebViewPrefab.WebView as IWithKeyDownAndUp;
|
|
168
197
|
webViewWithKeyUp?.KeyUp(eventArgs.Key, eventArgs.Modifiers);
|
|
169
198
|
}
|
|
170
199
|
|
|
171
|
-
void OnFocusedInputFieldChanged(object sender, FocusedInputFieldChangedEventArgs args)
|
|
200
|
+
void OnFocusedInputFieldChanged(object sender, FocusedInputFieldChangedEventArgs args)
|
|
201
|
+
{
|
|
172
202
|
FocusedInputFieldType focusedType = args.Type;
|
|
173
203
|
webInputFocused = focusedType == FocusedInputFieldType.Text;
|
|
174
204
|
}
|
|
175
205
|
|
|
176
|
-
static bool IsAllownKey(KeyboardEventArgs eventArgs)
|
|
206
|
+
static bool IsAllownKey(KeyboardEventArgs eventArgs)
|
|
207
|
+
{
|
|
177
208
|
string key = eventArgs.Key;
|
|
178
209
|
KeyModifier modifier = eventArgs.Modifiers;
|
|
179
|
-
if (modifier == KeyModifier.None)
|
|
180
|
-
|
|
181
|
-
|
|
210
|
+
if (modifier == KeyModifier.None)
|
|
211
|
+
{
|
|
212
|
+
foreach (string allownKey in ALLOWN_KEYS)
|
|
213
|
+
{
|
|
214
|
+
if (allownKey.Equals(key))
|
|
215
|
+
{
|
|
182
216
|
return true;
|
|
183
217
|
}
|
|
184
218
|
}
|
|
219
|
+
|
|
185
220
|
return false;
|
|
186
221
|
}
|
|
222
|
+
|
|
187
223
|
return true;
|
|
188
224
|
}
|
|
189
225
|
}
|
|
190
226
|
}
|
|
191
|
-
#endif
|
|
227
|
+
#endif
|
|
@@ -16,7 +16,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
16
16
|
private HyperlinkText _summaryText;
|
|
17
17
|
|
|
18
18
|
private HyperlinkText _promptText;
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
// private
|
|
21
21
|
private Button _disagreeButton;
|
|
22
22
|
private Button _agreeButton;
|
|
@@ -69,7 +69,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
69
69
|
allOptionGameObject.transform.SetParent(_optionGroup.transform);
|
|
70
70
|
allOptionGameObject.transform.localScale = Vector3.one;
|
|
71
71
|
_allOption = allOptionGameObject.AddComponent<AgreementOptionAll>();
|
|
72
|
-
EnableRichText(_allOption.label,LatestAgreement.AgreeAll);
|
|
72
|
+
EnableRichText(_allOption.label, LatestAgreement.AgreeAll);
|
|
73
73
|
_allOption.AddListener(() =>
|
|
74
74
|
{
|
|
75
75
|
var newState = !IsRequiredAndOptionalOptionAgreed();
|
|
@@ -80,6 +80,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
80
80
|
option.toggle.isOn = newState;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
|
|
83
84
|
if (_optionalOptions != null && _optionalOptions.Count > 0)
|
|
84
85
|
{
|
|
85
86
|
foreach (var option in _optionalOptions)
|
|
@@ -87,6 +88,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
87
88
|
option.toggle.isOn = newState;
|
|
88
89
|
}
|
|
89
90
|
}
|
|
91
|
+
|
|
90
92
|
UpdateUIState();
|
|
91
93
|
});
|
|
92
94
|
}
|
|
@@ -112,10 +114,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
112
114
|
var agreementOption = optionGameObject.AddComponent<AgreementOptionNormal>();
|
|
113
115
|
agreementOption.optionName = option.Name;
|
|
114
116
|
EnableRichText(agreementOption.label, option.Title);
|
|
115
|
-
agreementOption.AddListener((isOn) =>
|
|
116
|
-
{
|
|
117
|
-
UpdateUIState();
|
|
118
|
-
});
|
|
117
|
+
agreementOption.AddListener((isOn) => { UpdateUIState(); });
|
|
119
118
|
|
|
120
119
|
if (option.Required)
|
|
121
120
|
{
|
|
@@ -136,14 +135,15 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
136
135
|
|
|
137
136
|
_titleText.text = FirstCheck ? LatestAgreement.TitleFirst : LatestAgreement.Title;
|
|
138
137
|
var summaryText = FirstCheck ? LatestAgreement.SummaryFirst : LatestAgreement.Summary;
|
|
139
|
-
var promptText= FirstCheck ? LatestAgreement.PromptFirst : LatestAgreement.Prompt;
|
|
138
|
+
var promptText = FirstCheck ? LatestAgreement.PromptFirst : LatestAgreement.Prompt;
|
|
140
139
|
if (!string.IsNullOrEmpty(LatestAgreement.Agree))
|
|
141
140
|
{
|
|
142
|
-
_agreeButton.transform.Find("Text").GetComponent<Text>().text = LatestAgreement.Agree;
|
|
141
|
+
_agreeButton.transform.Find("Text").GetComponent<Text>().text = LatestAgreement.Agree;
|
|
143
142
|
}
|
|
143
|
+
|
|
144
144
|
if (!string.IsNullOrEmpty(LatestAgreement.Disagree))
|
|
145
145
|
{
|
|
146
|
-
_disagreeButton.transform.Find("Text").GetComponent<Text>().text = LatestAgreement.Disagree;
|
|
146
|
+
_disagreeButton.transform.Find("Text").GetComponent<Text>().text = LatestAgreement.Disagree;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
var generator = _summaryText.cachedTextGenerator;
|
|
@@ -162,24 +162,26 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
162
162
|
height = 140;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
+
|
|
165
166
|
var rectTransform = _summaryText.GetComponent<RectTransform>();
|
|
166
167
|
rectTransform.sizeDelta = new Vector2(width, height);
|
|
167
168
|
EnableRichText(_summaryText, summaryText);
|
|
168
169
|
EnableRichText(_promptText, promptText);
|
|
169
|
-
|
|
170
|
+
|
|
170
171
|
// 不知道为啥默认状态不在顶部,只能手动滚动到顶部
|
|
171
172
|
var scrollView = transform.Find("ContentGroup/SummaryGroup/SummaryBG/ScrollView").GetComponent<ScrollRect>();
|
|
172
173
|
scrollView.verticalNormalizedPosition = 1;
|
|
173
|
-
|
|
174
|
+
|
|
174
175
|
UpdateUIState();
|
|
175
176
|
}
|
|
176
|
-
|
|
177
|
+
|
|
177
178
|
private void EnableRichText(HyperlinkText textView, string content)
|
|
178
179
|
{
|
|
179
180
|
if (textView == null || string.IsNullOrEmpty(content))
|
|
180
181
|
{
|
|
181
182
|
return;
|
|
182
183
|
}
|
|
184
|
+
|
|
183
185
|
textView.text = content.Replace("<font color=", "<color=").Replace("</font>", "</color>");
|
|
184
186
|
textView.colorStartStr = "<color=#15C5CE>";
|
|
185
187
|
textView.colorEndStr = "</color>";
|
|
@@ -201,7 +203,8 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
201
203
|
private void OnDisagreeButtonClicked()
|
|
202
204
|
{
|
|
203
205
|
LocalizableString localizableString = XDLocalization.GetCurrentLocalizableString();
|
|
204
|
-
Dictionary<string, object> config = new Dictionary<string, object>
|
|
206
|
+
Dictionary<string, object> config = new Dictionary<string, object>
|
|
207
|
+
{
|
|
205
208
|
{ DisagreeConfirmAlert.CONTENT_KEY, localizableString.AgreementDisagreeConfirmContent },
|
|
206
209
|
{ DisagreeConfirmAlert.SECONDARY_TEXT_KEY, localizableString.AgreementDisagreeConfirmBack },
|
|
207
210
|
{ DisagreeConfirmAlert.PRIMARY_TEXT_KEY, localizableString.AgreementDisagreeConfirmExit }
|
|
@@ -225,7 +228,8 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
225
228
|
if (!IsRequiredOptionAgreed())
|
|
226
229
|
{
|
|
227
230
|
LocalizableString localizable = XDLocalization.GetCurrentLocalizableString();
|
|
228
|
-
Dictionary<string, object> config = new Dictionary<string, object>
|
|
231
|
+
Dictionary<string, object> config = new Dictionary<string, object>
|
|
232
|
+
{
|
|
229
233
|
{ DisagreeConfirmAlert.CONTENT_KEY, localizable.AgreementOptionNotAgreeAlertContent },
|
|
230
234
|
{ DisagreeConfirmAlert.SECONDARY_TEXT_KEY, localizable.AgreementOptionNotAgreeAlertConfirm },
|
|
231
235
|
{ DisagreeConfirmAlert.PRIMARY_TEXT_KEY, localizable.AgreementOptionNotAgreeAlertCancel }
|
|
@@ -235,7 +239,6 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
235
239
|
{
|
|
236
240
|
if (code == 0)
|
|
237
241
|
{
|
|
238
|
-
|
|
239
242
|
UIManager.Dismiss();
|
|
240
243
|
if (_requiredOptions != null && _requiredOptions.Count > 0)
|
|
241
244
|
{
|
|
@@ -244,6 +247,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
244
247
|
option.toggle.isOn = true;
|
|
245
248
|
}
|
|
246
249
|
}
|
|
250
|
+
|
|
247
251
|
if (_optionalOptions != null && _optionalOptions.Count > 0)
|
|
248
252
|
{
|
|
249
253
|
foreach (var option in _optionalOptions)
|
|
@@ -251,33 +255,35 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
251
255
|
option.toggle.isOn = true;
|
|
252
256
|
}
|
|
253
257
|
}
|
|
258
|
+
|
|
254
259
|
OnAgreeButtonClicked();
|
|
255
260
|
}
|
|
256
261
|
else if (code == 1)
|
|
257
262
|
{
|
|
258
263
|
UIManager.Dismiss();
|
|
259
264
|
}
|
|
260
|
-
});
|
|
265
|
+
});
|
|
261
266
|
return;
|
|
262
267
|
}
|
|
263
268
|
|
|
264
269
|
var objects = new Dictionary<string, object>();
|
|
265
|
-
|
|
270
|
+
|
|
266
271
|
var dayPush = false;
|
|
267
272
|
var nightPush = false;
|
|
268
|
-
|
|
273
|
+
|
|
269
274
|
ProcessOptions(_requiredOptions, objects, ref dayPush, ref nightPush);
|
|
270
275
|
ProcessOptions(_optionalOptions, objects, ref dayPush, ref nightPush);
|
|
271
|
-
|
|
276
|
+
|
|
272
277
|
OnCallback(0, objects);
|
|
273
278
|
}
|
|
274
|
-
|
|
279
|
+
|
|
275
280
|
private void ProcessOptions(List<AgreementOptionNormal> options, Dictionary<string, object> objects, ref bool dayPush, ref bool nightPush)
|
|
276
281
|
{
|
|
277
282
|
if (options == null || options.Count == 0)
|
|
278
283
|
{
|
|
279
284
|
return;
|
|
280
285
|
}
|
|
286
|
+
|
|
281
287
|
foreach (var option in options)
|
|
282
288
|
{
|
|
283
289
|
objects.Add(option.optionName, option.toggle.isOn);
|
|
@@ -344,9 +350,9 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
344
350
|
|
|
345
351
|
if (_allOption != null && _allOption.toggleButton != null && _allOption.toggleButton.image != null)
|
|
346
352
|
{
|
|
347
|
-
_allOption.toggleButton.image.sprite = sprite;
|
|
353
|
+
_allOption.toggleButton.image.sprite = sprite;
|
|
348
354
|
}
|
|
349
|
-
|
|
355
|
+
|
|
350
356
|
_agreeButton.image.sprite = IsRequiredOptionAgreed() ? _agreeButtonNormalSprite : _agreeButton.spriteState.disabledSprite;
|
|
351
357
|
_agreeButton.transition = IsRequiredAndOptionalOptionAgreed() ? Selectable.Transition.SpriteSwap : Selectable.Transition.None;
|
|
352
358
|
}
|
|
@@ -357,6 +363,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
357
363
|
if (_uploadConfigButtonClickedCount >= UploadConfigButtonClickTriggerCount)
|
|
358
364
|
{
|
|
359
365
|
UploadConfigModule.TriggerUploadConfig();
|
|
366
|
+
XDGLogger.EnableFileLog = true;
|
|
360
367
|
}
|
|
361
368
|
}
|
|
362
369
|
}
|
|
@@ -35,7 +35,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
35
35
|
UIManager.ShowLoading();
|
|
36
36
|
|
|
37
37
|
string url = extra["url"] as string;
|
|
38
|
-
XDGLogger.Debug($"XDWebViewAlert load url: {url}");
|
|
38
|
+
XDGLogger.Debug($"XDWebViewAlert load url: {url}", XDGLoggerTag.Web);
|
|
39
39
|
canvasWebViewPrefab.WebView.LoadUrl(url);
|
|
40
40
|
|
|
41
41
|
string jsCode = @";(function (window) {
|
|
@@ -63,7 +63,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
jsCode += "})(window);";
|
|
66
|
-
XDGLogger.Debug($"ExecuteJavaScript: {jsCode}");
|
|
66
|
+
XDGLogger.Debug($"ExecuteJavaScript: {jsCode}", XDGLoggerTag.Web);
|
|
67
67
|
// 注入 js
|
|
68
68
|
_ = canvasWebViewPrefab.WebView.ExecuteJavaScript(jsCode);
|
|
69
69
|
|
|
@@ -85,10 +85,10 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
85
85
|
errorText = transform.Find("WebView/LoadFailedView/ErrorText").GetComponent<Text>();
|
|
86
86
|
retryButton = transform.Find("WebView/LoadFailedView/RetryButton").GetComponent<Button>();
|
|
87
87
|
retryButtonText = transform.Find("WebView/LoadFailedView/RetryButton/Text").GetComponent<Text>();
|
|
88
|
-
|
|
88
|
+
|
|
89
89
|
var webViewGameObject = Instantiate(Resources.Load(nameof(CanvasWebViewPrefab)), transform.Find("WebView/WebViewContainer"), false) as GameObject;
|
|
90
90
|
canvasWebViewPrefab = webViewGameObject?.GetComponent<CanvasWebViewPrefab>();
|
|
91
|
-
|
|
91
|
+
|
|
92
92
|
ErrorPanelObject.SetActive(false);
|
|
93
93
|
retryButton.onClick.AddListener(Reload);
|
|
94
94
|
}
|
|
@@ -145,7 +145,6 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
145
145
|
|
|
146
146
|
canvasWebViewPrefab.WebView.MessageEmitted += (sender, eventArgs) =>
|
|
147
147
|
{
|
|
148
|
-
XDGLogger.Debug(eventArgs.Value);
|
|
149
148
|
Dictionary<string, string> response =
|
|
150
149
|
JsonConvert.DeserializeObject<Dictionary<string, string>>(eventArgs.Value);
|
|
151
150
|
Dictionary<string, object> data =
|
|
@@ -127,7 +127,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
127
127
|
}
|
|
128
128
|
catch (Exception e)
|
|
129
129
|
{
|
|
130
|
-
XDGLogger.Error("当前开启 XD_STEAM_SUPPORT,但没有 Steam 环境");
|
|
130
|
+
XDGLogger.Error("当前开启 XD_STEAM_SUPPORT,但没有 Steam 环境", XDGLoggerTag.Common);
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -157,7 +157,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
157
157
|
}
|
|
158
158
|
catch (Exception e)
|
|
159
159
|
{
|
|
160
|
-
XDGLogger.Error("当前开启 XD_STEAM_SUPPORT,但没有 Steam 环境");
|
|
160
|
+
XDGLogger.Error("当前开启 XD_STEAM_SUPPORT,但没有 Steam 环境", XDGLoggerTag.Common);
|
|
161
161
|
return null;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -83,7 +83,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
83
83
|
|
|
84
84
|
if (result != 0 || hKey == IntPtr.Zero)
|
|
85
85
|
{
|
|
86
|
-
XDGLogger.Debug($"Failed to open registry key: {keyPath}");
|
|
86
|
+
XDGLogger.Debug($"Failed to open registry key: {keyPath}", XDGLoggerTag.Common);
|
|
87
87
|
return defaultValue;
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -102,7 +102,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
102
102
|
|
|
103
103
|
if (result != 0 && result != 234) // 234 = ERROR_MORE_DATA
|
|
104
104
|
{
|
|
105
|
-
XDGLogger.Debug($"Failed to query registry value size: {valueName}");
|
|
105
|
+
XDGLogger.Debug($"Failed to query registry value size: {valueName}", XDGLoggerTag.Common);
|
|
106
106
|
return defaultValue;
|
|
107
107
|
}
|
|
108
108
|
|
|
@@ -123,7 +123,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
123
123
|
|
|
124
124
|
if (result != 0)
|
|
125
125
|
{
|
|
126
|
-
XDGLogger.Debug($"Failed to query registry value: {valueName}");
|
|
126
|
+
XDGLogger.Debug($"Failed to query registry value: {valueName}", XDGLoggerTag.Common);
|
|
127
127
|
return defaultValue;
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -140,7 +140,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
140
140
|
}
|
|
141
141
|
catch (Exception ex)
|
|
142
142
|
{
|
|
143
|
-
XDGLogger.Debug($"Error reading registry: {ex.Message}");
|
|
143
|
+
XDGLogger.Debug($"Error reading registry: {ex.Message}", XDGLoggerTag.Common);
|
|
144
144
|
return defaultValue;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -172,7 +172,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
172
172
|
}
|
|
173
173
|
catch (Exception ex)
|
|
174
174
|
{
|
|
175
|
-
XDGLogger.Debug($"Error checking registry key: {ex.Message}");
|
|
175
|
+
XDGLogger.Debug($"Error checking registry key: {ex.Message}", XDGLoggerTag.Common);
|
|
176
176
|
return false;
|
|
177
177
|
}
|
|
178
178
|
finally
|
|
@@ -189,13 +189,13 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
189
189
|
public static string ReadRegistryValue(string keyPath, string valueName, string defaultValue = "",
|
|
190
190
|
bool useHKLM = false)
|
|
191
191
|
{
|
|
192
|
-
XDGLogger.Debug("Registry functions are only available on Windows platforms");
|
|
192
|
+
XDGLogger.Debug("Registry functions are only available on Windows platforms", XDGLoggerTag.Common);
|
|
193
193
|
return defaultValue;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
public static bool KeyExists(string keyPath, bool useHKLM = false)
|
|
197
197
|
{
|
|
198
|
-
XDGLogger.Debug("Registry functions are only available on Windows platforms");
|
|
198
|
+
XDGLogger.Debug("Registry functions are only available on Windows platforms", XDGLoggerTag.Common);
|
|
199
199
|
return false;
|
|
200
200
|
}
|
|
201
201
|
#endif
|
|
@@ -16,7 +16,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
16
16
|
|
|
17
17
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
18
18
|
{
|
|
19
|
-
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
19
|
+
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
20
20
|
webView.ProviderWebTrans()?.Transparent(GetName(), data);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -16,7 +16,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
16
16
|
|
|
17
17
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
18
18
|
{
|
|
19
|
-
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
19
|
+
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
20
20
|
var bean = JsonConvert.DeserializeObject<ClipboardBean>(data);
|
|
21
21
|
switch (bean.Type.ToLower())
|
|
22
22
|
{
|
|
@@ -14,11 +14,20 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
14
14
|
|
|
15
15
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
16
16
|
{
|
|
17
|
-
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
17
|
+
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
18
18
|
var dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(data);
|
|
19
|
-
webView
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
if (webView?.ProviderWebView()?.Url != null)
|
|
20
|
+
{
|
|
21
|
+
var url = webView?.ProviderWebView()?.Url;
|
|
22
|
+
var queryParams = WebRequest.ParseQueryString(url);
|
|
23
|
+
var noUI = WebRequest.GetValueOrDefault(queryParams, "xdNoUI", "0") == "1";
|
|
24
|
+
if (!noUI)
|
|
25
|
+
{
|
|
26
|
+
UIManager.Dismiss();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
webView?.ProviderWebTrans()?.TransObserver(WebActionEnum.CLOSE, dic);
|
|
30
|
+
webView?.Release();
|
|
22
31
|
}
|
|
23
32
|
}
|
|
24
33
|
}
|
|
@@ -14,7 +14,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
14
14
|
|
|
15
15
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
16
16
|
{
|
|
17
|
-
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
17
|
+
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
18
18
|
var dic = XDGCommonInternal.GetCommonQueryParams("", 0);
|
|
19
19
|
callbackFunction(new WebBridgeResponse.Success
|
|
20
20
|
{
|
|
@@ -14,7 +14,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
14
14
|
|
|
15
15
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
16
16
|
{
|
|
17
|
-
XDGLogger.Debug("GameMessageWebFunction.Handler()");
|
|
17
|
+
XDGLogger.Debug($"GameMessageWebFunction.Handler():{data}", XDGLoggerTag.Web);
|
|
18
18
|
var dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(data);
|
|
19
19
|
webView.ProviderWebTrans()?.TransObserver(WebActionEnum.MESSAGE, dic);
|
|
20
20
|
}
|
|
@@ -14,7 +14,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
14
14
|
|
|
15
15
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
16
16
|
{
|
|
17
|
-
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
17
|
+
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
18
18
|
var param = new Dictionary<string, object>()
|
|
19
19
|
{
|
|
20
20
|
{ "orientation", 1 },
|
|
@@ -15,7 +15,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
15
15
|
|
|
16
16
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
17
17
|
{
|
|
18
|
-
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
18
|
+
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
19
19
|
var dic = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
|
|
20
20
|
if (!dic.TryGetValue("key", out var key)) return;
|
|
21
21
|
var value = DataStorage.LoadString(key);
|
|
@@ -19,7 +19,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
19
19
|
|
|
20
20
|
public async void Handler(IBridgeWebView webView, string data, Action<object> callback)
|
|
21
21
|
{
|
|
22
|
-
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
22
|
+
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
23
23
|
var webParams = JsonConvert.DeserializeObject<WebHttpRequest>(data);
|
|
24
24
|
HttpMethod method;
|
|
25
25
|
switch (webParams.RequestType)
|
|
@@ -15,7 +15,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
15
15
|
|
|
16
16
|
public async void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
17
17
|
{
|
|
18
|
-
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
18
|
+
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
19
19
|
var bean = JsonConvert.DeserializeObject<LoadingBean>(data);
|
|
20
20
|
if (bean == null)
|
|
21
21
|
{
|
|
@@ -15,7 +15,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
15
15
|
|
|
16
16
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
17
17
|
{
|
|
18
|
-
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
18
|
+
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
19
19
|
try
|
|
20
20
|
{
|
|
21
21
|
var message = JsonConvert.DeserializeObject<Dictionary<string, object>>(data);
|
|
@@ -23,14 +23,14 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
23
23
|
var text = message["text"] as string;
|
|
24
24
|
switch (logLevel)
|
|
25
25
|
{
|
|
26
|
-
case "DEBUG": XDGLogger.Debug(text); break;
|
|
27
|
-
case "WARN": XDGLogger.Warn(text); break;
|
|
28
|
-
case "ERROR": XDGLogger.Error(text); break;
|
|
26
|
+
case "DEBUG": XDGLogger.Debug(text, XDGLoggerTag.Web); break;
|
|
27
|
+
case "WARN": XDGLogger.Warn(text, XDGLoggerTag.Web); break;
|
|
28
|
+
case "ERROR": XDGLogger.Error(text, XDGLoggerTag.Web); break;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
catch (Exception e)
|
|
32
32
|
{
|
|
33
|
-
XDGLogger.Debug(JsonConvert.SerializeObject(e));
|
|
33
|
+
XDGLogger.Debug(JsonConvert.SerializeObject(e), XDGLoggerTag.Web);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|