mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-20 01:15:29 +02:00
fix(frontend): ログインダイアログが表示されたあとの処理がおかしくなる問題を修正 (#17038)
* fix(frontend): ログインダイアログが表示されたあとの処理がおかしくなる問題を修正 * Update Changelog
This commit is contained in:
@@ -81,7 +81,13 @@ function onFollowChange(user: Misskey.entities.UserDetailed) {
|
||||
}
|
||||
|
||||
async function onClick() {
|
||||
pleaseLogin({ openOnRemote: { type: 'web', path: `/@${props.user.username}@${props.user.host ?? host}` } });
|
||||
const isLoggedIn = await pleaseLogin({
|
||||
openOnRemote: {
|
||||
type: 'web',
|
||||
path: `/@${props.user.username}@${props.user.host ?? host}`,
|
||||
},
|
||||
});
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
wait.value = true;
|
||||
|
||||
|
||||
@@ -468,8 +468,12 @@ if (!props.mock) {
|
||||
}
|
||||
}
|
||||
|
||||
function renote() {
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
async function renote() {
|
||||
if (props.mock) return;
|
||||
|
||||
const isLoggedIn = await pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
showMovedDialog();
|
||||
|
||||
const { menu } = getRenoteMenu({ note: note, renoteButton, mock: props.mock });
|
||||
@@ -478,11 +482,12 @@ function renote() {
|
||||
subscribeManuallyToNoteCapture();
|
||||
}
|
||||
|
||||
function reply(): void {
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (props.mock) {
|
||||
return;
|
||||
}
|
||||
async function reply() {
|
||||
if (props.mock) return;
|
||||
|
||||
const isLoggedIn = await pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
os.post({
|
||||
reply: appearNote,
|
||||
channel: appearNote.channel,
|
||||
@@ -491,8 +496,10 @@ function reply(): void {
|
||||
});
|
||||
}
|
||||
|
||||
function react(): void {
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
async function react() {
|
||||
const isLoggedIn = await pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
showMovedDialog();
|
||||
if (appearNote.reactionAcceptance === 'likeOnly') {
|
||||
sound.playMisskeySfx('reaction');
|
||||
@@ -621,10 +628,12 @@ async function clip(): Promise<void> {
|
||||
os.popupMenu(await getNoteClipMenu({ note: note, currentClip: currentClip?.value }), clipButton.value).then(focus);
|
||||
}
|
||||
|
||||
function showRenoteMenu(): void {
|
||||
async function showRenoteMenu() {
|
||||
if (props.mock) {
|
||||
return;
|
||||
}
|
||||
const isLoggedIn = await pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
function getUnrenote(): MenuItem {
|
||||
return {
|
||||
@@ -649,7 +658,6 @@ function showRenoteMenu(): void {
|
||||
};
|
||||
|
||||
if (isMyRenote) {
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
os.popupMenu([
|
||||
renoteDetailsMenu,
|
||||
getCopyNoteLinkMenu(note, i18n.ts.copyLinkRenote),
|
||||
|
||||
@@ -448,8 +448,10 @@ if (appearNote.reactionAcceptance === 'likeOnly') {
|
||||
});
|
||||
}
|
||||
|
||||
function renote() {
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
async function renote() {
|
||||
const isLoggedIn = await pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
showMovedDialog();
|
||||
|
||||
const { menu } = getRenoteMenu({ note: note, renoteButton });
|
||||
@@ -459,8 +461,10 @@ function renote() {
|
||||
subscribeManuallyToNoteCapture();
|
||||
}
|
||||
|
||||
function reply(): void {
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
async function reply() {
|
||||
const isLoggedIn = await pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
showMovedDialog();
|
||||
os.post({
|
||||
reply: appearNote,
|
||||
@@ -470,8 +474,10 @@ function reply(): void {
|
||||
});
|
||||
}
|
||||
|
||||
function react(): void {
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
async function react() {
|
||||
const isLoggedIn = await pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
showMovedDialog();
|
||||
if (appearNote.reactionAcceptance === 'likeOnly') {
|
||||
sound.playMisskeySfx('reaction');
|
||||
@@ -569,9 +575,12 @@ async function clip(): Promise<void> {
|
||||
os.popupMenu(await getNoteClipMenu({ note: note }), clipButton.value).then(focus);
|
||||
}
|
||||
|
||||
function showRenoteMenu(): void {
|
||||
async function showRenoteMenu() {
|
||||
if (!isMyRenote) return;
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
|
||||
const isLoggedIn = await pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
os.popupMenu([{
|
||||
text: i18n.ts.unrenote,
|
||||
icon: 'ti ti-trash',
|
||||
|
||||
@@ -90,7 +90,8 @@ const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||
const vote = async (id: number) => {
|
||||
if (props.readOnly || closed.value || isVoted.value) return;
|
||||
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
const isLoggedIn = await pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
if (!isLoggedIn) return;
|
||||
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'question',
|
||||
|
||||
Reference in New Issue
Block a user