mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
refactor utils service to utils
This commit is contained in:
@@ -5,7 +5,6 @@ import { LoginUriView } from 'jslib/models/view/loginUriView';
|
||||
import { LoginView } from 'jslib/models/view/loginView';
|
||||
|
||||
import { ConstantsService } from 'jslib/services/constants.service';
|
||||
import { UtilsService } from 'jslib/services/utils.service';
|
||||
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
|
||||
@@ -23,6 +22,8 @@ import MainBackground from './main.background';
|
||||
import { AutofillService } from '../services/abstractions/autofill.service';
|
||||
import BrowserPlatformUtilsService from '../services/browserPlatformUtils.service';
|
||||
|
||||
import { Utils } from 'jslib/misc/utils';
|
||||
|
||||
export default class RuntimeBackground {
|
||||
private runtime: any;
|
||||
private autofillTimeout: any;
|
||||
@@ -200,7 +201,7 @@ export default class RuntimeBackground {
|
||||
loginModel.username = loginInfo.username;
|
||||
loginModel.password = loginInfo.password;
|
||||
const model = new CipherView();
|
||||
model.name = UtilsService.getHostname(loginInfo.uri) || loginInfo.domain;
|
||||
model.name = Utils.getHostname(loginInfo.uri) || loginInfo.domain;
|
||||
model.type = CipherType.Login;
|
||||
model.login = loginModel;
|
||||
|
||||
@@ -228,7 +229,7 @@ export default class RuntimeBackground {
|
||||
}
|
||||
|
||||
this.main.loginsToAdd.splice(i, 1);
|
||||
const hostname = UtilsService.getHostname(tab.url);
|
||||
const hostname = Utils.getHostname(tab.url);
|
||||
await this.cipherService.saveNeverDomain(hostname);
|
||||
BrowserApi.tabSendMessageData(tab, 'closeNotificationBar');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user