Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Windows
pEp for Outlook
Commits
d0c20197
Commit
d0c20197
authored
Sep 30, 2021
by
Thomas
Browse files
Add initialization overlay to hide form region during loading
parent
2a11d8b6
Changes
4
Hide whitespace changes
Inline
Side-by-side
UI/RibbonCustomizationsExplorer.xml
View file @
d0c20197
...
@@ -166,13 +166,13 @@
...
@@ -166,13 +166,13 @@
</tab>
</tab>
</backstage>
</backstage>
<contextMenus>
<contextMenus>
<!--The Contact context menu to reset trust-->
<!--The Contact context menu to reset trust-->
<contextMenu
idMso=
"ContextMenuContactItem"
>
<contextMenu
idMso=
"ContextMenuContactItem"
>
<button
id=
"ButtonContextMenuResetContactTrust"
<button
id=
"ButtonContextMenuResetContactTrust"
getImage=
"ButtonContextMenuContactResetTrust_GetImage"
getImage=
"ButtonContextMenuContactResetTrust_GetImage"
getLabel=
"ButtonContextMenuContactResetTrust_GetLabel"
getLabel=
"ButtonContextMenuContactResetTrust_GetLabel"
onAction=
"ButtonContextMenuContactResetTrust_Click"
/>
onAction=
"ButtonContextMenuContactResetTrust_Click"
/>
</contextMenu>
</contextMenu>
</contextMenus>
</contextMenus>
</customUI>
</customUI>
...
...
UI/ViewModels/FormControlPatchViewModel.cs
View file @
d0c20197
...
@@ -19,6 +19,7 @@ namespace pEp.UI.ViewModels
...
@@ -19,6 +19,7 @@ namespace pEp.UI.ViewModels
private
DateTime
?
_EditDate
=
null
;
private
DateTime
?
_EditDate
=
null
;
private
string
_Explanation
=
null
;
private
string
_Explanation
=
null
;
private
bool
_IsLoading
=
false
;
private
bool
_IsLoading
=
false
;
private
bool
_Loaded
=
false
;
private
DistributedPolicyEngine
.
PatchStatus
_Status
=
DistributedPolicyEngine
.
PatchStatus
.
Open
;
private
DistributedPolicyEngine
.
PatchStatus
_Status
=
DistributedPolicyEngine
.
PatchStatus
.
Open
;
#
endregion
#
endregion
...
@@ -80,6 +81,11 @@ namespace pEp.UI.ViewModels
...
@@ -80,6 +81,11 @@ namespace pEp.UI.ViewModels
/// Gets or sets whether the screen is loading.
/// Gets or sets whether the screen is loading.
/// </summary>
/// </summary>
public
bool
IsLoading
{
get
=>
this
.
_IsLoading
;
set
=>
this
.
SetProperty
(
ref
this
.
_IsLoading
,
value
);
}
public
bool
IsLoading
{
get
=>
this
.
_IsLoading
;
set
=>
this
.
SetProperty
(
ref
this
.
_IsLoading
,
value
);
}
/// <summary>
/// Gets or sets whether the screen is fully loaded.
/// </summary>
public
bool
Loaded
{
get
=>
this
.
_Loaded
;
set
=>
this
.
SetProperty
(
ref
this
.
_Loaded
,
value
);
}
/// <summary>
/// <summary>
/// Gets whether the OK button is visible.
/// Gets whether the OK button is visible.
...
@@ -166,6 +172,7 @@ namespace pEp.UI.ViewModels
...
@@ -166,6 +172,7 @@ namespace pEp.UI.ViewModels
this
.
IsRejectButtonVisible
=
true
;
this
.
IsRejectButtonVisible
=
true
;
this
.
OKButtonText
=
"Support"
;
this
.
OKButtonText
=
"Support"
;
this
.
UpdateView
(
status
);
this
.
UpdateView
(
status
);
this
.
Loaded
=
true
;
}
}
#
endregion
#
endregion
...
...
UI/Views/FormControlPatchView.xaml
View file @
d0c20197
...
@@ -41,6 +41,17 @@
...
@@ -41,6 +41,17 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!--Hides all other content while the form region is being loaded-->
<Rectangle Grid.Column="0"
Grid.ColumnSpan="3"
Grid.Row="0"
Grid.RowSpan="8"
Grid.ZIndex="1000"
Fill="White"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Visibility="{Binding Loaded, Converter={StaticResource InvertBoolToVisibility}}" />
<!--Overlay during API calls-->
<Rectangle Grid.Column="0"
<Rectangle Grid.Column="0"
Grid.ColumnSpan="3"
Grid.ColumnSpan="3"
Grid.Row="0"
Grid.Row="0"
...
@@ -51,6 +62,7 @@
...
@@ -51,6 +62,7 @@
HorizontalAlignment="Stretch"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
VerticalAlignment="Stretch"
Visibility="{Binding IsLoading, Converter={StaticResource BoolToVisibility}}" />
Visibility="{Binding IsLoading, Converter={StaticResource BoolToVisibility}}" />
<!--Loading animation during API calls-->
<Image Grid.Column="0"
<Image Grid.Column="0"
Grid.ColumnSpan="3"
Grid.ColumnSpan="3"
Grid.Row="0"
Grid.Row="0"
...
...
UI/Views/PatchDialogView.xaml
View file @
d0c20197
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!--Overlay during API calls-->
<Rectangle Grid.Column="0"
<Rectangle Grid.Column="0"
Grid.ColumnSpan="3"
Grid.ColumnSpan="3"
Grid.Row="0"
Grid.Row="0"
...
@@ -44,6 +45,7 @@
...
@@ -44,6 +45,7 @@
HorizontalAlignment="Stretch"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
VerticalAlignment="Stretch"
Visibility="{Binding IsLoading, Converter={StaticResource BoolToVisibility}}" />
Visibility="{Binding IsLoading, Converter={StaticResource BoolToVisibility}}" />
<!--Loading animation during API calls-->
<Image Grid.Column="0"
<Image Grid.Column="0"
Grid.ColumnSpan="3"
Grid.ColumnSpan="3"
Grid.Row="0"
Grid.Row="0"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment