Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
LazuliKao committed Jun 25, 2023
1 parent cbc963d commit 80b0845
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/LipUI/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,10 @@ await DispatcherInvokeAsync(async () =>
void Hide()
{
successAndHide = true;
DispatcherInvoke(() =>
{
dialog.Hide();
});
}
RoutedEventHandler onDialogOnButtonLeftClick = (_, e) => Hide();
RoutedEventHandler onDialogOnButtonRightClick = (_, e) => Hide();
Expand Down
5 changes: 5 additions & 0 deletions src/LipUI/ViewModels/InstallPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ public async Task Install()
//去除匹配并去除"[==> ] "
Percentage = Regex.Replace(str, @"\[(=|>|\s)+?\]", "");
}
// 79% |███████████████████████████████ | (101/126 kB, 151 kB/s) [0s:0s]
else if (Regex.Match(x, @"(\d+%)") is { Success: true })
{
Percentage = Regex.Replace(x, @"\|(█|\s)+\|", "").Trim();
}
else if (x.Trim().EndsWith("|"))
Percentage = x.Replace("|", "").Trim();
else
Expand Down
3 changes: 1 addition & 2 deletions src/LipUI/ViewModels/ToothInfoPanelViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ public ToothInfoPanelViewModel(LipPackageVersions info, LipRegistry.LipRegistryI
}
public ToothInfoPanelViewModel(LipPackageVersions ver)
{
_ver = ver;
if (Versions?.FirstOrDefault() is not null and var v)
{
SelectedVersion = v;
}

_ver = ver;
}
[ObservableProperty] string _author = string.Empty;
[ObservableProperty] string _description = string.Empty;
Expand Down

0 comments on commit 80b0845

Please sign in to comment.