1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-08 03:23:23 +00:00

Revert "Revert "Redefine cipher "share" to "move to organization""" (#1459)

* Revert "Revert "Redefine cipher "share" to "move to organization" (#1433)" (#1440)"

This reverts commit bd4a275558.

* Cancel > close
This commit is contained in:
Matt Gibson
2021-08-04 15:46:28 -04:00
committed by GitHub
parent dbc0f490c5
commit 9042b1009e
11 changed files with 69 additions and 39 deletions

View File

@@ -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();
}

View File

@@ -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/");
@@ -393,7 +393,7 @@ namespace Bit.App.Pages
};
if (IncludeLinksWithSubscriptionInfo())
{
toolsItems.Add(new SettingsPageListItem { Name = AppResources.ShareVault });
toolsItems.Add(new SettingsPageListItem { Name = AppResources.LearnOrg });
toolsItems.Add(new SettingsPageListItem { Name = AppResources.WebVault });
}
var otherItems = new List<SettingsPageListItem>

View File

@@ -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"

View File

@@ -284,7 +284,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());
@@ -305,7 +305,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));

View File

@@ -15,7 +15,7 @@
<ContentPage.ToolbarItems>
<ToolbarItem Text="{u:I18n Cancel}" 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"

View File

@@ -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;
}

View File

@@ -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"

View File

@@ -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));