Skip to content

Commit

Permalink
Nextcloud登录页面添加刷新按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeric-X committed Sep 28, 2023
1 parent 8e259dc commit 3336e26
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
v2.1.0.1
- 修复:移动端无法上传图片/文件
- Nextcloud登录页面添加刷新按钮

v2.1.0
- 更改临时文件储存位置到系统appdata目录
Expand Down
2 changes: 1 addition & 1 deletion SyncClipboard.Core/Commons/Env.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public static class Env
{
public const string SoftName = "SyncClipboard";
public const string HomePage = "https://github.com/Jeric-X/SyncClipboard";
public const string VERSION = "2.1.0";
public const string VERSION = "2.1.0.1";
public static readonly string Directory = AppDomain.CurrentDomain.BaseDirectory;
public static readonly string AppDataDirectory = GetAppDataDirectory();
public static readonly string ProgramPath = Environment.ProcessPath ?? "";
Expand Down
6 changes: 6 additions & 0 deletions SyncClipboard.Core/ViewModels/NextCloudLogInViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ public async Task SetChildren(FileTreeViewModel node)
ShowFolderProgressBar = false;
}

[RelayCommand]
public async Task Refresh()
{
TreeList = WebDavModelToViewModel(await _tempWebDav!.GetFolderSubList(""));
}

private static string GetErrorMessage(Exception ex)
{
return ex switch
Expand Down
3 changes: 2 additions & 1 deletion SyncClipboard.WinUI3/Views/NextCloudLogInPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@
</TreeView>
</ScrollViewer>
</Grid>
<StackPanel Grid.Column="1" Margin="16,0,0,0" Orientation="Vertical">
<StackPanel Grid.Column="1" Margin="16,0,0,0" Orientation="Vertical" Spacing="10">
<Button Content="选择文件夹" Click="Button_Click" IsEnabled="{x:Bind ItemSeleted(_TreeView.SelectedItem), Mode=OneWay}" />
<Button Content="刷新" Command="{x:Bind _viewModel.RefreshCommand}" HorizontalAlignment="Stretch"/>
</StackPanel>
</Grid>
</Border>
Expand Down

0 comments on commit 3336e26

Please sign in to comment.