-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathBrowserPage.xaml
More file actions
112 lines (105 loc) · 5.41 KB
/
Copy pathBrowserPage.xaml
File metadata and controls
112 lines (105 loc) · 5.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<ContentPage
x:Class="SecureFolderFS.Maui.Views.Vault.BrowserPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:l="using:SecureFolderFS.Maui.Localization"
xmlns:local="clr-namespace:SecureFolderFS.Maui.Views.Vault"
xmlns:uc="clr-namespace:SecureFolderFS.Maui.UserControls"
xmlns:uc2="clr-namespace:SecureFolderFS.Maui.UserControls.Browser"
xmlns:vc="clr-namespace:SecureFolderFS.Maui.ValueConverters"
x:Name="ThisPage"
Title="{OnPlatform iOS={Binding ViewModel.Title,
Mode=OneWay}}"
x:DataType="local:BrowserPage"
Background="{StaticResource ThemeBackgroundFillPrimaryColorBrush}">
<ContentPage.Resources>
<vc:TransferTypeToOperationStringConverter x:Key="TransferTypeToOperationStringConverter" />
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem
Command="{Binding ViewModel.ToggleSelectionCommand}"
Order="Secondary"
Text="{Binding ViewModel.IsSelecting, Mode=OneWay, Converter={StaticResource BoolToStringConverter}, ConverterParameter='false:LOCALIZE|Select:true:LOCALIZE|Cancel'}" />
<ToolbarItem
Command="{Binding ViewModel.SearchCommand}"
IsEnabled="{Binding ViewModel.TransferViewModel.IsPickingFolder, Mode=OneWay, Converter={StaticResource BoolInvertConverter}}"
Order="Secondary"
Text="{l:ResourceString Rid=Search}" />
<ToolbarItem
Command="{Binding ViewModel.ChangeViewOptionsCommand}"
Order="Secondary"
Text="{l:ResourceString Rid=ViewOptions}" />
<ToolbarItem
Command="{Binding ViewModel.NewItemCommand}"
Order="Secondary"
Text="{l:ResourceString Rid=CreateNew}" />
<ToolbarItem
Command="{Binding ViewModel.ImportItemCommand}"
IsEnabled="{Binding ViewModel.TransferViewModel.IsPickingFolder, Mode=OneWay, Converter={StaticResource BoolInvertConverter}}"
Order="Secondary"
Text="{l:ResourceString Rid=ImportExisting}" />
</ContentPage.ToolbarItems>
<Shell.TitleView>
<Grid>
<Label
Margin="{OnPlatform Android='-24,0,0,0'}"
FontAttributes="Bold"
FontSize="18"
HorizontalOptions="Center"
IsVisible="{Binding ViewModel.IsSelecting, Mode=OneWay}"
Text="{Binding ViewModel.CurrentFolder.SelectedItems.Count, Mode=OneWay, Converter={StaticResource CountToStringConverter}, ConverterParameter='(0:LOCALIZE|SelectItems)|(>0:LOCALIZE|ItemsSelectedPlural)'}"
TextColor="#FFFFFF"
VerticalOptions="Center" />
<VerticalStackLayout IsVisible="{Binding ViewModel.IsSelecting, Mode=OneWay, Converter={StaticResource BoolInvertConverter}}" VerticalOptions="Center">
<Label
FontAttributes="Bold"
FontSize="18"
Text="{Binding ViewModel.Title, Mode=OneWay}"
TextColor="#FFFFFF" />
<Label
FontSize="12"
Opacity="0.6"
Text="{Binding ViewModel.CurrentFolder.Items.Count, Mode=OneWay, Converter={StaticResource CountToStringConverter}, ConverterParameter='(>=0:LOCALIZE|ElementsCountPlural)'}"
TextColor="#FFFFFF" />
</VerticalStackLayout>
</Grid>
</Shell.TitleView>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<uc:BreadcrumbBar
Grid.Row="0"
Margin="16,4"
HeightRequest="32"
ItemsSource="{Binding ViewModel.Breadcrumbs, Mode=OneWay}" />
<uc2:BrowserControl
x:Name="Browser"
Grid.Row="1"
IsReadOnly="{Binding ViewModel.Options.IsReadOnly, Mode=OneWay}"
IsSelecting="{Binding ViewModel.IsSelecting, Mode=OneWay}"
ItemsSource="{Binding ViewModel.CurrentFolder.Items, Mode=OneWay}"
RefreshCommand="{Binding ViewModel.RefreshCommand, Mode=OneWay}"
ViewType="{Binding ViewModel.Layouts.BrowserViewType, Mode=OneWay}">
<uc2:BrowserControl.EmptyView>
<Label
FontSize="18"
HorizontalOptions="Center"
Text="{l:ResourceString Rid=NoItems}"
VerticalOptions="Center" />
</uc2:BrowserControl.EmptyView>
</uc2:BrowserControl>
<uc2:TransferControl
Title="{Binding ViewModel.TransferViewModel.Title, Mode=OneWay}"
Grid.Row="0"
Grid.RowSpan="2"
CanCancel="{Binding ViewModel.TransferViewModel.CanCancel, Mode=OneWay}"
CancelCommand="{Binding ViewModel.TransferViewModel.CancelCommand, Mode=OneWay}"
IsProgressing="{Binding ViewModel.TransferViewModel.IsProgressing, Mode=OneWay}"
IsShown="{Binding ViewModel.TransferViewModel.IsVisible, Mode=OneWay}"
PrimaryButtonText="{Binding ViewModel.TransferViewModel.TransferType, Mode=OneWay, Converter={StaticResource TransferTypeToOperationStringConverter}}"
PrimaryCommand="{Binding ViewModel.TransferViewModel.ConfirmCommand, Mode=OneWay}"
VerticalOptions="End" />
</Grid>
</ContentPage>