refactor: Replace UUID dependency with window.crypto.randomUUID() (#601)

Remove the UUID dependency and replaces it with
the `window.crypto.randomUUID()` method. By utilizing the native browser function,
we eliminate the need for an external library.
This commit is contained in:
Gizmo
2023-07-19 07:09:14 +08:00
committed by GitHub
parent 73247f6e25
commit 0817a1358f
4 changed files with 2 additions and 21 deletions

View File

@@ -13,7 +13,6 @@ import VueLazyload from 'vue-lazyload';
import VueI18n from 'vue-i18n';
import { DataTables } from 'vue-data-tables';
import ElementUI from 'element-ui';
import { v4 as uuidv4 } from 'uuid';
import * as workerTimers from 'worker-timers';
import VueMarkdown from 'vue-markdown';
import 'default-passive-events';
@@ -18548,7 +18547,7 @@ speechSynthesis.getVoices();
tags.push(`~region(jp)`);
}
if (D.accessType !== 'public' && D.accessType !== 'group') {
tags.push(`~nonce(${uuidv4()})`);
tags.push(`~nonce(${window.crypto.randomUUID()})`);
}
if (D.accessType !== 'invite' && D.accessType !== 'friends') {
D.strict = false;