Fix: なんかおかしいの

This commit is contained in:
mattyatea 2023-10-21 11:32:09 +09:00
parent bbf1ba6a54
commit 2edbd4eca4
1 changed files with 3 additions and 15 deletions

View File

@ -276,7 +276,6 @@ function smallerVisibility(a: Visibility | string, b: Visibility | string): Visi
}
function renote(viaKeyboard = false) {
if (muted && !hideMutedNotes) return;
pleaseLogin();
showMovedDialog();
@ -289,7 +288,7 @@ function renote(viaKeyboard = false) {
action: () => {
const el = renoteButton.value as HTMLElement | null | undefined;
if (el) {
const rect = el?.getBoundingClientRect();
const rect = el.getBoundingClientRect();
const x = rect.left + (el.offsetWidth / 2);
const y = rect.top + (el.offsetHeight / 2);
os.popup(MkRippleEffect, {x, y}, {}, 'end');
@ -320,7 +319,7 @@ function renote(viaKeyboard = false) {
action: () => {
const el = renoteButton.value as HTMLElement | null | undefined;
if (el) {
const rect = el?.getBoundingClientRect();
const rect = el.getBoundingClientRect();
const x = rect.left + (el.offsetWidth / 2);
const y = rect.top + (el.offsetHeight / 2);
os.popup(MkRippleEffect, {x, y}, {}, 'end');
@ -359,7 +358,6 @@ function renote(viaKeyboard = false) {
}
function reply(viaKeyboard = false): void {
if (muted && !hideMutedNotes) return;
pleaseLogin();
os.post({
reply: appearNote,
@ -371,7 +369,6 @@ function reply(viaKeyboard = false): void {
}
function react(viaKeyboard = false): void {
if (muted && !hideMutedNotes) return;
pleaseLogin();
showMovedDialog();
if (appearNote.reactionAcceptance === 'likeOnly') {
@ -381,7 +378,7 @@ function react(viaKeyboard = false): void {
});
const el = reactButton.value as HTMLElement | null | undefined;
if (el) {
const rect = el?.getBoundingClientRect();
const rect = el.getBoundingClientRect();
const x = rect.left + (el.offsetWidth / 2);
const y = rect.top + (el.offsetHeight / 2);
os.popup(MkRippleEffect, {x, y}, {}, 'end');
@ -403,7 +400,6 @@ function react(viaKeyboard = false): void {
}
function undoReact(note): void {
if (muted && !hideMutedNotes) return;
const oldReaction = note.myReaction;
if (!oldReaction) return;
os.api('notes/reactions/delete', {
@ -412,7 +408,6 @@ function undoReact(note): void {
}
function onContextmenu(ev: MouseEvent): void {
if (muted && !hideMutedNotes) return;
const isLink = (el: HTMLElement) => {
if (el.tagName === 'A') return true;
// Audio
@ -441,7 +436,6 @@ function onContextmenu(ev: MouseEvent): void {
}
function menu(viaKeyboard = false): void {
if (muted && !hideMutedNotes) return;
const {menu, cleanup} = getNoteMenu({
note: note,
translating,
@ -456,7 +450,6 @@ function menu(viaKeyboard = false): void {
}
async function clip() {
if (muted && !hideMutedNotes) return;
os.popupMenu(await getNoteClipMenu({
note: note,
isDeleted,
@ -465,7 +458,6 @@ async function clip() {
}
function showRenoteMenu(viaKeyboard = false): void {
if (muted && !hideMutedNotes) return;
function getUnrenote(): MenuItem {
return {
text: i18n.ts.unrenote,
@ -502,22 +494,18 @@ function showRenoteMenu(viaKeyboard = false): void {
}
function focus() {
if (muted && !hideMutedNotes) return;
el.value.focus();
}
function blur() {
if (muted && !hideMutedNotes) return;
el.value.blur();
}
function focusBefore() {
if (muted && !hideMutedNotes) return;
focusPrev(el.value);
}
function focusAfter() {
if (muted && !hideMutedNotes) return;
focusNext(el.value);
}