mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 23:08:12 +09:00
chore: formatting
This commit is contained in:
parent
f52a0ee74f
commit
82a4bcd3a8
@ -16,7 +16,7 @@ export default async function renderNote(
|
||||
dive = true,
|
||||
isTalk = false,
|
||||
): Promise<Record<string, unknown>> {
|
||||
note.visibility = note.visibility === "hidden" ? "home" : note.visibility;
|
||||
note.visibility = note.visibility === "hidden" ? "home" : note.visibility;
|
||||
const getPromisedFiles = async (ids: string[]) => {
|
||||
if (!ids || ids.length === 0) return [];
|
||||
const items = await DriveFiles.findBy({ id: In(ids) });
|
||||
|
@ -606,8 +606,7 @@ export default async (
|
||||
});
|
||||
|
||||
async function renderNoteOrRenoteActivity(data: Option, note: Note) {
|
||||
if (data.localOnly ||
|
||||
note.visibility !== "hidden") return null;
|
||||
if (data.localOnly || note.visibility !== "hidden") return null;
|
||||
|
||||
const content =
|
||||
data.renote &&
|
||||
|
@ -144,10 +144,7 @@ export default async (
|
||||
});
|
||||
|
||||
//#region deliver
|
||||
if (
|
||||
Users.isLocalUser(user) &&
|
||||
!note.localOnly
|
||||
) {
|
||||
if (Users.isLocalUser(user) && !note.localOnly) {
|
||||
const content = renderActivity(await renderLike(record, note));
|
||||
const dm = new DeliverManager(user, content);
|
||||
if (note.userHost !== null) {
|
||||
|
@ -35,7 +35,7 @@ const buttonRef = ref<HTMLElement>();
|
||||
|
||||
const canRenote = computed(
|
||||
() =>
|
||||
["public", "home","hidden"].includes(props.note.visibility) ||
|
||||
["public", "home", "hidden"].includes(props.note.visibility) ||
|
||||
props.note.userId === $i.id
|
||||
);
|
||||
|
||||
@ -75,7 +75,10 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
||||
|
||||
let buttonActions = [];
|
||||
|
||||
if (props.note.visibility === "public" || props.note.visibility === "hidden") {
|
||||
if (
|
||||
props.note.visibility === "public" ||
|
||||
props.note.visibility === "hidden"
|
||||
) {
|
||||
buttonActions.push({
|
||||
text: i18n.ts.renote,
|
||||
textStyle: "font-weight: bold",
|
||||
@ -102,7 +105,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
||||
});
|
||||
}
|
||||
|
||||
if (["public", "home","hidden"].includes(props.note.visibility)) {
|
||||
if (["public", "home", "hidden"].includes(props.note.visibility)) {
|
||||
buttonActions.push({
|
||||
text: `${i18n.ts.renote} (${i18n.ts._visibility.home})`,
|
||||
icon: "ph-house ph-bold ph-lg",
|
||||
|
Loading…
Reference in New Issue
Block a user