Skip to content

Commit a5b677d

Browse files
committed
more changes
1 parent 5e0b8fb commit a5b677d

9 files changed

Lines changed: 377 additions & 141 deletions

File tree

src/BasisPM.App/Localization/Languages/en.json

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,10 @@
382382
"key": "installs.button.open",
383383
"value": "Open"
384384
},
385+
{
386+
"key": "installs.button.openFolder",
387+
"value": "Open folder"
388+
},
385389
{
386390
"key": "installs.button.packages",
387391
"value": "Packages"
@@ -718,6 +722,14 @@
718722
"key": "packages.detail.website",
719723
"value": "Open website"
720724
},
725+
{
726+
"key": "packages.dialog.discardEditsTitle",
727+
"value": "Discard local edits?"
728+
},
729+
{
730+
"key": "packages.dialog.discardEditsBody",
731+
"value": "{0} has uncommitted edits in its mounted clone. Continuing replaces the clone and discards them. Submit a PR first if you want to keep them. Continue?"
732+
},
721733
{
722734
"key": "packages.dialog.installTitle",
723735
"value": "Install {0}"
@@ -902,6 +914,10 @@
902914
"key": "packages.status.installed",
903915
"value": "Installed {0} into {1}."
904916
},
917+
{
918+
"key": "packages.status.installedCloned",
919+
"value": "Installed {0} into {1} — cloned into Packages/ so you can edit it."
920+
},
905921
{
906922
"key": "packages.status.installedVersion",
907923
"value": "Installed {0} ({1}) into {2}."
@@ -1178,10 +1194,6 @@
11781194
"key": "develop.button.installGit",
11791195
"value": "Install Git"
11801196
},
1181-
{
1182-
"key": "develop.button.mountAll",
1183-
"value": "Mount all"
1184-
},
11851197
{
11861198
"key": "develop.owner.label",
11871199
"value": "Owner"
@@ -1342,18 +1354,6 @@
13421354
"key": "develop.status.mounted",
13431355
"value": "Mounted {0} into Packages/ — edit it in Unity, then Submit PR."
13441356
},
1345-
{
1346-
"key": "develop.status.mountedAllCount",
1347-
"value": "Mounted {0} package(s)."
1348-
},
1349-
{
1350-
"key": "develop.status.mountedAllSkipped",
1351-
"value": "Skipped {0}: {1}."
1352-
},
1353-
{
1354-
"key": "develop.status.mountedAllFailed",
1355-
"value": "Failed {0}: {1}."
1356-
},
13571357
{
13581358
"key": "develop.status.mounting",
13591359
"value": "Mounting {0}…"
@@ -2177,6 +2177,42 @@
21772177
{
21782178
"key": "community.support.fundingPage",
21792179
"value": "Read the full funding page"
2180+
},
2181+
{
2182+
"key": "packages.button.installPackageList",
2183+
"value": "Install a package list from the registry"
2184+
},
2185+
{
2186+
"key": "packages.status.loadingPackageLists",
2187+
"value": "Loading package lists…"
2188+
},
2189+
{
2190+
"key": "packages.status.noPackageLists",
2191+
"value": "Couldn't load any package lists from the registry."
2192+
},
2193+
{
2194+
"key": "dialog.packageListPicker.title",
2195+
"value": "Install a package list"
2196+
},
2197+
{
2198+
"key": "dialog.packageListPicker.heading",
2199+
"value": "Install which package list?"
2200+
},
2201+
{
2202+
"key": "dialog.packageListPicker.subtitle",
2203+
"value": "A package list adds a curated set of packages to your project in one go."
2204+
},
2205+
{
2206+
"key": "dialog.packageListPicker.packageCount",
2207+
"value": "{0} packages"
2208+
},
2209+
{
2210+
"key": "packages.filter.source",
2211+
"value": "Filter by source"
2212+
},
2213+
{
2214+
"key": "packages.filter.category",
2215+
"value": "Filter by category"
21802216
}
21812217
]
21822218
}

src/BasisPM.App/Services/Dialogs.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ public static class Dialogs
3636
return await new InstallPickerWindow(title, installs).ShowDialog<BasisInstall?>(owner);
3737
}
3838

39+
/// <summary>Shows the registry package-list picker; returns the chosen list, or null if cancelled.</summary>
40+
public static async Task<PackageList?> PickPackageListAsync(IReadOnlyList<PackageList> lists)
41+
{
42+
var owner = Owner;
43+
if (owner is null) return null;
44+
return await new PackageListPickerWindow(lists).ShowDialog<PackageList?>(owner);
45+
}
46+
3947
/// <summary>A yes/no prompt; returns true only if the user chose Yes.</summary>
4048
public static async Task<bool> ConfirmAsync(string title, string message)
4149
{

src/BasisPM.App/ViewModels/InstallsViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public sealed class InstallsViewModel : ObservableObject
2727
public RelayCommand<InstallRow> ChangeBranchCommand { get; }
2828
public RelayCommand<InstallRow> CheckUpdatesCommand { get; }
2929
public RelayCommand<InstallRow> OpenInUnityCommand { get; }
30+
public RelayCommand<InstallRow> OpenFolderCommand { get; }
3031
public RelayCommand<InstallRow> SetUpCommand { get; }
3132
public RelayCommand<InstallRow> ManagePackagesCommand { get; }
3233
public RelayCommand<InstallRow> RemoveCommand { get; }
@@ -46,6 +47,7 @@ public InstallsViewModel(UserSettingsService settingsService, BasisInstallServic
4647
ChangeBranchCommand = new RelayCommand<InstallRow>(ChangeBranchAsync);
4748
CheckUpdatesCommand = new RelayCommand<InstallRow>(r => RefreshGitInfoAsync(r, fetch: true));
4849
OpenInUnityCommand = new RelayCommand<InstallRow>(OpenInUnity);
50+
OpenFolderCommand = new RelayCommand<InstallRow>(r => { if (r is not null) BasisPM.App.Services.ExternalLink.OpenFolder(r.RepoRoot); });
4951
SetUpCommand = new RelayCommand<InstallRow>(SetUpAsync);
5052
ManagePackagesCommand = new RelayCommand<InstallRow>(r => Activate(r, "packages"));
5153
RemoveCommand = new RelayCommand<InstallRow>(RemoveAsync);

0 commit comments

Comments
 (0)