添加了授权

This commit is contained in:
CortexCore
2023-09-21 03:49:27 +08:00
parent c59d513cca
commit c65fe87a6c
10 changed files with 317 additions and 20 deletions

View File

@@ -0,0 +1,25 @@
using Godot;
using System;
using BITKit;
using BITKit.Auth;
using Microsoft.Extensions.DependencyInjection;
namespace IDIS.Entities.License;
public partial class IDIS_License : EntityComponent
{
[Export] private PackedScene initialScene;
[Export] private Control licenseNode;
private IAuthService _authService;
public override void OnAwake()
{
_authService = Entity.ServiceProvider.GetRequiredService<IAuthService>();
_authService.OnAuthorized += OnAuthorized;
}
private async void OnAuthorized(string obj)
{
await BITApp.SwitchToMainThread();
GetParent().AddChild(initialScene.Instantiate());
licenseNode.QueueFree();
}
}

View File

@@ -218,7 +218,6 @@ layout_mode = 2
[node name="Button5" type="Button" parent="Layout/UX TabView Service/Horizontal Layout/导航栏/MarginContainer/Layout"]
layout_mode = 2
theme_type_variation = &"SideTab"
toggle_mode = true
button_group = SubResource("ButtonGroup_qfatg")
text = "返回"
icon = ExtResource("9_78wam")