Commit 838d310a authored by Abdulrahman Mohammed's avatar Abdulrahman Mohammed

Done with Reset Password

parent be41876d
...@@ -2,30 +2,30 @@ C/C++ Structured Logq ...@@ -2,30 +2,30 @@ C/C++ Structured Logq
o o
mD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\additional_project_files.txtC mD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\additional_project_files.txtC
A A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  3 ֡3n ?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  3 ֡3n
l l
jD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\android_gradle_build.json  3 ֡3s jD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\android_gradle_build.json  3 ֡3s
q q
oD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\android_gradle_build_mini.json  3 oD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\android_gradle_build_mini.json  3
֡3` ֡3`
^ ^
\D:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\build.ninja  3 ֡3d \D:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\build.ninja  3 ֡3d
b b
`D:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\build.ninja.txt  3i `D:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\build.ninja.txt  3i
g g
eD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\build_file_index.txt  3 ֡3j eD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\build_file_index.txt  3 ֡3j
h h
fD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\compile_commands.json  3 ֡3n fD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\compile_commands.json  3 ֡3n
l l
jD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\compile_commands.json.bin  3  ֡3t jD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\compile_commands.json.bin  3  ֡3t
r r
pD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\metadata_generation_command.txt  3 pD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\metadata_generation_command.txt  3
 ֡3g  ֡3g
