Skip to content

Commit

Permalink
update all i can update & add alert aboue dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
d3ara1n committed Aug 25, 2024
1 parent d3fa334 commit 49deca8
Show file tree
Hide file tree
Showing 23 changed files with 56 additions and 219 deletions.
18 changes: 0 additions & 18 deletions Polymerium.sln
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Others", "Others", "{BB6FF6
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polymerium.Avalonia", "src\Polymerium.Avalonia\Polymerium.Avalonia.csproj", "{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -130,22 +128,6 @@ Global
{2C39044D-3C55-4949-BDB9-2933B2EDA2DF}.Release|x64.Build.0 = Release|Any CPU
{2C39044D-3C55-4949-BDB9-2933B2EDA2DF}.Release|x86.ActiveCfg = Release|Any CPU
{2C39044D-3C55-4949-BDB9-2933B2EDA2DF}.Release|x86.Build.0 = Release|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Debug|ARM64.Build.0 = Debug|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Debug|x64.ActiveCfg = Debug|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Debug|x64.Build.0 = Debug|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Debug|x86.ActiveCfg = Debug|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Debug|x86.Build.0 = Debug|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Release|Any CPU.Build.0 = Release|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Release|ARM64.ActiveCfg = Release|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Release|ARM64.Build.0 = Release|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Release|x64.ActiveCfg = Release|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Release|x64.Build.0 = Release|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Release|x86.ActiveCfg = Release|Any CPU
{C3D6F1D3-33D8-477D-BA61-7E380D819AF0}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
7 changes: 5 additions & 2 deletions changelogs/v0.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@
- **优化**在界面中引入部分亚克力元素来提升美感
- **新增**元数据能在界面中检索并添加加载器

## ---
## v0.6.6

-- **修复**添加加载器会优先确认是否锁定
-- **优化**开始逐步使用Aurl来在文件中保存附件信息(#33)
-- **新增**添加附件列表导出到CSV文件功能
-- **新增**添加用于元数据层的克隆功能
-- **新增**导航出错将引导至错误页面而非程序奔溃
-- **优化**调整界面布局并添加美化元素
-- **移除**将任务面板删除
-- **移除**将任务面板删除
-- **新增**当系统未开启开发者模式时提供提示

## ---
2 changes: 1 addition & 1 deletion src/Polymerium.App/Controls/TagControl.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CommunityToolkit.WinUI.UI.Controls;
using CommunityToolkit.WinUI.Controls;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

Expand Down
5 changes: 3 additions & 2 deletions src/Polymerium.App/Layout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
PaneDisplayMode="Auto"
PaneTitle="Ciallo~ (∠・ω< )⌒★">
<NavigationView.Resources>
<!-- ReSharper disable once Xaml.RedundantResource -->
<Thickness x:Key="NavigationViewContentMargin">0,36,0,0</Thickness>
</NavigationView.Resources>
<NavigationView.AutoSuggestBox>
<AutoSuggestBox PlaceholderText="Instances..." QueryIcon="Find" />
Expand Down Expand Up @@ -151,8 +153,7 @@
<Setter Target="AppTitleBar.Margin" Value="96,0,0,0" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Compact">
</VisualState>
<VisualState x:Name="Compact" />
<VisualState x:Name="Top">
<VisualState.Setters>
<Setter Target="AppTitleBar.Margin" Value="16,0,0,0" />
Expand Down
33 changes: 18 additions & 15 deletions src/Polymerium.App/Polymerium.App.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
Expand All @@ -13,6 +13,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Nullable>enable</Nullable>
<RepositoryUrl>https://github.com/d3ara1n/Polymerium</RepositoryUrl>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<None Remove="Assets\Icons\Desert.svg" />
Expand All @@ -24,21 +25,23 @@

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="CommunityToolkit.WinUI" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Segmented" Version="8.0.240109" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.0.240109" />
<PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.0.240109" />
<PackageReference Include="CommunityToolkit.WinUI.Notifications" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Animations" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Behaviors" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.HeaderedControls" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.MetadataControl" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.RichSuggestBox" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.TokenizingTextBox" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Helpers" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Segmented" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Extensions" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Animations" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Media" Version="7.1.2" />
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="DotNext" Version="5.12.0" />
<PackageReference Include="FluentIcons.WinUI" Version="1.1.253" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.63" />
<PackageReference Include="DotNext" Version="5.12.1" />
<PackageReference Include="FluentIcons.WinUI" Version="1.1.255" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.64" />
<PackageReference Include="Humanizer" Version="2.14.1" />
<PackageReference Include="IBuilder" Version="0.2.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
Expand All @@ -49,7 +52,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.2.0" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240802000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
<PackageReference Include="Mime-Detective" Version="24.7.1" />
<PackageReference Include="Nanoid" Version="3.1.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
Expand Down
14 changes: 14 additions & 0 deletions src/Polymerium.App/ViewModels/HomeViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Microsoft.Win32;
using Polymerium.App.Models;
using Polymerium.App.Services;
using Polymerium.App.Views;
Expand Down Expand Up @@ -29,6 +30,7 @@ public HomeViewModel(ProfileManager profileManger, NavigationService navigationS
_taskService = taskService;
GotoInstanceViewCommand = new RelayCommand<string>(GotoInstanceView);
OpenExternalUrlCommand = new RelayCommand<string>(OpenExternalUrl);
LearnMoreCommand = new RelayCommand(LearnMore);

Recents = _profileManger.Managed
.Select(x => (
Expand All @@ -38,12 +40,20 @@ public HomeViewModel(ProfileManager profileManger, NavigationService navigationS
.OrderByDescending(x => x.Item1)
.Select(x => new RecentModel(x.Item3, x.Item2, thumbnailSaver.Get(x.Item3), GotoInstanceViewCommand))
.ToList();

IsDeveloperModeRequired =
Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppModelUnlock",
"AllowDevelopmentWithoutDevLicense", 0) is not 1;
}

public IList<RecentModel> Recents { get; }
public ICommand OpenExternalUrlCommand { get; }
public ICommand GotoInstanceViewCommand { get; }

public ICommand LearnMoreCommand { get; }

public bool IsDeveloperModeRequired { get; }

private void GotoInstanceView(string? key)
{
if (key != null)
Expand All @@ -56,4 +66,8 @@ private void OpenExternalUrl(string? url)
{
if (!string.IsNullOrEmpty(url)) UriFileHelper.OpenInExternal(url);
}

private void LearnMore() =>
UriFileHelper.OpenInExternal(
"https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development");
}
9 changes: 9 additions & 0 deletions src/Polymerium.App/Views/HomeView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
mc:Ignorable="d">
<ScrollViewer>
<StackPanel Margin="{StaticResource PageContentMargin}" Spacing="{StaticResource SmallGap}">
<InfoBar
Title=" Windows Feature Required"
IsOpen="{x:Bind ViewModel.IsDeveloperModeRequired}"
Message="You haven't enabled Windows 10/11 Developer Mode, which will cause instance deploying failure."
Severity="Error">
<InfoBar.ActionButton>
<HyperlinkButton Command="{x:Bind ViewModel.LearnMoreCommand}" Content="Learn more" />
</InfoBar.ActionButton>
</InfoBar>
<TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="Quick start" />
<Grid>
<Grid.ColumnDefinitions>
Expand Down
2 changes: 1 addition & 1 deletion src/Polymerium.App/Views/ToolboxView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:controls="using:Polymerium.App.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:media="using:CommunityToolkit.WinUI.UI.Media"
xmlns:media="using:CommunityToolkit.WinUI.Media"
xmlns:toolkit="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d">

Expand Down
2 changes: 1 addition & 1 deletion src/Polymerium.App/Views/WorkbenchView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:lab="using:CommunityToolkit.WinUI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:media="using:CommunityToolkit.WinUI.UI.Media"
xmlns:media="using:CommunityToolkit.WinUI.Media"
xmlns:models="using:Polymerium.App.Models"
xmlns:toolkit="using:CommunityToolkit.WinUI.UI.Controls"
mc:Ignorable="d">
Expand Down
15 changes: 0 additions & 15 deletions src/Polymerium.Avalonia/App.axaml

This file was deleted.

22 changes: 0 additions & 22 deletions src/Polymerium.Avalonia/App.axaml.cs

This file was deleted.

Binary file removed src/Polymerium.Avalonia/Assets/avalonia-logo.ico
Binary file not shown.
25 changes: 0 additions & 25 deletions src/Polymerium.Avalonia/Polymerium.Avalonia.csproj

This file was deleted.

23 changes: 0 additions & 23 deletions src/Polymerium.Avalonia/Program.cs

This file was deleted.

29 changes: 0 additions & 29 deletions src/Polymerium.Avalonia/ViewLocator.cs

This file was deleted.

8 changes: 0 additions & 8 deletions src/Polymerium.Avalonia/ViewModels/MainWindowViewModel.cs

This file was deleted.

7 changes: 0 additions & 7 deletions src/Polymerium.Avalonia/ViewModels/ViewModelBase.cs

This file was deleted.

20 changes: 0 additions & 20 deletions src/Polymerium.Avalonia/Views/MainWindow.axaml

This file was deleted.

8 changes: 0 additions & 8 deletions src/Polymerium.Avalonia/Views/MainWindow.axaml.cs

This file was deleted.

Loading

0 comments on commit 49deca8

Please sign in to comment.