1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

Refactored rename of Sites => Logins

This commit is contained in:
Kyle Spearrin
2017-01-03 18:40:07 -05:00
parent fcce60eccd
commit fb486003b5
34 changed files with 601 additions and 601 deletions

View File

@@ -1,11 +1,11 @@
var SiteRequest = function (site) {
this.folderId = site.folderId;
this.name = site.name ? site.name.encryptedString : null;
this.uri = site.uri ? site.uri.encryptedString : null;
this.username = site.username ? site.username.encryptedString : null;
this.password = site.password ? site.password.encryptedString : null;
this.notes = site.notes ? site.notes.encryptedString : null;
this.favorite = site.favorite;
var LoginRequest = function (login) {
this.folderId = login.folderId;
this.name = login.name ? login.name.encryptedString : null;
this.uri = login.uri ? login.uri.encryptedString : null;
this.username = login.username ? login.username.encryptedString : null;
this.password = login.password ? login.password.encryptedString : null;
this.notes = login.notes ? login.notes.encryptedString : null;
this.favorite = login.favorite;
};
var FolderRequest = function (folder) {

View File

@@ -13,7 +13,7 @@ var FolderResponse = function (response) {
this.revisionDate = response.RevisionDate;
};
var SiteResponse = function (response) {
var LoginResponse = function (response) {
this.id = response.Id;
this.folderId = response.FolderId;
this.name = response.Name;

View File

@@ -15,12 +15,12 @@ var FolderData = function (response, userId) {
this.revisionDate = response.revisionDate;
};
var SiteData = function (response, userId) {
var LoginData = function (response, userId) {
this.id = response.id;
this.folderId = response.folderId;
this.userId = userId;
if (response instanceof SiteResponse) {
if (response instanceof LoginResponse) {
this.name = response.name;
this.uri = response.uri;
this.username = response.username;

View File

@@ -11,7 +11,7 @@ var CipherString = function (encryptedString) {
}
};
var Site = function (obj, alreadyEncrypted) {
var Login = function (obj, alreadyEncrypted) {
this.id = obj.id ? obj.id : null;
this.folderId = obj.folderId ? obj.folderId : null;
this.favorite = obj.favorite ? true : false;
@@ -62,7 +62,7 @@ var Folder = function (obj, alreadyEncrypted) {
return deferred.promise;
};
Site.prototype.decrypt = function () {
Login.prototype.decrypt = function () {
var self = this;
var model = {
id: self.id,