mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 00:55:48 +01:00
upd: add locale for quoted, add toasts and effects
This commit is contained in:
parent
704b93f7d6
commit
26cd12f7bf
6 changed files with 64 additions and 1 deletions
|
@ -108,6 +108,7 @@ enterEmoji: "Enter an emoji"
|
||||||
renote: "Boost"
|
renote: "Boost"
|
||||||
unrenote: "Remove boost"
|
unrenote: "Remove boost"
|
||||||
renoted: "Boosted."
|
renoted: "Boosted."
|
||||||
|
quoted: "Quoted."
|
||||||
rmquote: "Removed quote."
|
rmquote: "Removed quote."
|
||||||
rmboost: "Unboosted."
|
rmboost: "Unboosted."
|
||||||
cantRenote: "This post can't be boosted."
|
cantRenote: "This post can't be boosted."
|
||||||
|
|
1
locales/index.d.ts
vendored
1
locales/index.d.ts
vendored
|
@ -111,6 +111,7 @@ export interface Locale {
|
||||||
"renote": string;
|
"renote": string;
|
||||||
"unrenote": string;
|
"unrenote": string;
|
||||||
"renoted": string;
|
"renoted": string;
|
||||||
|
"quoted": string;
|
||||||
"rmboost": string;
|
"rmboost": string;
|
||||||
"rmquote": string;
|
"rmquote": string;
|
||||||
"cantRenote": string;
|
"cantRenote": string;
|
||||||
|
|
|
@ -107,7 +107,8 @@ followRequestPending: "フォロー許可待ち"
|
||||||
enterEmoji: "絵文字を入力"
|
enterEmoji: "絵文字を入力"
|
||||||
renote: "リノート"
|
renote: "リノート"
|
||||||
unrenote: "リノート解除"
|
unrenote: "リノート解除"
|
||||||
renoted: "ブースト"
|
renoted: "ブースト。"
|
||||||
|
quoted: "引用。"
|
||||||
rmboost: "アンブースト。"
|
rmboost: "アンブースト。"
|
||||||
rmquote: "引用を削除しました。"
|
rmquote: "引用を削除しました。"
|
||||||
cantRenote: "この投稿はリノートできません。"
|
cantRenote: "この投稿はリノートできません。"
|
||||||
|
|
|
@ -406,6 +406,7 @@ function quote() {
|
||||||
}
|
}
|
||||||
|
|
||||||
quoted.value = res.length > 0;
|
quoted.value = res.length > 0;
|
||||||
|
os.toast(i18n.ts.quoted);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -427,6 +428,7 @@ function quote() {
|
||||||
}
|
}
|
||||||
|
|
||||||
quoted.value = res.length > 0;
|
quoted.value = res.length > 0;
|
||||||
|
os.toast(i18n.ts.quoted);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -502,7 +504,16 @@ function undoRenote(note) : void {
|
||||||
os.api("notes/unrenote", {
|
os.api("notes/unrenote", {
|
||||||
noteId: note.id
|
noteId: note.id
|
||||||
});
|
});
|
||||||
|
os.toast(i18n.ts.rmboost);
|
||||||
renoted.value = false;
|
renoted.value = false;
|
||||||
|
|
||||||
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
||||||
|
if (el) {
|
||||||
|
const rect = el.getBoundingClientRect();
|
||||||
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
const y = rect.top + (el.offsetHeight / 2);
|
||||||
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function undoQuote(note) : void {
|
function undoQuote(note) : void {
|
||||||
|
@ -510,7 +521,16 @@ function undoQuote(note) : void {
|
||||||
noteId: note.id,
|
noteId: note.id,
|
||||||
quote: true
|
quote: true
|
||||||
});
|
});
|
||||||
|
os.toast(i18n.ts.rmquote);
|
||||||
quoted.value = false;
|
quoted.value = false;
|
||||||
|
|
||||||
|
const el = quoteButton.value as HTMLElement | null | undefined;
|
||||||
|
if (el) {
|
||||||
|
const rect = el.getBoundingClientRect();
|
||||||
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
const y = rect.top + (el.offsetHeight / 2);
|
||||||
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onContextmenu(ev: MouseEvent): void {
|
function onContextmenu(ev: MouseEvent): void {
|
||||||
|
|
|
@ -450,6 +450,7 @@ function quote() {
|
||||||
}
|
}
|
||||||
|
|
||||||
quoted.value = res.length > 0;
|
quoted.value = res.length > 0;
|
||||||
|
os.toast(i18n.ts.quoted);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -471,6 +472,7 @@ function quote() {
|
||||||
}
|
}
|
||||||
|
|
||||||
quoted.value = res.length > 0;
|
quoted.value = res.length > 0;
|
||||||
|
os.toast(i18n.ts.quoted);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -548,7 +550,16 @@ function undoRenote() : void {
|
||||||
os.api("notes/unrenote", {
|
os.api("notes/unrenote", {
|
||||||
noteId: appearNote.id,
|
noteId: appearNote.id,
|
||||||
});
|
});
|
||||||
|
os.toast(i18n.ts.rmboost);
|
||||||
renoted.value = false;
|
renoted.value = false;
|
||||||
|
|
||||||
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
||||||
|
if (el) {
|
||||||
|
const rect = el.getBoundingClientRect();
|
||||||
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
const y = rect.top + (el.offsetHeight / 2);
|
||||||
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function undoQuote() : void {
|
function undoQuote() : void {
|
||||||
|
@ -556,7 +567,16 @@ function undoQuote() : void {
|
||||||
noteId: appearNote.id,
|
noteId: appearNote.id,
|
||||||
quote: true
|
quote: true
|
||||||
});
|
});
|
||||||
|
os.toast(i18n.ts.rmquote);
|
||||||
quoted.value = false;
|
quoted.value = false;
|
||||||
|
|
||||||
|
const el = quoteButton.value as HTMLElement | null | undefined;
|
||||||
|
if (el) {
|
||||||
|
const rect = el.getBoundingClientRect();
|
||||||
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
const y = rect.top + (el.offsetHeight / 2);
|
||||||
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onContextmenu(ev: MouseEvent): void {
|
function onContextmenu(ev: MouseEvent): void {
|
||||||
|
|
|
@ -241,7 +241,16 @@ function undoRenote() : void {
|
||||||
os.api("notes/unrenote", {
|
os.api("notes/unrenote", {
|
||||||
noteId: appearNote.id,
|
noteId: appearNote.id,
|
||||||
});
|
});
|
||||||
|
os.toast(i18n.ts.rmboost);
|
||||||
renoted.value = false;
|
renoted.value = false;
|
||||||
|
|
||||||
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
||||||
|
if (el) {
|
||||||
|
const rect = el.getBoundingClientRect();
|
||||||
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
const y = rect.top + (el.offsetHeight / 2);
|
||||||
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function undoQuote() : void {
|
function undoQuote() : void {
|
||||||
|
@ -249,7 +258,16 @@ function undoQuote() : void {
|
||||||
noteId: appearNote.id,
|
noteId: appearNote.id,
|
||||||
quote: true
|
quote: true
|
||||||
});
|
});
|
||||||
|
os.toast(i18n.ts.rmquote);
|
||||||
quoted.value = false;
|
quoted.value = false;
|
||||||
|
|
||||||
|
const el = quoteButton.value as HTMLElement | null | undefined;
|
||||||
|
if (el) {
|
||||||
|
const rect = el.getBoundingClientRect();
|
||||||
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
const y = rect.top + (el.offsetHeight / 2);
|
||||||
|
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let showContent = $ref(false);
|
let showContent = $ref(false);
|
||||||
|
@ -317,6 +335,7 @@ function quote() {
|
||||||
}
|
}
|
||||||
|
|
||||||
quoted.value = res.length > 0;
|
quoted.value = res.length > 0;
|
||||||
|
os.toast(i18n.ts.quoted);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -338,6 +357,7 @@ function quote() {
|
||||||
}
|
}
|
||||||
|
|
||||||
quoted.value = res.length > 0;
|
quoted.value = res.length > 0;
|
||||||
|
os.toast(i18n.ts.quoted);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue