mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
bug fix + added launch time to view component (#178)
This commit is contained in:
@@ -196,11 +196,15 @@ export class ViewComponent implements OnDestroy, OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
launch(uri: LoginUriView) {
|
launch(uri: LoginUriView, cipherId?: string) {
|
||||||
if (!uri.canLaunch) {
|
if (!uri.canLaunch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cipherId) {
|
||||||
|
this.cipherService.updateLastLaunchedDate(cipherId);
|
||||||
|
}
|
||||||
|
|
||||||
this.platformUtilsService.eventTrack('Launched Login URI');
|
this.platformUtilsService.eventTrack('Launched Login URI');
|
||||||
this.platformUtilsService.launchUri(uri.launchUri);
|
this.platformUtilsService.launchUri(uri.launchUri);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ class Ciphers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getLastLaunched() {
|
getLastLaunched() {
|
||||||
const sortedCiphers = this.ciphers.sort((x, y) => y.localData?.lastLaunched?.valueOf() - x.localData?.lastLaunched?.valueOf());
|
const usedCiphers = this.ciphers.filter(cipher => cipher.localData?.lastLaunched)
|
||||||
|
const sortedCiphers = usedCiphers.sort((x, y) => y.localData.lastLaunched.valueOf() - x.localData.lastLaunched.valueOf());
|
||||||
return sortedCiphers[0];
|
return sortedCiphers[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user