mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 14:10:53 +03:00
implemented amplitude metrics (#1141)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { isFile } from './utils';
|
||||
import { arrayToB64, isFile } from './utils';
|
||||
import OwnedFile from './ownedFile';
|
||||
|
||||
class Mem {
|
||||
@@ -58,6 +58,15 @@ class Storage {
|
||||
return fs;
|
||||
}
|
||||
|
||||
get id() {
|
||||
let id = this.engine.getItem('device_id');
|
||||
if (!id) {
|
||||
id = arrayToB64(crypto.getRandomValues(new Uint8Array(16)));
|
||||
this.engine.setItem('device_id', id);
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
get totalDownloads() {
|
||||
return Number(this.engine.getItem('totalDownloads'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user