mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-22 11:35:21 +01:00
Redefine cipher "share" to "move to organization" (#1433)
This commit is contained in:
parent
2a5667251e
commit
2003ac9d2c
@ -80,7 +80,7 @@
|
||||
VerticalOptions="Center"
|
||||
StyleClass="list-title-icon"
|
||||
Margin="5, 0, 0, 0"
|
||||
Text=""
|
||||
Text=""
|
||||
IsVisible="{Binding Cipher.Shared, Mode=OneTime}"
|
||||
AutomationProperties.IsInAccessibleTree="True"
|
||||
AutomationProperties.Name="{u:I18n Shared}" />
|
||||
|
@ -103,7 +103,7 @@ namespace Bit.App.Pages
|
||||
{
|
||||
await Navigation.PushModalAsync(new NavigationPage(new ExportVaultPage()));
|
||||
}
|
||||
else if (item.Name == AppResources.ShareVault)
|
||||
else if (item.Name == AppResources.LearnOrg)
|
||||
{
|
||||
await _vm.ShareAsync();
|
||||
}
|
||||
|
@ -150,8 +150,8 @@ namespace Bit.App.Pages
|
||||
|
||||
public async Task ShareAsync()
|
||||
{
|
||||
var confirmed = await _platformUtilsService.ShowDialogAsync(AppResources.ShareVaultConfirmation,
|
||||
AppResources.ShareVault, AppResources.Yes, AppResources.Cancel);
|
||||
var confirmed = await _platformUtilsService.ShowDialogAsync(AppResources.LearnOrgConfirmation,
|
||||
AppResources.LearnOrg, AppResources.Yes, AppResources.Cancel);
|
||||
if (confirmed)
|
||||
{
|
||||
_platformUtilsService.LaunchUri("https://help.bitwarden.com/article/what-is-an-organization/");
|
||||
@ -387,13 +387,13 @@ namespace Bit.App.Pages
|
||||
{
|
||||
new SettingsPageListItem { Name = AppResources.ImportItems },
|
||||
new SettingsPageListItem { Name = AppResources.ExportVault },
|
||||
new SettingsPageListItem { Name = AppResources.ShareVault },
|
||||
new SettingsPageListItem { Name = AppResources.WebVault }
|
||||
};
|
||||
var otherItems = new List<SettingsPageListItem>
|
||||
{
|
||||
new SettingsPageListItem { Name = AppResources.Options },
|
||||
new SettingsPageListItem { Name = AppResources.About },
|
||||
new SettingsPageListItem { Name = AppResources.LearnOrg },
|
||||
new SettingsPageListItem { Name = AppResources.HelpAndFeedback },
|
||||
new SettingsPageListItem { Name = AppResources.RateTheApp }
|
||||
};
|
||||
|
@ -30,7 +30,7 @@
|
||||
x:Name="_collectionsItem"
|
||||
Clicked="Collections_Clicked"
|
||||
Order="Secondary" />
|
||||
<ToolbarItem Text="{u:I18n Share}"
|
||||
<ToolbarItem Text="{u:I18n MoveToOrganization}"
|
||||
x:Key="shareItem"
|
||||
x:Name="_shareItem"
|
||||
Clicked="Share_Clicked"
|
||||
|
@ -272,7 +272,7 @@ namespace Bit.App.Pages
|
||||
var options = new List<string> { AppResources.Attachments };
|
||||
if (_vm.EditMode)
|
||||
{
|
||||
options.Add(_vm.Cipher.OrganizationId == null ? AppResources.Share : AppResources.Collections);
|
||||
options.Add(_vm.Cipher.OrganizationId == null ? AppResources.MoveToOrganization : AppResources.Collections);
|
||||
}
|
||||
var selection = await DisplayActionSheet(AppResources.Options, AppResources.Cancel,
|
||||
(_vm.EditMode && !_vm.CloneMode) ? AppResources.Delete : null, options.ToArray());
|
||||
@ -293,7 +293,7 @@ namespace Bit.App.Pages
|
||||
var page = new CollectionsPage(_vm.CipherId);
|
||||
await Navigation.PushModalAsync(new Xamarin.Forms.NavigationPage(page));
|
||||
}
|
||||
else if (selection == AppResources.Share)
|
||||
else if (selection == AppResources.MoveToOrganization)
|
||||
{
|
||||
var page = new SharePage(_vm.CipherId);
|
||||
await Navigation.PushModalAsync(new Xamarin.Forms.NavigationPage(page));
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Text="{u:I18n Close}" Clicked="Close_Clicked" Order="Primary" Priority="-1" />
|
||||
<ToolbarItem Text="{u:I18n Save}" Clicked="Save_Clicked" />
|
||||
<ToolbarItem Text="{u:I18n Move}" Clicked="Save_Clicked" />
|
||||
</ContentPage.ToolbarItems>
|
||||
|
||||
<ContentPage.Resources>
|
||||
@ -46,7 +46,7 @@
|
||||
StyleClass="box-value" />
|
||||
</StackLayout>
|
||||
<Label
|
||||
Text="{u:I18n ShareDesc}"
|
||||
Text="{u:I18n MoveToOrgDesc}"
|
||||
StyleClass="box-footer-label" />
|
||||
</StackLayout>
|
||||
<StackLayout StyleClass="box"
|
||||
|
@ -33,7 +33,7 @@ namespace Bit.App.Pages
|
||||
_collectionService = ServiceContainer.Resolve<ICollectionService>("collectionService");
|
||||
Collections = new ExtendedObservableCollection<CollectionViewModel>();
|
||||
OrganizationOptions = new List<KeyValuePair<string, string>>();
|
||||
PageTitle = AppResources.Share;
|
||||
PageTitle = AppResources.MoveToOrganization;
|
||||
}
|
||||
|
||||
public string CipherId { get; set; }
|
||||
@ -109,7 +109,9 @@ namespace Bit.App.Pages
|
||||
await _deviceActionService.ShowLoadingAsync(AppResources.Saving);
|
||||
await _cipherService.ShareWithServerAsync(cipherView, OrganizationId, checkedCollectionIds);
|
||||
await _deviceActionService.HideLoadingAsync();
|
||||
_platformUtilsService.ShowToast("success", null, AppResources.ItemShared);
|
||||
var movedItemToOrgText = string.Format(AppResources.MovedItemToOrg, cipherView.Name,
|
||||
(await _userService.GetOrganizationAsync(OrganizationId)).Name);
|
||||
_platformUtilsService.ShowToast("success", null, movedItemToOrgText);
|
||||
await Page.Navigation.PopModalAsync();
|
||||
return true;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
x:Name="_collectionsItem"
|
||||
Clicked="Collections_Clicked"
|
||||
Order="Secondary" />
|
||||
<ToolbarItem Text="{u:I18n Share}"
|
||||
<ToolbarItem Text="{u:I18n MoveToOrganization}"
|
||||
x:Key="shareItem"
|
||||
x:Name="_shareItem"
|
||||
Clicked="Share_Clicked"
|
||||
|
@ -220,7 +220,7 @@ namespace Bit.App.Pages
|
||||
if (_vm.Cipher.OrganizationId == null)
|
||||
{
|
||||
options.Add(AppResources.Clone);
|
||||
options.Add(AppResources.Share);
|
||||
options.Add(AppResources.MoveToOrganization);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -252,7 +252,7 @@ namespace Bit.App.Pages
|
||||
var page = new CollectionsPage(_vm.CipherId);
|
||||
await Navigation.PushModalAsync(new NavigationPage(page));
|
||||
}
|
||||
else if (selection == AppResources.Share)
|
||||
else if (selection == AppResources.MoveToOrganization)
|
||||
{
|
||||
var page = new SharePage(_vm.CipherId);
|
||||
await Navigation.PushModalAsync(new NavigationPage(page));
|
||||
|
54
src/App/Resources/AppResources.Designer.cs
generated
54
src/App/Resources/AppResources.Designer.cs
generated
@ -1,6 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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.
|
||||
@ -9,6 +10,7 @@
|
||||
|
||||
namespace Bit.App.Resources {
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
@ -363,6 +365,12 @@ namespace Bit.App.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Move {
|
||||
get {
|
||||
return ResourceManager.GetString("Move", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Saving {
|
||||
get {
|
||||
return ResourceManager.GetString("Saving", resourceCulture);
|
||||
@ -1257,9 +1265,9 @@ namespace Bit.App.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ShareVault {
|
||||
public static string LearnOrg {
|
||||
get {
|
||||
return ResourceManager.GetString("ShareVault", resourceCulture);
|
||||
return ResourceManager.GetString("LearnOrg", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2397,6 +2405,12 @@ namespace Bit.App.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
public static string MovedItemToOrg {
|
||||
get {
|
||||
return ResourceManager.GetString("MovedItemToOrg", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ItemShared {
|
||||
get {
|
||||
return ResourceManager.GetString("ItemShared", resourceCulture);
|
||||
@ -2421,15 +2435,21 @@ namespace Bit.App.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
public static string MoveToOrganization {
|
||||
get {
|
||||
return ResourceManager.GetString("MoveToOrganization", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string NoOrgsToList {
|
||||
get {
|
||||
return ResourceManager.GetString("NoOrgsToList", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ShareDesc {
|
||||
public static string MoveToOrgDesc {
|
||||
get {
|
||||
return ResourceManager.GetString("ShareDesc", resourceCulture);
|
||||
return ResourceManager.GetString("MoveToOrgDesc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2481,9 +2501,9 @@ namespace Bit.App.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ShareVaultConfirmation {
|
||||
public static string LearnOrgConfirmation {
|
||||
get {
|
||||
return ResourceManager.GetString("ShareVaultConfirmation", resourceCulture);
|
||||
return ResourceManager.GetString("LearnOrgConfirmation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3512,23 +3532,21 @@ namespace Bit.App.Resources {
|
||||
return ResourceManager.GetString("SendFileEmailVerificationRequired", resourceCulture);
|
||||
}
|
||||
}
|
||||
public static string PasswordPrompt
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
public static string PasswordPrompt {
|
||||
get {
|
||||
return ResourceManager.GetString("PasswordPrompt", resourceCulture);
|
||||
}
|
||||
}
|
||||
public static string PasswordConfirmation
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
public static string PasswordConfirmation {
|
||||
get {
|
||||
return ResourceManager.GetString("PasswordConfirmation", resourceCulture);
|
||||
}
|
||||
}public static string PasswordConfirmationDesc
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
|
||||
public static string PasswordConfirmationDesc {
|
||||
get {
|
||||
return ResourceManager.GetString("PasswordConfirmationDesc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
@ -310,6 +310,9 @@
|
||||
<value>Save</value>
|
||||
<comment>Button text for a save operation (verb).</comment>
|
||||
</data>
|
||||
<data name="Move" xml:space="preserve">
|
||||
<value>Move</value>
|
||||
</data>
|
||||
<data name="Saving" xml:space="preserve">
|
||||
<value>Saving...</value>
|
||||
<comment>Message shown when interacting with the server</comment>
|
||||
@ -782,8 +785,8 @@
|
||||
<data name="BitwardenAutofillServiceSearch" xml:space="preserve">
|
||||
<value>You are searching for an auto-fill item for "{0}".</value>
|
||||
</data>
|
||||
<data name="ShareVault" xml:space="preserve">
|
||||
<value>Share Your Vault</value>
|
||||
<data name="LearnOrg" xml:space="preserve">
|
||||
<value>Learn About Organizations</value>
|
||||
</data>
|
||||
<data name="CannotOpenApp" xml:space="preserve">
|
||||
<value>Cannot open the app "{0}".</value>
|
||||
@ -1378,6 +1381,10 @@
|
||||
<data name="NoCollectionsToList" xml:space="preserve">
|
||||
<value>There are no collections to list.</value>
|
||||
</data>
|
||||
<data name="MovedItemToOrg" xml:space="preserve">
|
||||
<value>{0} moved to {1}.</value>
|
||||
<comment>ex: Item moved to Organization.</comment>
|
||||
</data>
|
||||
<data name="ItemShared" xml:space="preserve">
|
||||
<value>Item has been shared.</value>
|
||||
</data>
|
||||
@ -1390,11 +1397,14 @@
|
||||
<data name="ShareItem" xml:space="preserve">
|
||||
<value>Share Item</value>
|
||||
</data>
|
||||
<data name="MoveToOrganization" xml:space="preserve">
|
||||
<value>Move to Organization</value>
|
||||
</data>
|
||||
<data name="NoOrgsToList" xml:space="preserve">
|
||||
<value>No organizations to list.</value>
|
||||
</data>
|
||||
<data name="ShareDesc" xml:space="preserve">
|
||||
<value>Choose an organization that you wish to share this item with. Sharing transfers ownership of the item to the organization. You will no longer be the direct owner of this item once it has been shared.</value>
|
||||
<data name="MoveToOrgDesc" xml:space="preserve">
|
||||
<value>Choose an organization that you wish to move this item to. Moving to an organization transfers ownership of the item to that organization. You will no longer be the direct owner of this item once it has been moved.</value>
|
||||
</data>
|
||||
<data name="NumberOfWords" xml:space="preserve">
|
||||
<value>Number of Words</value>
|
||||
@ -1424,8 +1434,8 @@
|
||||
<value>Your account's fingerprint phrase</value>
|
||||
<comment>A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing.</comment>
|
||||
</data>
|
||||
<data name="ShareVaultConfirmation" xml:space="preserve">
|
||||
<value>Bitwarden allows you to share your vault with others by using an organization account. Would you like to visit the bitwarden.com website to learn more?</value>
|
||||
<data name="LearnOrgConfirmation" xml:space="preserve">
|
||||
<value>Bitwarden allows you to share your vault items with others by using an organization account. Would you like to visit the bitwarden.com website to learn more?</value>
|
||||
</data>
|
||||
<data name="ExportVault" xml:space="preserve">
|
||||
<value>Export Vault</value>
|
||||
|
Loading…
Reference in New Issue
Block a user