+
diff --git a/packages/frontend/src/filters/user.ts b/packages/frontend/src/filters/user.ts
index e0f1d3b78..a8e697699 100644
--- a/packages/frontend/src/filters/user.ts
+++ b/packages/frontend/src/filters/user.ts
@@ -3,15 +3,15 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-import * as misskey from 'misskey-js';
-import * as Acct from 'misskey-js/built/acct';
+import * as Misskey from 'misskey-js';
+import * as Misskey from 'misskey-js';
import { url } from '@/config';
export const acct = (user: misskey.Acct) => {
- return Acct.toString(user);
+ return Misskey.acct.toString(user);
};
-export const userName = (user: misskey.entities.User) => {
+export const userName = (user: Misskey.entities.User) => {
return user.name || user.username;
};
diff --git a/packages/frontend/src/local-storage.ts b/packages/frontend/src/local-storage.ts
index d9dce2859..0d73885b6 100644
--- a/packages/frontend/src/local-storage.ts
+++ b/packages/frontend/src/local-storage.ts
@@ -41,4 +41,12 @@ export const miLocalStorage = {
getItem: (key: Keys): string | null => window.localStorage.getItem(key),
setItem: (key: Keys, value: string): void => window.localStorage.setItem(key, value),
removeItem: (key: Keys): void => window.localStorage.removeItem(key),
+ getItemAsJson: (key: Keys): any | undefined => {
+ const item = miLocalStorage.getItem(key);
+ if (item === null) {
+ return undefined;
+ }
+ return JSON.parse(item);
+ },
+ setItemAsJson: (key: Keys, value: any): void => window.localStorage.setItem(key, JSON.stringify(value)),
};
diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts
index 2e80e3d8d..ede13e2a7 100644
--- a/packages/frontend/src/os.ts
+++ b/packages/frontend/src/os.ts
@@ -24,7 +24,6 @@ import MkContextMenu from '@/components/MkContextMenu.vue';
import { MenuItem } from '@/types/menu';
import copyToClipboard from './scripts/copy-to-clipboard';
import { showMovedDialog } from './scripts/show-moved-dialog';
-import { DriveFile } from 'misskey-js/built/entities';
export const openingWindowsCount = ref(0);
@@ -420,7 +419,7 @@ export async function selectUser(opts: { includeSelf?: boolean } = {}) {
});
}
-export async function selectDriveFile(multiple: boolean): Promise
{
+export async function selectDriveFile(multiple: boolean): Promise {
return new Promise((resolve, reject) => {
popup(defineAsyncComponent(() => import('@/components/MkDriveSelectDialog.vue')), {
type: 'file',
diff --git a/packages/frontend/src/pages/_error_.vue b/packages/frontend/src/pages/_error_.vue
index efc0244dc..8a5555d45 100644
--- a/packages/frontend/src/pages/_error_.vue
+++ b/packages/frontend/src/pages/_error_.vue
@@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+
diff --git a/packages/frontend/src/pages/scratchpad.vue b/packages/frontend/src/pages/scratchpad.vue
index ec251c664..6d68a26c3 100644
--- a/packages/frontend/src/pages/scratchpad.vue
+++ b/packages/frontend/src/pages/scratchpad.vue
@@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -175,6 +175,14 @@ definePageMetadata({
position: relative;
}
+.code {
+ background: #2d2d2d;
+ color: #ccc;
+ font-size: 14px;
+ line-height: 1.5;
+ padding: 5px;
+}
+
.ui {
padding: 32px;
}
diff --git a/packages/frontend/src/pages/settings/2fa.qrdialog.vue b/packages/frontend/src/pages/settings/2fa.qrdialog.vue
index 245d3e79e..993f756fc 100644
--- a/packages/frontend/src/pages/settings/2fa.qrdialog.vue
+++ b/packages/frontend/src/pages/settings/2fa.qrdialog.vue
@@ -4,45 +4,110 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
-
-
-
- Authy
+ {{ i18n.ts.setupOf2fa }}
+
+
+
+
+
+
+
+
+
+ Authy
+
+
+ Google Authenticator
+
+
+
{{ i18n.ts._2fa.step2 }}
{{ i18n.ts._2fa.step2Click }}
+
+
+ {{ i18n.ts._2fa.step2Uri }}
+ {{ twoFactorData.url }}
+
+
+
+ {{ i18n.ts.cancel }}
+ {{ i18n.ts.continue }}
+
+
+
-
- Google Authenticator
+
+
+
+
+
{{ i18n.ts._2fa.step3Title }}
+
+
{{ i18n.ts._2fa.step3 }}
+
+
+ {{ i18n.ts.goBack }}
+ {{ i18n.ts.continue }}
+
+
+
-
-
- {{ i18n.ts._2fa.step2 }}
- {{ i18n.ts._2fa.step2Click }}
-
-
-
- {{ i18n.ts._2fa.step2Url }}
- {{ twoFactorData.url }}
-
-
- {{ i18n.ts.next }}
- {{ i18n.ts.cancel }}
-
+
+
+
+
+
{{ i18n.ts._2fa.setupCompleted }}🎉
+
{{ i18n.ts._2fa.step4 }}
+
{{ i18n.ts._2fa.checkBackupCodesBeforeCloseThisWizard }}
+
+
+
+ {{ i18n.ts._2fa.backupCodes }}
+
+
+
{{ i18n.ts._2fa.backupCodesDescription }}
+
+
+
+ #{{ i + 1 }}
+ {{ code }}
+
+
+
+
+
+
+ {{ i18n.ts.done }}
+
+
+
+
+
-
+
diff --git a/packages/frontend/src/pages/settings/2fa.vue b/packages/frontend/src/pages/settings/2fa.vue
index d2998ceae..965fd1a50 100644
--- a/packages/frontend/src/pages/settings/2fa.vue
+++ b/packages/frontend/src/pages/settings/2fa.vue
@@ -8,20 +8,29 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts['2fa'] }}
-
+
+ {{ i18n.ts._2fa.backupCodeUsedWarning }}
+
+
+ {{ i18n.ts._2fa.backupCodesExhaustedWarning }}
+
+
+
{{ i18n.ts.totp }}
{{ i18n.ts.totpDescription }}
+
+
{{ i18n.ts._2fa.renewTOTP }}
{{ i18n.ts._2fa.whyTOTPOnlyRenew }}
-
{{ i18n.ts.unregister }}
+
{{ i18n.ts.unregister }}
- {{ i18n.ts._2fa.registerTOTP }}
+ {{ i18n.ts._2fa.registerTOTP }}
@@ -29,16 +38,14 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.securityKeyAndPasskey }}
- {{ i18n.ts._2fa.securityKeyInfo }}
-
- {{ i18n.ts._2fa.chromePasskeyNotSupported }}
+ {{ i18n.ts._2fa.securityKeyInfo }}
-
+
{{ i18n.ts._2fa.securityKeyNotSupported }}
-
+
{{ i18n.ts._2fa.registerTOTPBeforeKey }}
@@ -66,8 +73,7 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/pages/user/clips.vue b/packages/frontend/src/pages/user/clips.vue
index 753662843..eaae47251 100644
--- a/packages/frontend/src/pages/user/clips.vue
+++ b/packages/frontend/src/pages/user/clips.vue
@@ -18,11 +18,11 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/ui/_common_/statusbar-federation.vue b/packages/frontend/src/ui/_common_/statusbar-federation.vue
index 5f3feb039..34abb142e 100644
--- a/packages/frontend/src/ui/_common_/statusbar-federation.vue
+++ b/packages/frontend/src/ui/_common_/statusbar-federation.vue
@@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only