mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-14 10:16:02 +01:00
Add site modal stubbed out
This commit is contained in:
parent
984c61e10f
commit
2871e04cc7
6
src/popup/app/vault/vaultAddSiteController.js
Normal file
6
src/popup/app/vault/vaultAddSiteController.js
Normal file
@ -0,0 +1,6 @@
|
||||
angular
|
||||
.module('bit.vault')
|
||||
|
||||
.controller('vaultAddSiteController', function ($scope) {
|
||||
console.log('modal controller');
|
||||
});
|
@ -1,6 +1,34 @@
|
||||
angular
|
||||
.module('bit.vault')
|
||||
|
||||
.controller('vaultController', function ($scope) {
|
||||
.controller('vaultController', function ($scope, $ionicModal) {
|
||||
$ionicModal.fromTemplateUrl('app/vault/views/vaultAddSite.html', {
|
||||
scope: $scope,
|
||||
animation: 'slide-in-up'
|
||||
}).then(function (modal) {
|
||||
$scope.addSiteModal = modal;
|
||||
});
|
||||
|
||||
$scope.addSite = function () {
|
||||
$scope.addSiteModal.show();
|
||||
};
|
||||
|
||||
$scope.closeAddSite = function () {
|
||||
$scope.addSiteModal.hide();
|
||||
};
|
||||
|
||||
// Cleanup the modal when we're done with it!
|
||||
$scope.$on('$destroy', function () {
|
||||
$scope.addSiteModal.remove();
|
||||
});
|
||||
|
||||
// Execute action on hide modal
|
||||
$scope.$on('modal.hidden', function () {
|
||||
// Execute action
|
||||
});
|
||||
|
||||
// Execute action on remove modal
|
||||
$scope.$on('modal.removed', function () {
|
||||
// Execute action
|
||||
});
|
||||
});
|
||||
|
@ -1,2 +1,2 @@
|
||||
angular
|
||||
.module('bit.vault', []);
|
||||
.module('bit.vault', ['ionic']);
|
||||
|
@ -1,4 +1,7 @@
|
||||
<ion-view view-title="My Vault">
|
||||
<ion-nav-buttons side="secondary">
|
||||
<button class="button button-icon icon ion-ios-plus-empty" ng-click="addSite()"></button>
|
||||
</ion-nav-buttons>
|
||||
<ion-content class="padding">
|
||||
<p>
|
||||
Some content for your vault.
|
||||
|
9
src/popup/app/vault/views/vaultAddSite.html
Normal file
9
src/popup/app/vault/views/vaultAddSite.html
Normal file
@ -0,0 +1,9 @@
|
||||
<ion-modal-view>
|
||||
<ion-header-bar class="bar bar-header bar-positive">
|
||||
<button class="button button-clear button-primary" ng-click="addSiteModal.hide()">Close</button>
|
||||
<h1 class="title">Add Site</h1>
|
||||
</ion-header-bar>
|
||||
<ion-content class="padding" ng-controller="vaultAddSiteController">
|
||||
Add a site content.
|
||||
</ion-content>
|
||||
</ion-modal-view>
|
@ -31,6 +31,7 @@
|
||||
|
||||
<script src="app/vault/vaultModule.js"></script>
|
||||
<script src="app/vault/vaultController.js"></script>
|
||||
<script src="app/vault/vaultAddSiteController.js"></script>
|
||||
|
||||
<script src="app/settings/settingsModule.js"></script>
|
||||
<script src="app/settings/settingsController.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user