initial commit of ownership banner (#1210)

This commit is contained in:
Vincent Salucci 2021-01-07 11:16:34 -06:00 committed by GitHub
parent edb8dc58f7
commit 3b5cae01e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 13 deletions

View File

@ -56,6 +56,29 @@
<ScrollView x:Name="_scrollView" Padding="0, 0, 0, 20">
<StackLayout Spacing="20">
<StackLayout StyleClass="box">
<Grid IsVisible="{Binding OwnershipPolicyInEffect}"
Margin="0, 12, 0, 0"
RowSpacing="0"
ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Frame Padding="10"
Margin="0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
<Label
Text="{u:I18n PersonalOwnershipPolicyInEffect}"
StyleClass="text-muted, text-sm, text-bold"
HorizontalTextAlignment="Center" />
</Frame>
</Grid>
<StackLayout StyleClass="box-row-header">
<Label Text="{u:I18n ItemInformation, Header=True}"
StyleClass="box-header, box-header-platform" />

View File

@ -267,6 +267,7 @@ namespace Bit.App.Pages
public bool ShowCollections => (!EditMode || CloneMode) && Cipher.OrganizationId != null;
public bool EditMode => !string.IsNullOrWhiteSpace(CipherId);
public bool ShowOwnershipOptions => !EditMode || CloneMode;
public bool OwnershipPolicyInEffect => ShowOwnershipOptions && !AllowPersonal;
public bool CloneMode { get; set; }
public ViewPage ViewPage { get; set; }
public bool IsLogin => Cipher?.Type == CipherType.Login;

View File

@ -1,7 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -10,7 +9,6 @@
namespace Bit.App.Resources {
using System;
using System.Reflection;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
@ -2818,23 +2816,19 @@ namespace Bit.App.Resources {
return ResourceManager.GetString("ExportVaultWarning", resourceCulture);
}
}
public static string EncExportVaultWarning
{
get
{
public static string EncExportVaultWarning {
get {
return ResourceManager.GetString("EncExportVaultWarning", resourceCulture);
}
}
public static string ExportVaultConfirmationTitle
{
get
{
public static string ExportVaultConfirmationTitle {
get {
return ResourceManager.GetString("ExportVaultConfirmationTitle", resourceCulture);
}
}
public static string Warning {
get {
return ResourceManager.GetString("Warning", resourceCulture);
@ -3182,5 +3176,11 @@ namespace Bit.App.Resources {
return ResourceManager.GetString("PersonalOwnershipSubmitError", resourceCulture);
}
}
public static string PersonalOwnershipPolicyInEffect {
get {
return ResourceManager.GetString("PersonalOwnershipPolicyInEffect", resourceCulture);
}
}
}
}

View File

@ -1796,4 +1796,7 @@
<data name="PersonalOwnershipSubmitError" xml:space="preserve">
<value>Due to an Enterprise Policy, you are restricted from saving items to your personal vault. Change the Ownership option to an organization and choose from available Collections.</value>
</data>
<data name="PersonalOwnershipPolicyInEffect" xml:space="preserve">
<value>An organization policy is affecting your ownership options.</value>
</data>
</root>