Skip to content

Commit

Permalink
Merge pull request #1 from CyberRex0/misskey-dev-misskey-pr-11938
Browse files Browse the repository at this point in the history
差分表示をできるように
  • Loading branch information
GrapeApple0 authored Oct 1, 2023
2 parents 5d9d5b6 + 95c655e commit 3579169
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions packages/frontend/src/components/MkNoteDetailed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,20 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div v-else-if="tab === 'history'" :class="$style.tab_history">
<div style="display: grid;">
<div v-for="text in appearNote.noteEditHistory" :class="$style.historyRoot" :key="text">
<div v-for="(text, index) in appearNote.noteEditHistory" :key="text" :class="$style.historyRoot">
<MkAvatar :class="$style.avatar" :user="appearNote.user" link preview/>
<div :class="$style.historyMain">
<div :class="$style.historyHeader">
<MkUserName :user="appearNote.user" :nowrap="true"/>
</div>
<div>
<div>
<Mfm :text="text.trim()" :author="appearNote.user" :i="$i"/>
</div>
<CodeDiff
:oldString="appearNote.noteEditHistory[index - 1] || ''"
:newString="text"
:trim="true"
:hideHeader="true"
diffStyle="char"
/>
</div>
</div>
</div>
Expand All @@ -205,7 +209,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>

<script lang="ts" setup>
import { computed, inject, onMounted, ref, shallowRef } from 'vue';
import { computed, inject, onMounted, onUnmounted, ref, shallowRef } from 'vue';
import * as mfm from 'mfm-js';
import * as Misskey from 'misskey-js';
import MkNoteSub from '@/components/MkNoteSub.vue';
Expand Down Expand Up @@ -240,6 +244,7 @@ import MkUserCardMini from '@/components/MkUserCardMini.vue';
import MkPagination, { Paging } from '@/components/MkPagination.vue';
import MkReactionIcon from '@/components/MkReactionIcon.vue';
import MkButton from '@/components/MkButton.vue';
import { CodeDiff } from 'v-code-diff';

const props = defineProps<{
note: Misskey.entities.Note;
Expand Down
3 changes: 2 additions & 1 deletion packages/misskey-js/etc/misskey-js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2644,6 +2644,7 @@ type Note = {
id: ID;
createdAt: DateString;
updatedAt?: DateString | null;
noteEditHistory: string[];
text: string | null;
cw: string | null;
user: User;
Expand Down Expand Up @@ -2983,7 +2984,7 @@ type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+u
// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts
// src/api.types.ts:631:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
// src/entities.ts:107:2 - (ae-forgotten-export) The symbol "notificationTypes_2" needs to be exported by the entry point index.d.ts
// src/entities.ts:595:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
// src/entities.ts:596:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
// src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)
Expand Down

0 comments on commit 3579169

Please sign in to comment.