Added disabled icon and make File default type for new Sends if premium (#1261)

* Added disabled icon and make File default type for new Sends if premium

* forgot to expand colspan for extra icon
This commit is contained in:
Matt Portune 2021-02-11 16:27:22 -05:00 committed by GitHub
parent 2602a09443
commit 5e70d03dbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 13 deletions

View File

@ -46,6 +46,7 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
@ -59,7 +60,7 @@
LineBreakMode="TailTruncation"
Grid.Column="0"
Grid.Row="1"
Grid.ColumnSpan="5"
Grid.ColumnSpan="6"
StyleClass="list-subtitle, list-subtitle-platform"
Text="{Binding Send.DisplayDate, Mode=OneWay}" />
<controls:FaLabel
@ -69,12 +70,23 @@
VerticalOptions="Center"
StyleClass="list-title-icon"
Margin="5, 0, 0, 0"
Text="&#xf071;"
IsVisible="{Binding Send.Disabled, Mode=OneWay}"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Disabled}" />
<controls:FaLabel
Grid.Column="2"
Grid.Row="0"
HorizontalOptions="Start"
VerticalOptions="Center"
StyleClass="list-title-icon"
Margin="5, 0, 0, 0"
Text="&#xf084;"
IsVisible="{Binding Send.HasPassword, Mode=OneWay}"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Password}" />
<controls:FaLabel
Grid.Column="2"
Grid.Column="3"
Grid.Row="0"
HorizontalOptions="Start"
VerticalOptions="Center"
@ -85,7 +97,7 @@
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n MaxAccessCountReached}" />
<controls:FaLabel
Grid.Column="3"
Grid.Column="4"
Grid.Row="0"
HorizontalOptions="Start"
VerticalOptions="Center"
@ -96,7 +108,7 @@
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Expired}" />
<controls:FaLabel
Grid.Column="4"
Grid.Column="5"
Grid.Row="0"
HorizontalOptions="Start"
VerticalOptions="Center"

View File

@ -86,11 +86,11 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Text="{u:I18n TypeText}"
IsEnabled="{Binding IsFile}"
Clicked="TextType_Clicked"
<Button Text="{u:I18n TypeFile}"
IsEnabled="{Binding IsText}"
Clicked="FileType_Clicked"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Text}"
AutomationProperties.Name="{u:I18n File}"
Grid.Column="0">
<VisualStateManager.VisualStateGroups>
<!-- Rider users, if the x:Name values below are red, it's a known issue: -->
@ -111,11 +111,11 @@
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Button>
<Button Text="{u:I18n TypeFile}"
IsEnabled="{Binding IsText}"
Clicked="FileType_Clicked"
<Button Text="{u:I18n TypeText}"
IsEnabled="{Binding IsFile}"
Clicked="TextType_Clicked"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n File}"
AutomationProperties.Name="{u:I18n Text}"
Grid.Column="1">
<VisualStateManager.VisualStateGroups>
<!-- Rider users, if the x:Name values below are red, it's a known issue: -->

View File

@ -195,9 +195,10 @@ namespace Bit.App.Pages
}
else
{
var defaultType = _canAccessPremium ? SendType.File : SendType.Text;
Send = new SendView
{
Type = Type.GetValueOrDefault(SendType.Text),
Type = Type.GetValueOrDefault(defaultType),
DeletionDate = DateTime.Now.AddDays(7),
};
DeletionDateTypeSelectedIndex = 4;