mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-14 20:01:31 +01:00
proper typings
This commit is contained in:
parent
020520729c
commit
d9fb4f2d67
@ -1,5 +1,8 @@
|
|||||||
import { CipherType } from 'jslib/enums';
|
import { CipherType } from 'jslib/enums';
|
||||||
|
|
||||||
|
import { CipherView } from 'jslib/models/view/cipherView';
|
||||||
|
import { LoginView } from 'jslib/models/view/loginView';
|
||||||
|
|
||||||
import { ConstantsService } from 'jslib/services/constants.service';
|
import { ConstantsService } from 'jslib/services/constants.service';
|
||||||
import { UtilsService } from 'jslib/services/utils.service';
|
import { UtilsService } from 'jslib/services/utils.service';
|
||||||
|
|
||||||
@ -176,20 +179,16 @@ export default class RuntimeBackground {
|
|||||||
|
|
||||||
this.main.loginsToAdd.splice(i, 1);
|
this.main.loginsToAdd.splice(i, 1);
|
||||||
|
|
||||||
const cipher = await this.cipherService.encrypt({
|
const loginModel = new LoginView();
|
||||||
id: null,
|
loginModel.uri = loginInfo.uri;
|
||||||
folderId: null,
|
loginModel.username = loginInfo.username;
|
||||||
favorite: false,
|
loginModel.password = loginInfo.password;
|
||||||
name: loginInfo.name,
|
const model = new CipherView();
|
||||||
notes: null,
|
model.name = loginInfo.name;
|
||||||
type: CipherType.Login,
|
model.type = CipherType.Login;
|
||||||
login: {
|
model.login = loginModel;
|
||||||
uri: loginInfo.uri,
|
|
||||||
username: loginInfo.username,
|
|
||||||
password: loginInfo.password,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
|
const cipher = await this.cipherService.encrypt(model);
|
||||||
await this.cipherService.saveWithServer(cipher);
|
await this.cipherService.saveWithServer(cipher);
|
||||||
this.analytics.ga('send', {
|
this.analytics.ga('send', {
|
||||||
hitType: 'event',
|
hitType: 'event',
|
||||||
|
@ -158,7 +158,7 @@ export class SettingsController {
|
|||||||
|
|
||||||
rate() {
|
rate() {
|
||||||
this.$analytics.eventTrack('Rate Extension');
|
this.$analytics.eventTrack('Rate Extension');
|
||||||
BrowserApi.createNewTab(RateUrls[this.platformUtilsService.getDevice()]);
|
BrowserApi.createNewTab((RateUrls as any)[this.platformUtilsService.getDevice()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user