e e
cD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\prefab_config.json  3  ֡3l cD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\prefab_config.json  3  ֡3l
j j
hD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\symbol_folder_index.txt  3  ֡3{ hD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\arm64-v8a\symbol_folder_index.txt  3  ֡3{
y y
wD:\Work Games\ssbookminigames\My project\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\cpp\CMakeLists.txt  3  V ա3 wD:\Work Games\ssbookminigames\My project\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\cpp\CMakeLists.txt  3  V ա3
 
D:\Work Games\ssbookminigames\My project\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\cpp\FramePacing\CMakeLists.txt  3 ա3 D:\Work Games\ssbookminigames\My project\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\cpp\FramePacing\CMakeLists.txt  3 ա3
\ No newline at end of file \ No newline at end of file
......
...@@ -2,30 +2,30 @@ C/C++ Structured Logs ...@@ -2,30 +2,30 @@ C/C++ Structured Logs
q q
oD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\additional_project_files.txtC oD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\additional_project_files.txtC
A A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  3 ֡3p ?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  3 ֡3p
n n
lD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\android_gradle_build.json  3 ֡3u lD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\android_gradle_build.json  3 ֡3u
s s
qD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\android_gradle_build_mini.json  3 qD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\android_gradle_build_mini.json  3
֡3b ֡3b
` `
^D:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\build.ninja  3 ֡3f ^D:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\build.ninja  3 ֡3f
d d
bD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\build.ninja.txt  3k bD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\build.ninja.txt  3k
i i
gD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\build_file_index.txt  3 ֡3l gD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\build_file_index.txt  3 ֡3l
j j
hD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\compile_commands.json  3 ֡3p hD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\compile_commands.json  3 ֡3p
n n
lD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\compile_commands.json.bin  3  ֡3v lD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\compile_commands.json.bin  3  ֡3v
t t
rD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\metadata_generation_command.txt  3 rD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\metadata_generation_command.txt  3
 ֡3i  ֡3i
g g
eD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\prefab_config.json  3  ֡3n eD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\prefab_config.json  3  ֡3n
l l
jD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\symbol_folder_index.txt  3  ֡3{ jD:\Work Games\ssbookminigames\My project\.utmp\RelWithDebInfo\5i191b1l\armeabi-v7a\symbol_folder_index.txt  3  ֡3{
y y
wD:\Work Games\ssbookminigames\My project\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\cpp\CMakeLists.txt  3  V ա3 wD:\Work Games\ssbookminigames\My project\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\cpp\CMakeLists.txt  3  V ա3
 
D:\Work Games\ssbookminigames\My project\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\cpp\FramePacing\CMakeLists.txt  3 ա3 D:\Work Games\ssbookminigames\My project\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\cpp\FramePacing\CMakeLists.txt  3 ա3
\ No newline at end of file \ No newline at end of file
......
using UnityEngine; using UnityEngine;
using System; using System;
using UnityEngine.Events; using UnityEngine.Events;
using UnityEngine.UIElements;
public sealed class DeepLinkManager : MonoBehaviour public sealed class DeepLinkManager : MonoBehaviour
{ {
[SerializeField] UIDocument UIDocument;
public static DeepLinkManager Instance { get; private set; } public static DeepLinkManager Instance { get; private set; }
public string lastProcessedUrl; public string lastProcessedUrl;
public UnityEvent OnDeepLinkReceived; public UnityEvent OnDeepLinkReceived;
VisualElement updatePasswordPanel;
private void Awake() private void Awake()
{ {
...@@ -32,6 +35,10 @@ public sealed class DeepLinkManager : MonoBehaviour ...@@ -32,6 +35,10 @@ public sealed class DeepLinkManager : MonoBehaviour
Destroy(gameObject); Destroy(gameObject);
} }
} }
private void Start()
{
updatePasswordPanel = UIDocument.rootVisualElement.Q<VisualElement>("UpdatePasswordPanel");
}
private void OnDeepLinkActivated(string url) private void OnDeepLinkActivated(string url)
{ {
...@@ -57,7 +64,11 @@ public sealed class DeepLinkManager : MonoBehaviour ...@@ -57,7 +64,11 @@ public sealed class DeepLinkManager : MonoBehaviour
resetSessionOrError.Switch( resetSessionOrError.Switch(
resetSession => resetSession =>
{ {
updatePasswordPanel.style.display = DisplayStyle.Flex;
updatePasswordPanel.experimental.animation.Start(0, 1, 200, (v, t) =>
{
updatePasswordPanel.style.opacity = t;
});
}, },
error => error =>
{ {
......
This diff is collapsed.
...@@ -536,7 +536,11 @@ MonoBehaviour: ...@@ -536,7 +536,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 55400cde731761ca3943099c02f27902, type: 3} m_Script: {fileID: 11500000, guid: 55400cde731761ca3943099c02f27902, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::DeepLinkManager m_EditorClassIdentifier: Assembly-CSharp::DeepLinkManager
UIDocument: {fileID: 1971829438}
lastProcessedUrl: lastProcessedUrl:
OnDeepLinkReceived:
m_PersistentCalls:
m_Calls: []
--- !u!4 &1627471398 --- !u!4 &1627471398
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -41,8 +41,14 @@ public class LoginPageAnimation : MonoBehaviour ...@@ -41,8 +41,14 @@ public class LoginPageAnimation : MonoBehaviour
CheckAndHandleIfComingFromGuest(); CheckAndHandleIfComingFromGuest();
HandleShowPassword(); HandleShowPassword();
HandleForgetPasswordPanel();
HandleUpdatePasswordPanel();
} }
List<TextField> passwordField = new(); List<TextField> passwordField = new();
private void HandleShowPassword() private void HandleShowPassword()
{ {
...@@ -107,8 +113,7 @@ public class LoginPageAnimation : MonoBehaviour ...@@ -107,8 +113,7 @@ public class LoginPageAnimation : MonoBehaviour
}; };
} }
private void HandleLogin()
private async void HandleLogin()
{ {
Button loginButton = loginPage.rootVisualElement.Q<Button>("LoginButton"); Button loginButton = loginPage.rootVisualElement.Q<Button>("LoginButton");
...@@ -426,6 +431,131 @@ public class LoginPageAnimation : MonoBehaviour ...@@ -426,6 +431,131 @@ public class LoginPageAnimation : MonoBehaviour
return string.IsNullOrEmpty(content); return string.IsNullOrEmpty(content);
} }
private void HandleForgetPasswordPanel()
{
VisualElement forgetPasswordPanel = loginPage.rootVisualElement.Q<VisualElement>("ForgetPasswordPanel");
TextField forgetPasswordEmailField = forgetPasswordPanel.Q<TextField>("ForgetPasswordEmailField");
Button openForgetPasswordPanel = loginPage.rootVisualElement.Q<Button>("OpenForgetPasswordPanel");
Button closeForgetPasswordPanel = forgetPasswordPanel.Q<Button>("CloseForgetPasswordPanel");
Button sendEmail = forgetPasswordPanel.Q<Button>("SendForgetPasswordEmail");
openForgetPasswordPanel.clicked += () =>
{
forgetPasswordPanel.style.display = DisplayStyle.Flex;
forgetPasswordPanel.experimental.animation.Start(0, 1, 200, (v, t) =>
{
forgetPasswordPanel.style.opacity = t;
});
};
closeForgetPasswordPanel.clicked += () =>
{
forgetPasswordPanel.experimental.animation.Start(1, 0, 200, (v, t) =>
{
forgetPasswordPanel.style.opacity = t;
}).OnCompleted(() =>
{
forgetPasswordPanel.style.display = DisplayStyle.None;
});
};
sendEmail.clicked += async () =>
{
sendEmail.SetEnabled(false);
closeForgetPasswordPanel.SetEnabled(false);
try
{
await SupabaseAuthentication.Instance.ResetPasswordRequest(forgetPasswordEmailField.text);
ShowUIMessage.Instance.ShowMessage("تم إرسال بريد إعادة تعيين كلمة المرور، يرجى التحقق من بريدك الإلكتروني");
}
catch (Exception ex)
{
Debug.LogException(ex);
}
sendEmail.SetEnabled(true);
closeForgetPasswordPanel.SetEnabled(true);
forgetPasswordPanel.experimental.animation.Start(1, 0, 200, (v, t) =>
{
forgetPasswordPanel.style.opacity = t;
}).OnCompleted(() =>
{
forgetPasswordPanel.style.display = DisplayStyle.None;
});
};
}
private void HandleUpdatePasswordPanel()
{
VisualElement updatePasswordPanel = loginPage.rootVisualElement.Q<VisualElement>("UpdatePasswordPanel");
TextField newPasswordField = updatePasswordPanel.Q<TextField>("Password");
TextField confirmPasswordField = updatePasswordPanel.Q<TextField>("ConfirmPasswordField");
Button closeUpdatePasswordPanel = updatePasswordPanel.Q<Button>("CloseUpdatePasswordPanel");
Button updatePassword = updatePasswordPanel.Q<Button>("UpdatePassword");
updatePassword.clicked += async () =>
{
if (newPasswordField.text != confirmPasswordField.text)
{
ShowUIMessage.Instance.ShowMessage("كلمة المرور غير متطابقة");
return;
}
if (string.IsNullOrWhiteSpace(newPasswordField.text) || string.IsNullOrWhiteSpace(confirmPasswordField.text))
{
ShowUIMessage.Instance.ShowMessage("يرجى ملء جميع الحقول");
return;
}
if(newPasswordField.text.Length < 6)
{
ShowUIMessage.Instance.ShowMessage("كلمة المرور يجب أن تكون 6 أحرف على الأقل");
return;
}
updatePassword.SetEnabled(false);
try
{
await SupabaseAuthentication.Instance.UpdatePassword(newPasswordField.text);
ShowUIMessage.Instance.ShowMessage("تم تحديث كلمة المرور بنجاح، يرجى تسجيل الدخول مرة أخرى");
}
catch (Exception ex)
{
Debug.LogException(ex);
}
updatePassword.SetEnabled(true);
updatePasswordPanel.experimental.animation.Start(1, 0, 200, (v, t) =>
{
updatePasswordPanel.style.opacity = t;
}).OnCompleted(() =>
{
updatePasswordPanel.style.display = DisplayStyle.None;
});
};
closeUpdatePasswordPanel.clicked += () =>
{
updatePasswordPanel.experimental.animation.Start(1, 0, 200, (v, t) =>
{
updatePasswordPanel.style.opacity = t;
}).OnCompleted(() =>
{
updatePasswordPanel.style.display = DisplayStyle.None;
});
};
}
void HideInput(bool status) void HideInput(bool status)
{ {
VisualElement Email = loginPage.rootVisualElement.Q<ScrollView>("Register").Q<VisualElement>("Email"); VisualElement Email = loginPage.rootVisualElement.Q<ScrollView>("Register").Q<VisualElement>("Email");
......
...@@ -2,41 +2,24 @@ ...@@ -2,41 +2,24 @@
<manifest <manifest
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="فتح شارح">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sharh" android:host="reset-password" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" /> <application>
</activity> <activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<activity android:name="com.unity3d.player.UnityPlayerGameActivity" <intent-filter android:label="فتح شارح">
android:theme="@style/BaseUnityGameActivityTheme"> <action android:name="android.intent.action.VIEW" />
<intent-filter> <category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.LAUNCHER" /> <data android:scheme="sharh" android:host="reset-password" />
</intent-filter> </intent-filter>
<intent-filter android:label="فتح شارح"> <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<action android:name="android.intent.action.VIEW" /> </activity>
<category android:name="android.intent.category.DEFAULT" /> </application>
<category android:name="android.intent.category.BROWSABLE" /> </manifest>
<data android:scheme="sharh" android:host="reset-password" /> \ No newline at end of file
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="android.app.lib_name" android:value="game" />
</activity>
</application>
</manifest>
...@@ -262,7 +262,7 @@ PlayerSettings: ...@@ -262,7 +262,7 @@ PlayerSettings:
clonedFromGUID: 3c72c65a16f0acb438eed22b8b16c24a clonedFromGUID: 3c72c65a16f0acb438eed22b8b16c24a
templatePackageId: com.unity.template.urp-blank@17.0.14 templatePackageId: com.unity.template.urp-blank@17.0.14
templateDefaultScene: Assets/Scenes/SampleScene.unity templateDefaultScene: Assets/Scenes/SampleScene.unity
useCustomMainManifest: 0 useCustomMainManifest: 1
useCustomLauncherManifest: 0 useCustomLauncherManifest: 0
useCustomMainGradleTemplate: 0 useCustomMainGradleTemplate: 0
useCustomLauncherGradleManifest: 0 useCustomLauncherGradleManifest: 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment