Add apple UUTYPEs

This commit is contained in:
Michael Bucari-Tovo 2023-02-18 00:29:08 -07:00
parent 59d556733e
commit 14b63c0883
6 changed files with 50 additions and 13 deletions

View File

@ -2,7 +2,7 @@
"WindowsClassic": "Libation\\.\\d+\\.\\d+\\.\\d+-win(dows)?-classic\\.zip", "WindowsClassic": "Libation\\.\\d+\\.\\d+\\.\\d+-win(dows)?-classic\\.zip",
"WindowsAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-win(dows)?-chardonnay\\.zip", "WindowsAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-win(dows)?-chardonnay\\.zip",
"LinuxAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-linux-amd64\\.deb", "LinuxAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-linux-amd64\\.deb",
"MacOSAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-macOS-x86_64\\.tgz" "MacOSAvalonia": "Libation\\.\\d+\\.\\d+\\.\\d+-macOS-x64\\.tgz"
"LinuxAvalonia_Arm64": "Libation\\.\\d+\\.\\d+\\.\\d+-linux-arm64\\.deb", "LinuxAvalonia_Arm64": "Libation\\.\\d+\\.\\d+\\.\\d+-linux-arm64\\.deb",
"MacOSAvalonia_Arm64": "Libation\\.\\d+\\.\\d+\\.\\d+-macOS-arm64\\.tgz" "MacOSAvalonia_Arm64": "Libation\\.\\d+\\.\\d+\\.\\d+-macOS-arm64\\.tgz"
} }

View File

@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<Version>9.3.1.1</Version> <Version>9.3.2.1</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Octokit" Version="5.0.0" /> <PackageReference Include="Octokit" Version="5.0.0" />

View File

@ -120,7 +120,11 @@ namespace LibationAvalonia.Dialogs
SuggestedStartLocation = new BclStorageFolder(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)), SuggestedStartLocation = new BclStorageFolder(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)),
FileTypeFilter = new FilePickerFileType[] FileTypeFilter = new FilePickerFileType[]
{ {
new("JSON files (*.json)") { Patterns = new[] { "*.json" } }, new("JSON files (*.json)")
{
Patterns = new[] { "*.json" },
AppleUniformTypeIdentifiers = new[] { "public.json" }
}
} }
}; };
@ -280,7 +284,11 @@ namespace LibationAvalonia.Dialogs
ShowOverwritePrompt = true, ShowOverwritePrompt = true,
FileTypeChoices = new FilePickerFileType[] FileTypeChoices = new FilePickerFileType[]
{ {
new("JSON files (*.json)") { Patterns = new[] { "*.json" } }, new("JSON files (*.json)")
{
Patterns = new[] { "*.json" },
AppleUniformTypeIdentifiers = new[] { "public.json" }
}
} }
}; };

View File

@ -153,10 +153,22 @@ namespace LibationAvalonia.Dialogs
ShowOverwritePrompt = true, ShowOverwritePrompt = true,
FileTypeChoices = new FilePickerFileType[] FileTypeChoices = new FilePickerFileType[]
{ {
new("Excel Workbook (*.xlsx)") { Patterns = new[] { "*.xlsx" } }, new("Excel Workbook (*.xlsx)")
new("CSV files (*.csv)") { Patterns = new[] { "*.csv" } }, {
new("JSON files (*.json)") { Patterns = new[] { "*.json" } }, Patterns = new[] { "*.xlsx" },
new("All files (*.*)") { Patterns = new[] { "*" } } AppleUniformTypeIdentifiers = new[] { "org.openxmlformats.spreadsheetml.sheet" }
},
new("CSV files (*.csv)")
{
Patterns = new[] { "*.csv" },
AppleUniformTypeIdentifiers = new[] { "public.comma-separated-values-text" }
},
new("JSON files (*.json)")
{
Patterns = new[] { "*.json" },
AppleUniformTypeIdentifiers = new[] { "public.json" }
},
new("All files (*.*)") { Patterns = new[] { "*" } },
} }
}); });

View File

@ -56,7 +56,11 @@ namespace LibationAvalonia.Dialogs
ShowOverwritePrompt = true, ShowOverwritePrompt = true,
FileTypeChoices = new FilePickerFileType[] FileTypeChoices = new FilePickerFileType[]
{ {
new("Jpeg (*.jpg)") { Patterns = new[] { "jpg" } } new("Jpeg (*.jpg)")
{
Patterns = new[] { "jpg" },
AppleUniformTypeIdentifiers = new[] { "public.jpeg" }
}
} }
}; };

View File

@ -26,10 +26,23 @@ namespace LibationAvalonia.Views
ShowOverwritePrompt = true, ShowOverwritePrompt = true,
FileTypeChoices = new FilePickerFileType[] FileTypeChoices = new FilePickerFileType[]
{ {
new("Excel Workbook (*.xlsx)") { Patterns = new[] { "*.xlsx" } }, new("Excel Workbook (*.xlsx)")
new("CSV files (*.csv)") { Patterns = new[] { "*.csv" } }, {
new("JSON files (*.json)") { Patterns = new[] { "*.json" } }, Patterns = new[] { "*.xlsx" },
new("All files (*.*)") { Patterns = new[] { "*" } }, //https://gist.github.com/RhetTbull/7221ef3cfd9d746f34b2550d4419a8c2
AppleUniformTypeIdentifiers = new[] { "org.openxmlformats.spreadsheetml.sheet" }
},
new("CSV files (*.csv)")
{
Patterns = new[] { "*.csv" },
AppleUniformTypeIdentifiers = new[] { "public.comma-separated-values-text" }
},
new("JSON files (*.json)")
{
Patterns = new[] { "*.json" },
AppleUniformTypeIdentifiers = new[] { "public.json" }
},
new("All files (*.*)") { Patterns = new[] { "*" } }
} }
}; };