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"> <ScrollView x:Name="_scrollView" Padding="0, 0, 0, 20">
<StackLayout Spacing="20"> <StackLayout Spacing="20">
<StackLayout StyleClass="box"> <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"> <StackLayout StyleClass="box-row-header">
<Label Text="{u:I18n ItemInformation, Header=True}" <Label Text="{u:I18n ItemInformation, Header=True}"
StyleClass="box-header, box-header-platform" /> 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 ShowCollections => (!EditMode || CloneMode) && Cipher.OrganizationId != null;
public bool EditMode => !string.IsNullOrWhiteSpace(CipherId); public bool EditMode => !string.IsNullOrWhiteSpace(CipherId);
public bool ShowOwnershipOptions => !EditMode || CloneMode; public bool ShowOwnershipOptions => !EditMode || CloneMode;
public bool OwnershipPolicyInEffect => ShowOwnershipOptions && !AllowPersonal;
public bool CloneMode { get; set; } public bool CloneMode { get; set; }
public ViewPage ViewPage { get; set; } public ViewPage ViewPage { get; set; }
public bool IsLogin => Cipher?.Type == CipherType.Login; public bool IsLogin => Cipher?.Type == CipherType.Login;

View file

@ -1,7 +1,6 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -10,7 +9,6 @@
namespace Bit.App.Resources { namespace Bit.App.Resources {
using System; using System;
using System.Reflection;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [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); return ResourceManager.GetString("ExportVaultWarning", resourceCulture);
} }
} }
public static string EncExportVaultWarning public static string EncExportVaultWarning {
{ get {
get
{
return ResourceManager.GetString("EncExportVaultWarning", resourceCulture); return ResourceManager.GetString("EncExportVaultWarning", resourceCulture);
} }
} }
public static string ExportVaultConfirmationTitle public static string ExportVaultConfirmationTitle {
{ get {
get
{
return ResourceManager.GetString("ExportVaultConfirmationTitle", resourceCulture); return ResourceManager.GetString("ExportVaultConfirmationTitle", resourceCulture);
} }
} }
public static string Warning { public static string Warning {
get { get {
return ResourceManager.GetString("Warning", resourceCulture); return ResourceManager.GetString("Warning", resourceCulture);
@ -3182,5 +3176,11 @@ namespace Bit.App.Resources {
return ResourceManager.GetString("PersonalOwnershipSubmitError", resourceCulture); 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"> <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> <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>
<data name="PersonalOwnershipPolicyInEffect" xml:space="preserve">
<value>An organization policy is affecting your ownership options.</value>
</data>
</root> </root>