mirror of
https://github.com/MisskeyIO/misskey
synced 2024-12-01 00:08:24 +09:00
Merge tag '2024.3.1-io.3' into host
This commit is contained in:
commit
bdab5f9f95
@ -16,7 +16,8 @@
|
|||||||
- Enhance: リアクション受け入れが「いいねのみ」の場合はリアクション絵文字一覧を表示しないように
|
- Enhance: リアクション受け入れが「いいねのみ」の場合はリアクション絵文字一覧を表示しないように
|
||||||
- Enhance: 設定>プラグインのページからプラグインの簡易的なログやエラーを見られるように
|
- Enhance: 設定>プラグインのページからプラグインの簡易的なログやエラーを見られるように
|
||||||
- 実装の都合により、プラグインは1つエラーを起こした時に即時停止するようになりました
|
- 実装の都合により、プラグインは1つエラーを起こした時に即時停止するようになりました
|
||||||
- Enhance: ページのデザインを変更
|
- Enhance: ページのデザインを変更
|
||||||
|
- Enhance: 2要素認証(ワンタイムパスワード)の入力欄を改善
|
||||||
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
|
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
|
||||||
- Fix: 周年の実績が閏年を考慮しない問題を修正
|
- Fix: 周年の実績が閏年を考慮しない問題を修正
|
||||||
- Fix: ローカルURLのプレビューポップアップが左上に表示される
|
- Fix: ローカルURLのプレビューポップアップが左上に表示される
|
||||||
|
@ -58,7 +58,7 @@ List of sponsors of Misskey can be found at [Misskey Hub](https://misskey-hub.ne
|
|||||||
## Sponsors of Misskey.io
|
## Sponsors of Misskey.io
|
||||||
|
|
||||||
<div style="display:flex;flex-direction:column;gap:8px 8px;align-items:center;justify-content:center;">
|
<div style="display:flex;flex-direction:column;gap:8px 8px;align-items:center;justify-content:center;">
|
||||||
<a title="Skeb" href="https://skeb.jp/" target="_blank"><img src="https://media.misskeyusercontent.com/misskey-io/sponsors/skeb.svg" alt="Skeb" width="140"></a>
|
<a title="Skeb" href="https://skeb.jp/" target="_blank"><img src="https://media.misskeyusercontent.jp/misskey-io/sponsors/skeb.svg" alt="Skeb" width="140"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Thanks
|
## Thanks
|
||||||
|
@ -1213,7 +1213,7 @@ signupPendingError: "There was a problem verifying the email address. The link m
|
|||||||
cwNotationRequired: "If \"Hide content\" is enabled, a description must be provided."
|
cwNotationRequired: "If \"Hide content\" is enabled, a description must be provided."
|
||||||
doReaction: "Add reaction"
|
doReaction: "Add reaction"
|
||||||
wellKnownWebsites: "Well-known websites"
|
wellKnownWebsites: "Well-known websites"
|
||||||
wellKnownWebsitesDescription: "Separate with spaces for AND, new lines for OR. Surround with slashes for regular expressions. Matching will allow redirection to external sites without a warning."
|
wellKnownWebsitesDescription: "Separate with spaces for AND, new lines for OR. Surround with slashes for regex. Domain names only will match the end of the domain of the URL. If matched, the warning of external links will not be displayed."
|
||||||
warningRedirectingExternalWebsiteTitle: "You are leaving our site!"
|
warningRedirectingExternalWebsiteTitle: "You are leaving our site!"
|
||||||
warningRedirectingExternalWebsiteDescription: "You are about to jump to another site.\nPlease make sure this link is reliable before proceeding.\n\n{url}"
|
warningRedirectingExternalWebsiteDescription: "You are about to jump to another site.\nPlease make sure this link is reliable before proceeding.\n\n{url}"
|
||||||
code: "Code"
|
code: "Code"
|
||||||
|
8
locales/index.d.ts
vendored
8
locales/index.d.ts
vendored
@ -4995,6 +4995,14 @@ export interface Locale extends ILocale {
|
|||||||
* 使用しない場合は空欄にしてください
|
* 使用しない場合は空欄にしてください
|
||||||
*/
|
*/
|
||||||
"notUsePleaseLeaveBlank": string;
|
"notUsePleaseLeaveBlank": string;
|
||||||
|
/**
|
||||||
|
* ワンタイムパスワードを使う
|
||||||
|
*/
|
||||||
|
"useTotp": string;
|
||||||
|
/**
|
||||||
|
* バックアップコードを使う
|
||||||
|
*/
|
||||||
|
"useBackupCode": string;
|
||||||
/**
|
/**
|
||||||
* 通報の種類
|
* 通報の種類
|
||||||
*/
|
*/
|
||||||
|
@ -1212,7 +1212,7 @@ signupPendingError: "メールアドレスの確認中に問題が発生しま
|
|||||||
cwNotationRequired: "「内容を隠す」がオンの場合は注釈の記述が必要です。"
|
cwNotationRequired: "「内容を隠す」がオンの場合は注釈の記述が必要です。"
|
||||||
doReaction: "リアクションする"
|
doReaction: "リアクションする"
|
||||||
wellKnownWebsites: "よく知られたウェブサイト"
|
wellKnownWebsites: "よく知られたウェブサイト"
|
||||||
wellKnownWebsitesDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります。スラッシュで囲むと正規表現になります。一致した場合、外部サイトへのリダイレクトの警告を省略させることができます。"
|
wellKnownWebsitesDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります。スラッシュで囲むと正規表現になります。ドメイン名だけ書くと後方一致になります。一致した場合、外部サイトへのリダイレクトの警告を省略させることができます。"
|
||||||
warningRedirectingExternalWebsiteTitle: "外部サイトへ移動します"
|
warningRedirectingExternalWebsiteTitle: "外部サイトへ移動します"
|
||||||
warningRedirectingExternalWebsiteDescription: "別のサイトにジャンプしようとしています。\nリンク先の安全性を十分に確認した上で進んでください。\n\n{url}"
|
warningRedirectingExternalWebsiteDescription: "別のサイトにジャンプしようとしています。\nリンク先の安全性を十分に確認した上で進んでください。\n\n{url}"
|
||||||
urlPreviewDenyList: "サムネイルの表示を制限するURL"
|
urlPreviewDenyList: "サムネイルの表示を制限するURL"
|
||||||
@ -1244,6 +1244,8 @@ loading: "読み込み中"
|
|||||||
surrender: "やめる"
|
surrender: "やめる"
|
||||||
gameRetry: "リトライ"
|
gameRetry: "リトライ"
|
||||||
notUsePleaseLeaveBlank: "使用しない場合は空欄にしてください"
|
notUsePleaseLeaveBlank: "使用しない場合は空欄にしてください"
|
||||||
|
useTotp: "ワンタイムパスワードを使う"
|
||||||
|
useBackupCode: "バックアップコードを使う"
|
||||||
abuseReportCategory: "通報の種類"
|
abuseReportCategory: "通報の種類"
|
||||||
selectCategory: "カテゴリを選択"
|
selectCategory: "カテゴリを選択"
|
||||||
reportComplete: "通報完了"
|
reportComplete: "通報完了"
|
||||||
|
@ -1210,7 +1210,7 @@ signupPendingError: "메일 주소 확인중에 문제가 발생했습니다.
|
|||||||
cwNotationRequired: "'내용을 숨기기'를 체크한 경우 주석을 써야 합니다."
|
cwNotationRequired: "'내용을 숨기기'를 체크한 경우 주석을 써야 합니다."
|
||||||
doReaction: "리액션 추가"
|
doReaction: "리액션 추가"
|
||||||
wellKnownWebsites: "잘 알려진 웹사이트"
|
wellKnownWebsites: "잘 알려진 웹사이트"
|
||||||
wellKnownWebsitesDescription: "공백으로 구분하면 AND 지정이 되며, 개행으로 구분하면 OR 지정이 됩니다. 슬래시로 둘러싸면 정규 표현식이 됩니다. 일치하는 경우, 외부 사이트로의 리다이렉트 경고를 생략할 수 있습니다."
|
wellKnownWebsitesDescription: "공백으로 구분하면 AND 지정이 되며, 개행으로 구분하면 OR 지정이 됩니다. 슬래시로 둘러싸면 정규 표현식이 됩니다. 도메인명만 쓰면 후방 일치가 됩니다. 일치하는 경우 외부 사이트로의 경고를 생략할 수 있습니다."
|
||||||
warningRedirectingExternalWebsiteTitle: "외부 사이트로 이동합니다"
|
warningRedirectingExternalWebsiteTitle: "외부 사이트로 이동합니다"
|
||||||
warningRedirectingExternalWebsiteDescription: "다른 사이트로 이동하려고 합니다.\n링크가 안전한지 충분히 확인한 후 이동해주세요.\n\n{url}"
|
warningRedirectingExternalWebsiteDescription: "다른 사이트로 이동하려고 합니다.\n링크가 안전한지 충분히 확인한 후 이동해주세요.\n\n{url}"
|
||||||
code: "문자열"
|
code: "문자열"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"version": "2024.3.1-host.2c",
|
"version": "2024.3.1-host.3",
|
||||||
"codename": "nasubi",
|
"codename": "nasubi",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -22,6 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
:autocomplete="autocomplete"
|
:autocomplete="autocomplete"
|
||||||
:autocapitalize="autocapitalize"
|
:autocapitalize="autocapitalize"
|
||||||
:spellcheck="spellcheck"
|
:spellcheck="spellcheck"
|
||||||
|
:inputmode="inputmode"
|
||||||
:step="step"
|
:step="step"
|
||||||
:list="id"
|
:list="id"
|
||||||
:min="min"
|
:min="min"
|
||||||
@ -63,6 +64,7 @@ const props = defineProps<{
|
|||||||
mfmAutocomplete?: boolean | SuggestionType[],
|
mfmAutocomplete?: boolean | SuggestionType[],
|
||||||
autocapitalize?: string;
|
autocapitalize?: string;
|
||||||
spellcheck?: boolean;
|
spellcheck?: boolean;
|
||||||
|
inputmode?: 'none' | 'text' | 'search' | 'email' | 'url' | 'numeric' | 'tel' | 'decimal';
|
||||||
step?: any;
|
step?: any;
|
||||||
datalist?: string[];
|
datalist?: string[];
|
||||||
min?: number;
|
min?: number;
|
||||||
|
@ -161,6 +161,7 @@ import MkNoteSub from '@/components/MkNoteSub.vue';
|
|||||||
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
||||||
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
||||||
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
||||||
|
import MkReactionsViewerDetails from '@/components/MkReactionsViewer.details.vue';
|
||||||
import MkMediaList from '@/components/MkMediaList.vue';
|
import MkMediaList from '@/components/MkMediaList.vue';
|
||||||
import MkCwButton from '@/components/MkCwButton.vue';
|
import MkCwButton from '@/components/MkCwButton.vue';
|
||||||
import MkPoll from '@/components/MkPoll.vue';
|
import MkPoll from '@/components/MkPoll.vue';
|
||||||
@ -175,7 +176,7 @@ import { userPage } from '@/filters/user.js';
|
|||||||
import number from '@/filters/number.js';
|
import number from '@/filters/number.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import * as sound from '@/scripts/sound.js';
|
import * as sound from '@/scripts/sound.js';
|
||||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
import { misskeyApi, misskeyApiGet } from '@/scripts/misskey-api.js';
|
||||||
import { defaultStore, noteViewInterruptors } from '@/store.js';
|
import { defaultStore, noteViewInterruptors } from '@/store.js';
|
||||||
import { reactionPicker } from '@/scripts/reaction-picker.js';
|
import { reactionPicker } from '@/scripts/reaction-picker.js';
|
||||||
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm.js';
|
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm.js';
|
||||||
@ -327,6 +328,28 @@ if (!props.mock) {
|
|||||||
targetElement: renoteButton.value,
|
targetElement: renoteButton.value,
|
||||||
}, {}, 'closed');
|
}, {}, 'closed');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (appearNote.value.reactionAcceptance === 'likeOnly') {
|
||||||
|
useTooltip(reactButton, async (showing) => {
|
||||||
|
const reactions = await misskeyApiGet('notes/reactions', {
|
||||||
|
noteId: appearNote.value.id,
|
||||||
|
limit: 10,
|
||||||
|
_cacheKey_: appearNote.value.reactionCount,
|
||||||
|
});
|
||||||
|
|
||||||
|
const users = reactions.map(x => x.user);
|
||||||
|
|
||||||
|
if (users.length < 1) return;
|
||||||
|
|
||||||
|
os.popup(MkReactionsViewerDetails, {
|
||||||
|
showing,
|
||||||
|
reaction: '❤️',
|
||||||
|
users,
|
||||||
|
count: appearNote.value.reactionCount,
|
||||||
|
targetElement: reactButton.value!,
|
||||||
|
}, {}, 'closed');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function renote(viaKeyboard = false) {
|
function renote(viaKeyboard = false) {
|
||||||
|
@ -201,6 +201,7 @@ import * as Misskey from 'misskey-js';
|
|||||||
import MkNoteSub from '@/components/MkNoteSub.vue';
|
import MkNoteSub from '@/components/MkNoteSub.vue';
|
||||||
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
||||||
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
||||||
|
import MkReactionsViewerDetails from '@/components/MkReactionsViewer.details.vue';
|
||||||
import MkMediaList from '@/components/MkMediaList.vue';
|
import MkMediaList from '@/components/MkMediaList.vue';
|
||||||
import MkCwButton from '@/components/MkCwButton.vue';
|
import MkCwButton from '@/components/MkCwButton.vue';
|
||||||
import MkPoll from '@/components/MkPoll.vue';
|
import MkPoll from '@/components/MkPoll.vue';
|
||||||
@ -213,7 +214,7 @@ import { userPage } from '@/filters/user.js';
|
|||||||
import { notePage } from '@/filters/note.js';
|
import { notePage } from '@/filters/note.js';
|
||||||
import number from '@/filters/number.js';
|
import number from '@/filters/number.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
import { misskeyApi, misskeyApiGet } from '@/scripts/misskey-api.js';
|
||||||
import * as sound from '@/scripts/sound.js';
|
import * as sound from '@/scripts/sound.js';
|
||||||
import { defaultStore, noteViewInterruptors } from '@/store.js';
|
import { defaultStore, noteViewInterruptors } from '@/store.js';
|
||||||
import { reactionPicker } from '@/scripts/reaction-picker.js';
|
import { reactionPicker } from '@/scripts/reaction-picker.js';
|
||||||
@ -352,6 +353,28 @@ useTooltip(renoteButton, async (showing) => {
|
|||||||
}, {}, 'closed');
|
}, {}, 'closed');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (appearNote.value.reactionAcceptance === 'likeOnly') {
|
||||||
|
useTooltip(reactButton, async (showing) => {
|
||||||
|
const reactions = await misskeyApiGet('notes/reactions', {
|
||||||
|
noteId: appearNote.value.id,
|
||||||
|
limit: 10,
|
||||||
|
_cacheKey_: appearNote.value.reactionCount,
|
||||||
|
});
|
||||||
|
|
||||||
|
const users = reactions.map(x => x.user);
|
||||||
|
|
||||||
|
if (users.length < 1) return;
|
||||||
|
|
||||||
|
os.popup(MkReactionsViewerDetails, {
|
||||||
|
showing,
|
||||||
|
reaction: '❤️',
|
||||||
|
users,
|
||||||
|
count: appearNote.value.reactionCount,
|
||||||
|
targetElement: reactButton.value!,
|
||||||
|
}, {}, 'closed');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function renote(viaKeyboard = false) {
|
function renote(viaKeyboard = false) {
|
||||||
pleaseLogin();
|
pleaseLogin();
|
||||||
showMovedDialog();
|
showMovedDialog();
|
||||||
|
@ -19,18 +19,21 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<div style="margin-top: 16px;">{{ i18n.ts.authenticationRequiredToContinue }}</div>
|
<div style="margin-top: 16px;">{{ i18n.ts.authenticationRequiredToContinue }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="_gaps">
|
<form @submit.prevent="done">
|
||||||
<MkInput ref="passwordInput" v-model="password" :placeholder="i18n.ts.password" type="password" autocomplete="current-password webauthn" :withPasswordToggle="true">
|
<div class="_gaps">
|
||||||
<template #prefix><i class="ti ti-password"></i></template>
|
<MkInput ref="passwordInput" v-model="password" :placeholder="i18n.ts.password" type="password" autocomplete="current-password webauthn" required :withPasswordToggle="true">
|
||||||
</MkInput>
|
<template #prefix><i class="ti ti-password"></i></template>
|
||||||
|
</MkInput>
|
||||||
|
|
||||||
<MkInput v-if="$i.twoFactorEnabled" v-model="token" type="text" pattern="^([0-9]{6}|[A-Z0-9]{32})$" autocomplete="one-time-code" :spellcheck="false">
|
<MkInput v-if="$i.twoFactorEnabled" v-model="token" type="text" :pattern="isBackupCode ? '^[A-Z0-9]{32}$' :'^[0-9]{6}$'" autocomplete="one-time-code" required :spellcheck="false" :inputmode="isBackupCode ? undefined : 'numeric'">
|
||||||
<template #label>{{ i18n.ts.token }} ({{ i18n.ts['2fa'] }})</template>
|
<template #label>{{ i18n.ts.token }} ({{ i18n.ts['2fa'] }})</template>
|
||||||
<template #prefix><i class="ti ti-123"></i></template>
|
<template #prefix><i v-if="isBackupCode" class="ti ti-key"></i><i v-else class="ti ti-123"></i></template>
|
||||||
</MkInput>
|
<template #caption><button class="_textButton" type="button" @click="isBackupCode = !isBackupCode">{{ isBackupCode ? i18n.ts.useTotp : i18n.ts.useBackupCode }}</button></template>
|
||||||
|
</MkInput>
|
||||||
|
|
||||||
<MkButton :disabled="(password ?? '') == '' || ($i.twoFactorEnabled && (token ?? '') == '')" primary rounded style="margin: 0 auto;" @click="done"><i class="ti ti-lock-open"></i> {{ i18n.ts.continue }}</MkButton>
|
<MkButton :disabled="(password ?? '') == '' || ($i.twoFactorEnabled && (token ?? '') == '')" type="submit" primary rounded style="margin: 0 auto;"><i class="ti ti-lock-open"></i> {{ i18n.ts.continue }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
</MkModalWindow>
|
</MkModalWindow>
|
||||||
</template>
|
</template>
|
||||||
@ -54,6 +57,7 @@ const emit = defineEmits<{
|
|||||||
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||||
const passwordInput = shallowRef<InstanceType<typeof MkInput>>();
|
const passwordInput = shallowRef<InstanceType<typeof MkInput>>();
|
||||||
const password = ref('');
|
const password = ref('');
|
||||||
|
const isBackupCode = ref(false);
|
||||||
const token = ref<string | null>(null);
|
const token = ref<string | null>(null);
|
||||||
|
|
||||||
function onClose() {
|
function onClose() {
|
||||||
@ -61,7 +65,7 @@ function onClose() {
|
|||||||
if (dialog.value) dialog.value.close();
|
if (dialog.value) dialog.value.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function done(res) {
|
function done() {
|
||||||
emit('done', { password: password.value, token: token.value });
|
emit('done', { password: password.value, token: token.value });
|
||||||
if (dialog.value) dialog.value.close();
|
if (dialog.value) dialog.value.close();
|
||||||
}
|
}
|
||||||
|
@ -31,15 +31,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<div v-if="user && user.securityKeys" class="or-hr">
|
<div v-if="user && user.securityKeys" class="or-hr">
|
||||||
<p class="or-msg">{{ i18n.ts.or }}</p>
|
<p class="or-msg">{{ i18n.ts.or }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="twofa-group totp-group">
|
<div class="twofa-group totp-group _gaps">
|
||||||
<p style="margin-bottom:0;">{{ i18n.ts['2fa'] }}</p>
|
|
||||||
<MkInput v-if="user && user.usePasswordLessLogin" v-model="password" type="password" autocomplete="current-password" :withPasswordToggle="true" required>
|
<MkInput v-if="user && user.usePasswordLessLogin" v-model="password" type="password" autocomplete="current-password" :withPasswordToggle="true" required>
|
||||||
<template #label>{{ i18n.ts.password }}</template>
|
<template #label>{{ i18n.ts.password }}</template>
|
||||||
<template #prefix><i class="ti ti-lock"></i></template>
|
<template #prefix><i class="ti ti-lock"></i></template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-model="token" type="text" pattern="^([0-9]{6}|[A-Z0-9]{32})$" autocomplete="one-time-code" :spellcheck="false" required>
|
<MkInput v-model="token" type="text" :pattern="isBackupCode ? '^[A-Z0-9]{32}$' :'^[0-9]{6}$'" autocomplete="one-time-code" required :spellcheck="false" :inputmode="isBackupCode ? undefined : 'numeric'">
|
||||||
<template #label>{{ i18n.ts.token }}</template>
|
<template #label>{{ i18n.ts.token }} ({{ i18n.ts['2fa'] }})</template>
|
||||||
<template #prefix><i class="ti ti-123"></i></template>
|
<template #prefix><i v-if="isBackupCode" class="ti ti-key"></i><i v-else class="ti ti-123"></i></template>
|
||||||
|
<template #caption><button class="_textButton" type="button" @click="isBackupCode = !isBackupCode">{{ isBackupCode ? i18n.ts.useTotp : i18n.ts.useBackupCode }}</button></template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkButton type="submit" :disabled="signing" large primary rounded style="margin: 0 auto;">{{ signing ? i18n.ts.loggingIn : i18n.ts.login }}</MkButton>
|
<MkButton type="submit" :disabled="signing" large primary rounded style="margin: 0 auto;">{{ signing ? i18n.ts.loggingIn : i18n.ts.login }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
@ -70,6 +70,7 @@ const password = ref('');
|
|||||||
const token = ref('');
|
const token = ref('');
|
||||||
const host = ref(toUnicode(configHost));
|
const host = ref(toUnicode(configHost));
|
||||||
const totpLogin = ref(false);
|
const totpLogin = ref(false);
|
||||||
|
const isBackupCode = ref(false);
|
||||||
const queryingKey = ref(false);
|
const queryingKey = ref(false);
|
||||||
const credentialRequest = ref<CredentialRequestOptions | null>(null);
|
const credentialRequest = ref<CredentialRequestOptions | null>(null);
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<MkSpacer :marginMin="20" :marginMax="28">
|
<MkSpacer :marginMin="20" :marginMax="28">
|
||||||
<div class="_gaps">
|
<div class="_gaps">
|
||||||
<div>{{ i18n.ts._2fa.step3Title }}</div>
|
<div>{{ i18n.ts._2fa.step3Title }}</div>
|
||||||
<MkInput v-model="token" autocomplete="one-time-code"></MkInput>
|
<MkInput v-model="token" autocomplete="one-time-code" inputmode="numeric"></MkInput>
|
||||||
<div>{{ i18n.ts._2fa.step3 }}</div>
|
<div>{{ i18n.ts._2fa.step3 }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="_buttonsCenter" style="margin-top: 16px;">
|
<div class="_buttonsCenter" style="margin-top: 16px;">
|
||||||
|
@ -80,7 +80,7 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
|||||||
import FormSection from '@/components/form/section.vue';
|
import FormSection from '@/components/form/section.vue';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { signinRequired } from '@/account.js';
|
import { signinRequired, updateAccount } from '@/account.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
const $i = signinRequired();
|
const $i = signinRequired();
|
||||||
@ -116,6 +116,10 @@ async function unregisterTOTP(): Promise<void> {
|
|||||||
os.apiWithDialog('i/2fa/unregister', {
|
os.apiWithDialog('i/2fa/unregister', {
|
||||||
password: auth.result.password,
|
password: auth.result.password,
|
||||||
token: auth.result.token,
|
token: auth.result.token,
|
||||||
|
}).then(res => {
|
||||||
|
updateAccount({
|
||||||
|
twoFactorEnabled: false,
|
||||||
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
os.alert({
|
os.alert({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
@ -3,15 +3,18 @@ import { instance } from '@/instance.js';
|
|||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
|
|
||||||
|
const extractDomain = /^(https?:\/\/|\/\/)?([^@/\s]+@)?(www\.)?([^:/\s]+)/i;
|
||||||
const isRegExp = /^\/(.+)\/(.*)$/;
|
const isRegExp = /^\/(.+)\/(.*)$/;
|
||||||
|
|
||||||
export async function warningExternalWebsite(ev: MouseEvent, url: string) {
|
export async function warningExternalWebsite(ev: MouseEvent, url: string) {
|
||||||
const self = url.startsWith(local);
|
const domain = extractDomain.exec(url)?.[4];
|
||||||
|
const self = !domain || url.startsWith(local);
|
||||||
const isWellKnownWebsite = self || instance.wellKnownWebsites.some(expression => {
|
const isWellKnownWebsite = self || instance.wellKnownWebsites.some(expression => {
|
||||||
const r = isRegExp.exec(expression);
|
const r = isRegExp.exec(expression);
|
||||||
if (r) {
|
if (r) {
|
||||||
return new RegExp(r[1], r[2]).test(url);
|
return new RegExp(r[1], r[2]).test(url);
|
||||||
} else return expression.split(' ').every(keyword => url.includes(keyword));
|
} else if (expression.includes(' ')) return expression.split(' ').every(keyword => url.includes(keyword));
|
||||||
|
else return domain.endsWith(expression);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!self && !isWellKnownWebsite) {
|
if (!self && !isWellKnownWebsite) {
|
||||||
@ -21,7 +24,7 @@ export async function warningExternalWebsite(ev: MouseEvent, url: string) {
|
|||||||
const confirm = await os.confirm({
|
const confirm = await os.confirm({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
title: i18n.ts.warningRedirectingExternalWebsiteTitle,
|
title: i18n.ts.warningRedirectingExternalWebsiteTitle,
|
||||||
text: i18n.tsx.warningRedirectingExternalWebsiteDescription({ url }),
|
text: i18n.tsx.warningRedirectingExternalWebsiteDescription({ url: `\`\`\`\n${url}\n\`\`\`` }),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (confirm.canceled) return false;
|
if (confirm.canceled) return false;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"name": "misskey-js",
|
"name": "misskey-js",
|
||||||
"version": "2024.3.1-host.2c",
|
"version": "2024.3.1-host.3",
|
||||||
"description": "Misskey SDK for JavaScript",
|
"description": "Misskey SDK for JavaScript",
|
||||||
"types": "./built/dts/index.d.ts",
|
"types": "./built/dts/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
Loading…
Reference in New Issue
Block a user