refactor
This commit is contained in:
parent
d51c18d96d
commit
f003289816
2 changed files with 4 additions and 4 deletions
|
@ -202,8 +202,8 @@ export class NoteRepository extends Repository<Note> {
|
||||||
|
|
||||||
let text = note.text;
|
let text = note.text;
|
||||||
|
|
||||||
if (note.name && (note.url || note.uri)) {
|
if (note.name && (note.url ?? note.uri)) {
|
||||||
text = `【${note.name}】\n${(note.text || '').trim()}\n\n${note.url || note.uri}`;
|
text = `【${note.name}】\n${(note.text || '').trim()}\n\n${note.url ?? note.uri}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const channel = note.channelId
|
const channel = note.channelId
|
||||||
|
@ -218,7 +218,7 @@ export class NoteRepository extends Repository<Note> {
|
||||||
id: note.id,
|
id: note.id,
|
||||||
createdAt: note.createdAt.toISOString(),
|
createdAt: note.createdAt.toISOString(),
|
||||||
userId: note.userId,
|
userId: note.userId,
|
||||||
user: Users.pack(note.user || note.userId, me, {
|
user: Users.pack(note.user ?? note.userId, me, {
|
||||||
detail: false,
|
detail: false,
|
||||||
}),
|
}),
|
||||||
text: text,
|
text: text,
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="main _gap">
|
<div class="main _gap">
|
||||||
<MkButton v-if="!showNext && hasNext" class="load next" @click="showNext = true"><i class="fas fa-chevron-up"></i></MkButton>
|
<MkButton v-if="!showNext && hasNext" class="load next" @click="showNext = true"><i class="fas fa-chevron-up"></i></MkButton>
|
||||||
<div class="note _gap">
|
<div class="note _gap">
|
||||||
<MkRemoteCaution v-if="note.user.host != null" :href="note.url || note.uri" class="_isolated"/>
|
<MkRemoteCaution v-if="note.user.host != null" :href="note.url ?? note.uri" class="_isolated"/>
|
||||||
<XNoteDetailed :key="note.id" v-model:note="note" class="_isolated note"/>
|
<XNoteDetailed :key="note.id" v-model:note="note" class="_isolated note"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="clips && clips.length > 0" class="_content clips _gap">
|
<div v-if="clips && clips.length > 0" class="_content clips _gap">
|
||||||
|
|
Loading…
Reference in a new issue