mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-05-04 03:23:36 +00:00
Update for Avalonia 12
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
<ApplicationIcon>../favicon.ico</ApplicationIcon>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
|
||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -29,7 +28,6 @@
|
||||
<PackageReference Include="AsyncImageLoader.Avalonia" />
|
||||
<PackageReference Include="Avalonia" />
|
||||
<PackageReference Include="Avalonia.Desktop" />
|
||||
<PackageReference Include="Avalonia.Diagnostics" Condition="'$(Configuration)' == 'Debug'" />
|
||||
<PackageReference Include="Cogwheel" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" />
|
||||
<PackageReference Include="CSharpier.MsBuild" PrivateAssets="all" />
|
||||
|
||||
@@ -11,7 +11,7 @@ public partial class LocalizationManager
|
||||
[nameof(PullGuildsTooltip)] = "Pull available servers and channels (Enter)",
|
||||
[nameof(SettingsTooltip)] = "Settings",
|
||||
[nameof(LastMessageSentTooltip)] = "Last message sent:",
|
||||
[nameof(TokenWatermark)] = "Token",
|
||||
[nameof(TokenPlaceholderText)] = "Token",
|
||||
// Token instructions (personal account)
|
||||
[nameof(TokenPersonalHeader)] = "To get the token for your personal account:",
|
||||
[nameof(TokenPersonalTosWarning)] =
|
||||
|
||||
@@ -13,7 +13,7 @@ public partial class LocalizationManager
|
||||
[nameof(PullGuildsTooltip)] = "Charger les serveurs et canaux disponibles (Entrée)",
|
||||
[nameof(SettingsTooltip)] = "Paramètres",
|
||||
[nameof(LastMessageSentTooltip)] = "Dernier message envoyé :",
|
||||
[nameof(TokenWatermark)] = "Token",
|
||||
[nameof(TokenPlaceholderText)] = "Token",
|
||||
// Token instructions (personal account)
|
||||
[nameof(TokenPersonalHeader)] = "Obtenir le token pour votre compte personnel :",
|
||||
[nameof(TokenPersonalTosWarning)] =
|
||||
|
||||
@@ -13,7 +13,7 @@ public partial class LocalizationManager
|
||||
[nameof(PullGuildsTooltip)] = "Verfügbare Server und Kanäle laden (Enter)",
|
||||
[nameof(SettingsTooltip)] = "Einstellungen",
|
||||
[nameof(LastMessageSentTooltip)] = "Letzte Nachricht gesendet:",
|
||||
[nameof(TokenWatermark)] = "Token",
|
||||
[nameof(TokenPlaceholderText)] = "Token",
|
||||
// Token instructions (personal account)
|
||||
[nameof(TokenPersonalHeader)] = "Token für Ihr persönliches Konto abrufen:",
|
||||
[nameof(TokenPersonalTosWarning)] =
|
||||
|
||||
@@ -11,7 +11,7 @@ public partial class LocalizationManager
|
||||
[nameof(PullGuildsTooltip)] = "Cargar servidores y canales disponibles (Enter)",
|
||||
[nameof(SettingsTooltip)] = "Ajustes",
|
||||
[nameof(LastMessageSentTooltip)] = "Último mensaje enviado:",
|
||||
[nameof(TokenWatermark)] = "Token",
|
||||
[nameof(TokenPlaceholderText)] = "Token",
|
||||
// Token instructions (personal account)
|
||||
[nameof(TokenPersonalHeader)] = "Cómo obtener el token para tu cuenta personal:",
|
||||
[nameof(TokenPersonalTosWarning)] =
|
||||
|
||||
@@ -11,7 +11,7 @@ public partial class LocalizationManager
|
||||
[nameof(PullGuildsTooltip)] = "Завантажити доступні сервери та канали (Enter)",
|
||||
[nameof(SettingsTooltip)] = "Налаштування",
|
||||
[nameof(LastMessageSentTooltip)] = "Останнє повідомлення:",
|
||||
[nameof(TokenWatermark)] = "Токен",
|
||||
[nameof(TokenPlaceholderText)] = "Токен",
|
||||
// Token instructions (personal account)
|
||||
[nameof(TokenPersonalHeader)] = "Як отримати токен для персонального акаунту:",
|
||||
[nameof(TokenPersonalTosWarning)] =
|
||||
|
||||
@@ -75,7 +75,7 @@ public partial class LocalizationManager
|
||||
public string PullGuildsTooltip => Get();
|
||||
public string SettingsTooltip => Get();
|
||||
public string LastMessageSentTooltip => Get();
|
||||
public string TokenWatermark => Get();
|
||||
public string TokenPlaceholderText => Get();
|
||||
|
||||
// Token instructions (personal account)
|
||||
public string TokenPersonalHeader => Get();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.VisualTree;
|
||||
using PowerKit.Extensions;
|
||||
|
||||
namespace DiscordChatExporter.Gui.Utils.Extensions;
|
||||
|
||||
@@ -15,7 +15,7 @@ internal static class AvaloniaExtensions
|
||||
|
||||
public TopLevel? TryGetTopLevel() =>
|
||||
lifetime.TryGetMainWindow()
|
||||
?? (lifetime as ISingleViewApplicationLifetime)?.MainView?.GetVisualRoot() as TopLevel;
|
||||
?? (lifetime as ISingleViewApplicationLifetime)?.MainView?.Pipe(TopLevel.GetTopLevel);
|
||||
|
||||
public bool TryShutdown(int exitCode = 0)
|
||||
{
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
x:Name="TokenValueTextBox"
|
||||
FontSize="16"
|
||||
PasswordChar="*"
|
||||
PlaceholderText="{Binding LocalizationManager.TokenPlaceholderText}"
|
||||
RevealPassword="{Binding $self.IsFocused}"
|
||||
Text="{Binding Token}"
|
||||
Theme="{DynamicResource SoloTextBox}"
|
||||
Watermark="{Binding LocalizationManager.TokenWatermark}">
|
||||
Theme="{DynamicResource SoloTextBox}">
|
||||
<TextBox.InnerLeftContent>
|
||||
<materialIcons:MaterialIcon
|
||||
Grid.Column="0"
|
||||
@@ -304,4 +304,4 @@
|
||||
</Button>
|
||||
</Panel>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user