mirror of
https://github.com/snltty/linker.git
synced 2025-10-05 01:02:44 +08:00
app
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
using linker.libs.extends;
|
namespace linker.app
|
||||||
|
|
||||||
namespace linker.app
|
|
||||||
{
|
{
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
@@ -23,18 +21,11 @@ namespace linker.app
|
|||||||
|
|
||||||
private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
|
private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
HandleException(e.Exception);
|
|
||||||
e.SetObserved();
|
e.SetObserved();
|
||||||
}
|
}
|
||||||
private void HandleException(Exception ex)
|
private void HandleException(Exception ex)
|
||||||
{
|
{
|
||||||
//System.Diagnostics.Debug.WriteLine($"全局异常: {ex}");
|
System.Diagnostics.Debug.WriteLine($"全局异常: {ex}");
|
||||||
/*
|
|
||||||
MainThread.BeginInvokeOnMainThread(async () =>
|
|
||||||
{
|
|
||||||
await Application.Current.MainPage.DisplayAlert("错误", $"{ex}", "确定");
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,14 @@
|
|||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:local="clr-namespace:linker.app"
|
xmlns:local="clr-namespace:linker.app"
|
||||||
x:Class="linker.app.MainPage" BackgroundColor="{DynamicResource PageBackgroundColor}">
|
x:Class="linker.app.MainPage" BackgroundColor="#f4f4f4">
|
||||||
|
|
||||||
|
<FlexLayout BackgroundColor="#f4f4f4" VerticalOptions="Fill" HorizontalOptions="Fill">
|
||||||
|
<WebView x:Name="webview" BackgroundColor="#f4f4f4" VerticalOptions="Fill" HorizontalOptions="Fill" FlexLayout.Grow="1"></WebView>
|
||||||
|
<AbsoluteLayout BackgroundColor="#f4f4f4" x:Name="LoadingOverlay" HorizontalOptions="Center" VerticalOptions="Center" FlexLayout.Grow="1">
|
||||||
|
<ActivityIndicator Color="#008000" IsRunning="True" HorizontalOptions="Center" VerticalOptions="Center" />
|
||||||
|
<Label Text="启动中" TextColor="#008000" HorizontalOptions="Center" VerticalOptions="Center" Margin="0,60,0,0" />
|
||||||
|
</AbsoluteLayout >
|
||||||
|
</FlexLayout>
|
||||||
|
|
||||||
<WebView x:Name="webview" BackgroundColor="#f4f4f4" VerticalOptions="Fill" HorizontalOptions="Fill"></WebView>
|
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
using linker.app.Services;
|
using linker.app.Services;
|
||||||
using Microsoft.Maui.Controls.PlatformConfiguration;
|
|
||||||
|
|
||||||
namespace linker.app
|
namespace linker.app
|
||||||
{
|
{
|
||||||
@@ -10,9 +9,17 @@ namespace linker.app
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
LoadingOverlay.IsVisible = true;
|
||||||
|
webview.IsVisible = false;
|
||||||
IPlatformApplication.Current.Services.GetService<InitializeService>().OnInitialized += () =>
|
IPlatformApplication.Current.Services.GetService<InitializeService>().OnInitialized += () =>
|
||||||
{
|
{
|
||||||
webview.Source = new Uri($"http://127.0.0.1:1804?t={DateTime.Now.Ticks}");
|
MainThread.BeginInvokeOnMainThread(() =>
|
||||||
|
{
|
||||||
|
LoadingOverlay.IsVisible = false;
|
||||||
|
webview.IsVisible = true;
|
||||||
|
webview.Source = new Uri($"http://127.0.0.1:1804?t={DateTime.Now.Ticks}");
|
||||||
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -169,12 +169,15 @@ export default {
|
|||||||
state.loading = true;
|
state.loading = true;
|
||||||
saveConfig(json).then((res)=>{
|
saveConfig(json).then((res)=>{
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
state.show = false;
|
if(res){
|
||||||
ElMessage.success(t('common.oper'));
|
state.show = false;
|
||||||
|
ElMessage.success(t('common.oper'));
|
||||||
state.saveContent = res;
|
|
||||||
state.showSave = true;
|
|
||||||
|
|
||||||
|
state.saveContent = res;
|
||||||
|
state.showSave = true;
|
||||||
|
}else{
|
||||||
|
ElMessage.error(t('common.operFail'));
|
||||||
|
}
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
ElMessage.error(t('common.operFail'));
|
ElMessage.error(t('common.operFail'));
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
v1.7.4
|
v1.7.4
|
||||||
2025-04-25 10:39:50
|
2025-04-25 16:08:46
|
||||||
1. 一些优化
|
1. 一些优化
|
||||||
2. 内置应用层SNAT,用于无法使用系统NetNat的windows系统
|
2. 内置应用层SNAT,用于无法使用系统NetNat的windows系统
|
||||||
3. 如果你设备很多,请尝试升级其中一个成功重启后再升级其它
|
3. 如果你设备很多,请尝试升级其中一个成功重启后再升级其它
|
Reference in New Issue
Block a user