Ejemplo n.º 1
0
 private async void AddButton_Clicked(object sender, EventArgs e)
 {
     if (DoOnce())
     {
         var page = new AddEditPage(null, _vm.Type, _vm.FolderId, _vm.CollectionId);
         await Navigation.PushModalAsync(new NavigationPage(page));
     }
 }
Ejemplo n.º 2
0
 private async void Clone_Clicked(object sender, System.EventArgs e)
 {
     if (DoOnce())
     {
         var page = new AddEditPage(_vm.CipherId, cloneMode: true, viewPage: this);
         await Navigation.PushModalAsync(new NavigationPage(page));
     }
 }
Ejemplo n.º 3
0
        private async void More_Clicked(object sender, System.EventArgs e)
        {
            if (!DoOnce())
            {
                return;
            }

            var options = new List <string> {
                AppResources.Attachments
            };

            if (_vm.Cipher.OrganizationId == null)
            {
                options.Add(AppResources.Clone);
                options.Add(AppResources.MoveToOrganization);
            }
            else
            {
                options.Add(AppResources.Collections);
            }

            var selection = await DisplayActionSheet(AppResources.Options, AppResources.Cancel,
                                                     AppResources.Delete, options.ToArray());

            if (!await _vm.PromptPasswordAsync())
            {
                return;
            }

            if (selection == AppResources.Delete)
            {
                if (await _vm.DeleteAsync())
                {
                    await Navigation.PopModalAsync();
                }
            }
            else if (selection == AppResources.Attachments)
            {
                var page = new AttachmentsPage(_vm.CipherId);
                await Navigation.PushModalAsync(new NavigationPage(page));
            }
            else if (selection == AppResources.Collections)
            {
                var page = new CollectionsPage(_vm.CipherId);
                await Navigation.PushModalAsync(new NavigationPage(page));
            }
            else if (selection == AppResources.MoveToOrganization)
            {
                var page = new SharePage(_vm.CipherId);
                await Navigation.PushModalAsync(new NavigationPage(page));
            }
            else if (selection == AppResources.Clone)
            {
                var page = new AddEditPage(_vm.CipherId, cloneMode: true, viewPage: this);
                await Navigation.PushModalAsync(new NavigationPage(page));
            }
        }
Ejemplo n.º 4
0
        private async void AddButton_Clicked(object sender, EventArgs e)
        {
            var skipAction = _accountListOverlay.IsVisible && Device.RuntimePlatform == Device.Android;
            await _accountListOverlay.HideAsync();

            if (skipAction)
            {
                // Account list in the process of closing via tapping on invisible FAB, skip this attempt
                return;
            }
            if (!_vm.Deleted && DoOnce())
            {
                var page = new AddEditPage(null, _vm.Type, _vm.FolderId, _vm.CollectionId, _vm.GetVaultFilterOrgId());
                await Navigation.PushModalAsync(new NavigationPage(page));
            }
        }
Ejemplo n.º 5
0
        private async void AddButton_Clicked(object sender, System.EventArgs e)
        {
            if (!DoOnce())
            {
                return;
            }
            if (_appOptions.FillType.HasValue && _appOptions.FillType != CipherType.Login)
            {
                var pageForOther = new AddEditPage(type: _appOptions.FillType, fromAutofill: true);
                await Navigation.PushModalAsync(new NavigationPage(pageForOther));

                return;
            }
            var pageForLogin = new AddEditPage(null, CipherType.Login, uri: _vm.Uri, name: _vm.Name,
                                               fromAutofill: true);
            await Navigation.PushModalAsync(new NavigationPage(pageForLogin));
        }