Label
{{selectedCredential.label}}
Account
{{selectedCredential.label}}
Password
{{selectedCredential.label}}
Files
{{selectedCredential.label}}
Custom fields
{{selectedCredential.label}}
Changed
{{selectedCredential.label}}
Created
{{selectedCredential.label}}
');
}]);
angular.module('views/vaults.html', []).run(['$templateCache', function($templateCache) {
diff --git a/lib/Db/Credential.php b/lib/Db/Credential.php
index b7d6de9a..9fa76941 100644
--- a/lib/Db/Credential.php
+++ b/lib/Db/Credential.php
@@ -93,6 +93,8 @@ class Credential extends Entity implements \JsonSerializable{
$this->addType('renewInterval', 'integer');
$this->addType('expireTime', 'integer');
$this->addType('deleteTime', 'integer');
+ $this->addType('vault_id', 'integer');
+ $this->addType('credential_id', 'integer');
}
diff --git a/lib/Db/CredentialMapper.php b/lib/Db/CredentialMapper.php
index 293b20f0..d52569c2 100644
--- a/lib/Db/CredentialMapper.php
+++ b/lib/Db/CredentialMapper.php
@@ -58,4 +58,26 @@ class CredentialMapper extends Mapper {
return parent::insert($credential);
}
+ public function update($raw_credential){
+ $credential = new Credential();
+ $credential->setId($raw_credential['credential_id']);
+ $credential->setUserId($raw_credential['user_id']);
+ $credential->setLabel($raw_credential['label']);
+ $credential->setDescription($raw_credential['description']);
+ $credential->setChanged($this->utils->getTime());
+ $credential->setTags($raw_credential['tags']);
+ $credential->setEmail($raw_credential['email']);
+ $credential->setUsername($raw_credential['username']);
+ $credential->setPassword($raw_credential['password']);
+ $credential->setUrl($raw_credential['url']);
+ $credential->setFavicon($raw_credential['favicon']);
+ $credential->setRenewInterval($raw_credential['renew_interval']);
+ $credential->setExpireTime($raw_credential['expire_time']);
+ $credential->setFiles($raw_credential['files']);
+ $credential->setCustomFields($raw_credential['custom_fields']);
+ $credential->setOtp($raw_credential['otp']);
+ $credential->setHidden($raw_credential['hidden']);
+ return parent::update($credential);
+ }
+
}
\ No newline at end of file
diff --git a/lib/Service/CredentialService.php b/lib/Service/CredentialService.php
index d279c7c8..d358ebf9 100644
--- a/lib/Service/CredentialService.php
+++ b/lib/Service/CredentialService.php
@@ -29,6 +29,10 @@ class CredentialService {
return $this->credentialMapper->create($credential);
}
+ public function updateCredential($credential) {
+ return $this->credentialMapper->update($credential);
+ }
+
public function getCredentialsByVaultId($vault_id, $user_id){
return $this->credentialMapper->getCredentialsByVaultId($vault_id, $user_id);
}
diff --git a/sass/app.scss b/sass/app.scss
index a28c438b..b85bdbbd 100644
--- a/sass/app.scss
+++ b/sass/app.scss
@@ -1,7 +1,6 @@
@import 'variables';
@import 'mixins';
-@import 'container';
@import 'partials/button';
@import 'partials/popovermenu';
@import 'partials/tabs';
diff --git a/sass/container.scss b/sass/container.scss
deleted file mode 100644
index e1c90213..00000000
--- a/sass/container.scss
+++ /dev/null
@@ -1,26 +0,0 @@
-.actions.creatable{
- padding-left: 10px;
- .bubble{
- position: relative;
- width: 185px;
- @include border-radius(5px);
- box-shadow: 0 1px 10px rgba(50, 50, 50, .7);
- ul{
- li{
- padding-left: 10px;
- }
- .menuitem{
- font-size: 12px;
- display: inline;
- }
- }
- }
- .bubble:after{
- right: inherit;
- left: 10px;
- top: -19px;
- }
-}
-#app-content-wrapper{
- min-height: 95%;
-}
\ No newline at end of file
diff --git a/sass/credentials.scss b/sass/credentials.scss
index a8ff9ec9..e2445202 100644
--- a/sass/credentials.scss
+++ b/sass/credentials.scss
@@ -1,143 +1,196 @@
-.credential-table {
- width: 100%;
- margin-top: 44px;
- tr:hover {
- background-color: darken(#fff, 4%);
- }
- tr {
- td {
- cursor: pointer;
- padding: 5px;
- border-bottom: 1px solid #eeeeee;
- .label {
- float: left;
- }
- .tags {
- float: right;
- .tag {
- background-color: rgba(240, 240, 240, .9);
- padding: 4px;
- font-size: 11px;
- }
- }
- .icon-more {
- display: inline-block;
- float: right;
- margin-left: 5px;
- margin-top: 1px;
- opacity: 0.4;
- height: 20px;
- width: 32px;
- cursor: pointer;
- }
- .icon-more:hover {
- opacity: 1;
- }
- .popovermenu {
- margin-top: 7px;
- height: 100px;
- width: 100px;
- right: -2px !important;
+#app-content {
+ overflow-x: hidden;
+ #app-content-wrapper {
+ min-height: 95%;
+ .actions.creatable {
+ padding-left: 10px;
+ .bubble {
+ position: relative;
+ width: 185px;
+ @include border-radius(5px);
box-shadow: 0 1px 10px rgba(50, 50, 50, .7);
ul {
- display: block;
- width: 100px;
- height: 75px;
li {
- padding: 0px;
+ padding-left: 10px;
}
.menuitem {
font-size: 12px;
display: inline;
}
}
- .action {
- padding: 10px;
- margin: -10px;
- }
+ }
+ .bubble:after {
+ right: inherit;
+ left: 10px;
+ top: -19px;
}
}
- }
-}
-
-.edit_credential {
- padding-top: 10px;
- label {
- display: block;
- }
- input[type="text"], input[type="password"] {
- width: 100%;
- }
- .tags {
- float: left;
- .tag {
- background-color: rgba(240, 240, 240, .9);
- padding: 4px;
- font-size: 11px;
- }
- }
- .credential_textarea {
- width: 100%;
- height: 100px;
- }
- .password_settings {
- label {
- overflow: hidden;
- input[type="checkbox"] {
- width: auto !important;
- float: left;
- }
- .label {
- &.sm{
- font-size: 12px;
- }
- float: left;
- }
- }
- }
- .custom_fields, .files {
- margin-top: 10px;
- table {
+ .credential-table {
width: 100%;
- thead {
- th {
- color: #fff;
- }
- th.field_actions {
- width: 15%;
- }
+ margin-top: 44px;
+ tr:hover {
+ background-color: darken(#fff, 4%);
}
tr {
- td.field_actions {
- font-size: 13px;
- width: 15%;
- i{
+ &.selected {
+ background-color: #f8f8f8;
+ }
+ td {
+ cursor: pointer;
+ padding: 5px;
+ border-bottom: 1px solid #eeeeee;
+ .label {
+ float: left;
+ }
+ .tags {
+ float: right;
+ .tag {
+ background-color: rgba(240, 240, 240, .9);
+ padding: 4px;
+ font-size: 11px;
+ }
+ }
+ .icon-more {
+ display: inline-block;
+ float: right;
+ margin-left: 5px;
+ margin-top: 1px;
+ opacity: 0.4;
+ height: 20px;
+ width: 32px;
cursor: pointer;
}
- }
- td, th {
- width: 20%;
- padding: 5px;
- .editable-has-buttons.editable-input {
- width: 55%;
+ .icon-more:hover {
+ opacity: 1;
+ }
+ .popovermenu {
+ margin-top: 25px;
+ height: 100px;
+ width: 100px;
+ right: -2px !important;
+ box-shadow: 0 1px 10px rgba(50, 50, 50, .7);
+ ul {
+ display: block;
+ width: 100px;
+ height: 75px;
+ li {
+ padding: 0px;
+ }
+ .menuitem {
+ font-size: 12px;
+ display: inline;
+ }
+ }
+ .action {
+ padding: 10px;
+ margin: -10px;
+ }
}
- }
- td{
- height: 50px;
- vertical-align: middle;
}
}
}
- }
- .file_tab{
- .progress{
- margin-top: 10px;
- height: 10px;
- .progress-bar{
- height: 10px;
- background-image: none;
- background-color: #0082c9;
+
+ .edit_credential {
+ padding-top: 10px;
+ label {
+ display: block;
}
+ input[type="text"], input[type="password"] {
+ width: 100%;
+ }
+ .tags {
+ float: left;
+ .tag {
+ background-color: rgba(240, 240, 240, .9);
+ padding: 4px;
+ font-size: 11px;
+ }
+ }
+ .credential_textarea {
+ width: 100%;
+ height: 100px;
+ }
+ .password_settings {
+ label {
+ overflow: hidden;
+ input[type="checkbox"] {
+ width: auto !important;
+ float: left;
+ }
+ .label {
+ &.sm {
+ font-size: 12px;
+ }
+ float: left;
+ }
+ }
+ }
+ .custom_fields, .files {
+ margin-top: 10px;
+ table {
+ width: 100%;
+ thead {
+ th {
+ color: #fff;
+ }
+ th.field_actions {
+ width: 15%;
+ }
+ }
+ tr {
+ td.field_actions {
+ font-size: 13px;
+ width: 15%;
+ i {
+ cursor: pointer;
+ }
+ }
+ td, th {
+ width: 20%;
+ padding: 5px;
+ .editable-has-buttons.editable-input {
+ width: 55%;
+ }
+ }
+ td {
+ height: 50px;
+ vertical-align: middle;
+ }
+ }
+ }
+ }
+ .file_tab {
+ .progress {
+ margin-top: 10px;
+ height: 10px;
+ .progress-bar {
+ height: 10px;
+ background-image: none;
+ background-color: #0082c9;
+ }
+ }
+ }
+ }
+ .view_pane {
+ -webkit-box-shadow: 0px -4px 3px rgba(150, 150, 150, 0.75);
+ -moz-box-shadow: 0px -4px 3px rgba(150, 150, 150, 0.75);
+ box-shadow: 0px -4px 3px rgba(150, 150, 150, 0.75);
+ padding-top: 10px;
+ .row {
+ margin-left: 0;
+ margin-right: 0;
+ }
+ &.item_selected {
+ height: 20%;
+ display: inline-block;
+ }
+ position: absolute;
+ bottom: 0;
+ background-color: #eee;
+ left: 0;
+ right: 0;
+ display: none;
+ overflow-y: auto;
}
}
}
\ No newline at end of file
diff --git a/templates/main.php b/templates/main.php
index 4cf45317..5d6a3bd8 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -30,6 +30,7 @@ script('passman', 'app/controllers/credential');
script('passman', 'app/controllers/edit_credential');
script('passman', 'app/filters/range');
script('passman', 'app/filters/propsfilter');
+script('passman', 'app/filters/decrypt');
script('passman', 'app/services/cacheservice');
script('passman', 'app/services/vaultservice');
script('passman', 'app/services/credentialservice');
diff --git a/templates/views/edit_credential.html b/templates/views/edit_credential.html
index 54637ca7..c642750b 100644
--- a/templates/views/edit_credential.html
+++ b/templates/views/edit_credential.html
@@ -7,6 +7,8 @@
-
+
diff --git a/templates/views/show_vault.html b/templates/views/show_vault.html
index eabb9e72..95eb3047 100644
--- a/templates/views/show_vault.html
+++ b/templates/views/show_vault.html
@@ -29,8 +29,8 @@
-
+
+
+ Label
+
+
+ {{selectedCredential.label}}
+
+
+
+
+ Account
+
+
+ {{selectedCredential.label}}
+
+
+
+
+ Password
+
+
+ {{selectedCredential.label}}
+
+
+
+
+
+ Files
+
+
+ {{selectedCredential.label}}
+
+
+
+
+ Custom fields
+
+
+ {{selectedCredential.label}}
+
+
+
+
+ Changed
+
+
+ {{selectedCredential.label}}
+
+
+
+
+ Created
+
+
+ {{selectedCredential.label}}
+
+
+
+
+
\ No newline at end of file