chore: use inject instead of prop drilling

This commit is contained in:
anatawa12
2024-03-11 00:18:07 +09:00
parent 386f74c395
commit b4dd14eacf
6 changed files with 13 additions and 23 deletions

View File

@@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div class="detail">
<div>
<Mfm :text="report.comment" :linkBehavior="'window'"/>
<Mfm :text="report.comment"/>
</div>
<hr/>
<div>{{ i18n.ts.reporter }}: <MkA :to="`/admin/user/${report.reporter.id}`" class="_link" :behavior="'window'">@{{ report.reporter.username }}</MkA></div>
@@ -41,13 +41,16 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { provide, ref } from 'vue';
import MkButton from '@/components/MkButton.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import MkKeyValue from '@/components/MkKeyValue.vue';
import * as os from '@/os.js';
import { i18n } from '@/i18n.js';
import { dateString } from '@/filters/date.js';
import { MkABehavior } from '@/components/global/MkA.vue';
provide<MkABehavior>('linkBehaviour', 'window');
const props = defineProps<{
report: any;