diff --git a/src/Artemis.UI.Avalonia/App.axaml b/src/Artemis.UI.Avalonia/App.axaml index 816b5fd50..bce72106b 100644 --- a/src/Artemis.UI.Avalonia/App.axaml +++ b/src/Artemis.UI.Avalonia/App.axaml @@ -20,6 +20,7 @@ + \ No newline at end of file diff --git a/src/Artemis.UI.Avalonia/Artemis.UI.Avalonia.csproj b/src/Artemis.UI.Avalonia/Artemis.UI.Avalonia.csproj index 34818821e..71dc1529f 100644 --- a/src/Artemis.UI.Avalonia/Artemis.UI.Avalonia.csproj +++ b/src/Artemis.UI.Avalonia/Artemis.UI.Avalonia.csproj @@ -19,6 +19,7 @@ + diff --git a/src/Artemis.UI.Avalonia/MainWindow.axaml b/src/Artemis.UI.Avalonia/MainWindow.axaml index 484b6a22b..e24aa179c 100644 --- a/src/Artemis.UI.Avalonia/MainWindow.axaml +++ b/src/Artemis.UI.Avalonia/MainWindow.axaml @@ -4,7 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="Artemis.UI.Avalonia.MainWindow" - Icon="/Assets/avalonia-logo.ico" + Icon="/Assets/Images/Logo/bow.ico" Title="Artemis.UI.Avalonia" ExtendClientAreaToDecorationsHint="True" TransparencyLevelHint="AcrylicBlur" diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/AboutTabViewModel.cs b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/AboutTabViewModel.cs new file mode 100644 index 000000000..67c817382 --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/AboutTabViewModel.cs @@ -0,0 +1,74 @@ +using System; +using System.Reflection; +using System.Threading.Tasks; +using Artemis.Core; +using Avalonia.Media.Imaging; +using Flurl.Http; +using ReactiveUI; + +namespace Artemis.UI.Avalonia.Screens.Settings.ViewModels +{ + public class AboutTabViewModel : ActivatableViewModelBase + { + private Bitmap? _darthAffeProfileImage; + private Bitmap? _drMeteorProfileImage; + private Bitmap? _kaiProfileImage; + private Bitmap? _robertProfileImage; + private string? _version; + + public AboutTabViewModel() + { + DisplayName = "About"; + this.WhenActivated((Action _) => Task.Run(Activate)); + } + + public string? Version + { + get => _version; + set => this.RaiseAndSetIfChanged(ref _version, value); + } + + public Bitmap? RobertProfileImage + { + get => _robertProfileImage; + set => this.RaiseAndSetIfChanged(ref _robertProfileImage, value); + } + + public Bitmap? DarthAffeProfileImage + { + get => _darthAffeProfileImage; + set => this.RaiseAndSetIfChanged(ref _darthAffeProfileImage, value); + } + + public Bitmap? DrMeteorProfileImage + { + get => _drMeteorProfileImage; + set => this.RaiseAndSetIfChanged(ref _drMeteorProfileImage, value); + } + + public Bitmap? KaiProfileImage + { + get => _kaiProfileImage; + set => this.RaiseAndSetIfChanged(ref _kaiProfileImage, value); + } + + private async Task Activate() + { + AssemblyInformationalVersionAttribute? versionAttribute = typeof(AboutTabViewModel).Assembly.GetCustomAttribute(); + Version = $"Version {versionAttribute?.InformationalVersion} build {Constants.BuildInfo.BuildNumberDisplay}"; + + try + { + RobertProfileImage = new Bitmap(await "https://avatars.githubusercontent.com/u/8858506".GetStreamAsync()); + RobertProfileImage = new Bitmap(await "https://avatars.githubusercontent.com/u/8858506".GetStreamAsync()); + DarthAffeProfileImage = new Bitmap(await "https://avatars.githubusercontent.com/u/1094841".GetStreamAsync()); + DrMeteorProfileImage = new Bitmap(await "https://avatars.githubusercontent.com/u/29486064".GetStreamAsync()); + KaiProfileImage = new Bitmap(await "https://i.imgur.com/8mPWY1j.png".GetStreamAsync()); + } + catch (Exception) + { + // ignored, unluckyyyy + } + } + } +} \ No newline at end of file diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/DevicesTabViewModel.cs b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/DevicesTabViewModel.cs new file mode 100644 index 000000000..b975103bc --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/DevicesTabViewModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Artemis.UI.Avalonia.Screens.Settings.ViewModels +{ + public class DevicesTabViewModel : ActivatableViewModelBase + { + public DevicesTabViewModel() + { + DisplayName = "Devices"; + } + } +} diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/GeneralTabViewModel.cs b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/GeneralTabViewModel.cs new file mode 100644 index 000000000..340935a80 --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/GeneralTabViewModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Artemis.UI.Avalonia.Screens.Settings.ViewModels +{ + public class GeneralTabViewModel : ActivatableViewModelBase + { + public GeneralTabViewModel() + { + DisplayName = "General"; + } + } +} diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/PluginsTabViewModel.cs b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/PluginsTabViewModel.cs new file mode 100644 index 000000000..3caf01598 --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/PluginsTabViewModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Artemis.UI.Avalonia.Screens.Settings.ViewModels +{ + public class PluginsTabViewModel : ActivatableViewModelBase + { + public PluginsTabViewModel() + { + DisplayName = "Plugins"; + } + } +} diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/SettingsViewModel.cs b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/SettingsViewModel.cs new file mode 100644 index 000000000..68fc97f3f --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/SettingsViewModel.cs @@ -0,0 +1,25 @@ +using System.Collections.ObjectModel; +using ReactiveUI; + +namespace Artemis.UI.Avalonia.Screens.Settings.ViewModels +{ + public class SettingsViewModel : MainScreenViewModel + { + public SettingsViewModel(IScreen hostScreen, + GeneralTabViewModel generalTabViewModel, + PluginsTabViewModel pluginsTabViewModel, + DevicesTabViewModel devicesTabViewModel, + AboutTabViewModel aboutTabViewModel) : base(hostScreen, "settings") + { + SettingTabs = new ObservableCollection + { + generalTabViewModel, + pluginsTabViewModel, + devicesTabViewModel, + aboutTabViewModel + }; + } + + public ObservableCollection SettingTabs { get; } + } +} \ No newline at end of file diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/SurfaceEditorViewModel.cs b/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/SurfaceEditorViewModel.cs deleted file mode 100644 index 7b9ff1400..000000000 --- a/src/Artemis.UI.Avalonia/Screens/Settings/ViewModels/SurfaceEditorViewModel.cs +++ /dev/null @@ -1,12 +0,0 @@ -using ReactiveUI; - -namespace Artemis.UI.Avalonia.Screens.Settings.ViewModels -{ - public class SettingsViewModel : MainScreenViewModel - { - public SettingsViewModel(IScreen hostScreen) : base(hostScreen, "settings") - { - DisplayName = "Settings"; - } - } -} \ No newline at end of file diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/Views/AboutTabView.axaml b/src/Artemis.UI.Avalonia/Screens/Settings/Views/AboutTabView.axaml new file mode 100644 index 000000000..e618183ba --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/Views/AboutTabView.axaml @@ -0,0 +1,270 @@ + + + + + + + + + + + Artemis 2 + + + + + + + + + + + + + + + + + + PolyForm Noncommercial License 1.0.0 + + + + + + + + + + + + + Robert Beekman + + + Project owner, main contributor + + + + + + + + + + + + + + + + + + + + + + + + + + + Darth Affe + + + RGB.NET, main contributor + + + + + + + + + + + + + + + + + + Diogo 'DrMeteor' Trindade + + + Main contributor + + + + + + + + + + + + + + + + + + Kai Werling + + + Graphics design + + + + + + + + + + + + + + + + Special Thanks + + + + + - The various people creating PRs to Artemis.Plugins and the main repository + + + - All the people on Discord providing feedback and testing + + + + + + + + + + + External Libraries + + + + + + + + + Avalonia + FluentAvalonia + EmbedIO + Furl.Http + Humanizer + LiteDB + McMaster.NETCore.Plugins + Newtonsoft.Json + Ninject + RGB.NET + Serilog + SkiaSharp + Unclassified.NetRevisionTask + + + + https://avaloniaui.net/ + + + https://github.com/amwx/FluentAvalonia + + + https://unosquare.github.io/embedio/ + + + https://flurl.dev/ + + + https://github.com/Humanizr/Humanizer + + + https://www.litedb.org/ + + + https://github.com/natemcmaster/DotNetCorePlugins + + + https://www.newtonsoft.com/json + + + http://www.ninject.org/ + + + https://github.com/DarthAffe/RGB.NET + + + https://serilog.net/ + + + https://github.com/mono/SkiaSharp + + + https://unclassified.software/en/apps/netrevisiontask + + + + + + + + + + + \ No newline at end of file diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/Views/AboutTabView.axaml.cs b/src/Artemis.UI.Avalonia/Screens/Settings/Views/AboutTabView.axaml.cs new file mode 100644 index 000000000..89fa25025 --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/Views/AboutTabView.axaml.cs @@ -0,0 +1,21 @@ +using Artemis.UI.Avalonia.Screens.Settings.ViewModels; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; +using Avalonia.ReactiveUI; + +namespace Artemis.UI.Avalonia.Screens.Settings.Views +{ + public partial class AboutTabView : ReactiveUserControl + { + public AboutTabView() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +} diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/Views/DevicesTabView.axaml b/src/Artemis.UI.Avalonia/Screens/Settings/Views/DevicesTabView.axaml new file mode 100644 index 000000000..42e20b0cd --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/Views/DevicesTabView.axaml @@ -0,0 +1,8 @@ + + Welcome to Avalonia! + diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/Views/DevicesTabView.axaml.cs b/src/Artemis.UI.Avalonia/Screens/Settings/Views/DevicesTabView.axaml.cs new file mode 100644 index 000000000..66c566a98 --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/Views/DevicesTabView.axaml.cs @@ -0,0 +1,19 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Artemis.UI.Avalonia.Screens.Settings.Views +{ + public partial class DevicesTabView : UserControl + { + public DevicesTabView() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +} diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/Views/GeneralTabView.axaml b/src/Artemis.UI.Avalonia/Screens/Settings/Views/GeneralTabView.axaml new file mode 100644 index 000000000..1aef81e68 --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/Views/GeneralTabView.axaml @@ -0,0 +1,8 @@ + + Welcome to Avalonia! + diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/Views/GeneralTabView.axaml.cs b/src/Artemis.UI.Avalonia/Screens/Settings/Views/GeneralTabView.axaml.cs new file mode 100644 index 000000000..ed21a7720 --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/Views/GeneralTabView.axaml.cs @@ -0,0 +1,19 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Artemis.UI.Avalonia.Screens.Settings.Views +{ + public partial class GeneralTabView : UserControl + { + public GeneralTabView() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +} diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/Views/PluginsTabView.axaml b/src/Artemis.UI.Avalonia/Screens/Settings/Views/PluginsTabView.axaml new file mode 100644 index 000000000..31dce537c --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/Views/PluginsTabView.axaml @@ -0,0 +1,8 @@ + + Welcome to Avalonia! + diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/Views/PluginsTabView.axaml.cs b/src/Artemis.UI.Avalonia/Screens/Settings/Views/PluginsTabView.axaml.cs new file mode 100644 index 000000000..93874fbf9 --- /dev/null +++ b/src/Artemis.UI.Avalonia/Screens/Settings/Views/PluginsTabView.axaml.cs @@ -0,0 +1,19 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Artemis.UI.Avalonia.Screens.Settings.Views +{ + public partial class PluginsTabView : UserControl + { + public PluginsTabView() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +} diff --git a/src/Artemis.UI.Avalonia/Screens/Settings/Views/SettingsView.axaml b/src/Artemis.UI.Avalonia/Screens/Settings/Views/SettingsView.axaml index 235c04348..e085cdb82 100644 --- a/src/Artemis.UI.Avalonia/Screens/Settings/Views/SettingsView.axaml +++ b/src/Artemis.UI.Avalonia/Screens/Settings/Views/SettingsView.axaml @@ -4,5 +4,16 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="Artemis.UI.Avalonia.Screens.Settings.Views.SettingsView"> - Settings! :D + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Artemis.UI.Avalonia/Styles/Border.axaml b/src/Artemis.UI.Avalonia/Styles/Border.axaml index 99084de91..b48918dd5 100644 --- a/src/Artemis.UI.Avalonia/Styles/Border.axaml +++ b/src/Artemis.UI.Avalonia/Styles/Border.axaml @@ -1,24 +1,38 @@  - - + + I'm in a panel yo! - + + + I'm in a panel yo! + + I'm in a panel yo! + + + - + + + \ No newline at end of file diff --git a/src/Artemis.UI.Avalonia/Styles/Button.axaml b/src/Artemis.UI.Avalonia/Styles/Button.axaml index 42ec1a5ea..e1856b64e 100644 --- a/src/Artemis.UI.Avalonia/Styles/Button.axaml +++ b/src/Artemis.UI.Avalonia/Styles/Button.axaml @@ -4,7 +4,7 @@ xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"> - + Button.icon-button