mirror of
https://github.com/RoyalnetworkTR/simple-launcher.git
synced 2026-09-25 05:10:13 +03:00
Backend (PHP+SQLite): Discord OAuth2 + JWT, coklu hesap (1 Discord = 3-5), tek-kullanimlik join token (/api/join/prepare+verify), custom skin yukleme/sunma, hesap/Discord/HWID ban, admin paneli kartlari; deterministik offline UUID (PHP<->C# paritesi dogrulandi). 25 entegrasyon testi gecti. AthenaCore (Forge 1.12.2): tek client+server mod — join token dogrulama + kick, grace-gate, custom skin uygulama. Sunucu offline-mode kalir (UUID/dunya verisi korunur). Masaustu: WPF -> Avalonia (Windows+Linux), Discord giris/hesap/skin/oyna; WMI/DPAPI yerine cross-platform (machine-id HWID, AES-GCM secret store). Derlenir + calisir. CI: athenacore-mod.yml (JDK8), desktop-release.yml (Win+Linux self-contained). Deploy: deploy.sh (.env uretimi, php-gd, nginx Authorization gecisi) + HANDOFF.md. Android: backend hazir; entegrasyon spec'i ANDROID_INTEGRATION.md.
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
using System.Threading.Tasks;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Layout;
|
|
using Avalonia.Media;
|
|
using OfflineMinecraftLauncher.Services;
|
|
|
|
namespace OfflineMinecraftLauncher.Views;
|
|
|
|
public partial class NewsView : UserControl
|
|
{
|
|
private readonly LauncherCore _core;
|
|
private bool _loaded;
|
|
|
|
public NewsView(LauncherCore core)
|
|
{
|
|
_core = core;
|
|
InitializeComponent();
|
|
}
|
|
|
|
public async Task RefreshAsync()
|
|
{
|
|
if (_loaded) return;
|
|
_loaded = true;
|
|
var entries = await _core.FetchChangelogAsync();
|
|
List.Children.Clear();
|
|
if (entries.Count == 0)
|
|
{
|
|
Empty.Text = "Henüz sürüm notu yok.";
|
|
return;
|
|
}
|
|
Empty.IsVisible = false;
|
|
foreach (var c in entries)
|
|
{
|
|
var card = new Border { Classes = { "card" } };
|
|
var sp = new StackPanel { Spacing = 6 };
|
|
var header = new StackPanel { Orientation = Orientation.Horizontal, Spacing = 10 };
|
|
header.Children.Add(new TextBlock
|
|
{
|
|
Text = "v" + c.Version,
|
|
FontWeight = FontWeight.Bold,
|
|
Foreground = (IBrush?)this.FindResource("AccentBrush")
|
|
});
|
|
header.Children.Add(new TextBlock { Text = c.Timestamp, Classes = { "muted" } });
|
|
sp.Children.Add(header);
|
|
sp.Children.Add(new TextBlock { Text = c.Note, TextWrapping = TextWrapping.Wrap });
|
|
card.Child = sp;
|
|
List.Children.Add(card);
|
|
}
|
|
}
|
|
}
|