mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-19 07:45:40 +02:00
enhance(frontend): お問い合わせページからデバイス情報を出力できるように (#16598)
* enhance(frontend): デバイス情報を出力できるように
* fix lint
* Update Changelog
* enhance: getHighEntropyValuesが使用できなかった場合のフォールバックを追加
* fix lint
* fix: getHighEntropyValuesが使用できない場合は生のUAを返すように
* enhance: getHighEntropyValuesが使用できる場合でも生のUAを含めるように
* ✌️
* onHeaderClicked -> onOpened
This commit is contained in:
@@ -28,17 +28,37 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<span v-else style="opacity: 0.7;">({{ i18n.ts.none }})</span>
|
||||
</template>
|
||||
</MkKeyValue>
|
||||
<MkFolder @opened="onOpened">
|
||||
<template #icon><i class="ti ti-report-search"></i></template>
|
||||
<template #label>{{ i18n.ts.deviceInfo }}</template>
|
||||
<template #caption>{{ i18n.ts.deviceInfoDescription }}</template>
|
||||
<MkLoading v-if="userEnv == null" />
|
||||
<MkCode v-else lang="json" :code="JSON.stringify(userEnv, null, 2)" style="max-height: 300px; overflow: auto;"/>
|
||||
</MkFolder>
|
||||
</div>
|
||||
</div>
|
||||
</PageWithHeader>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { definePage } from '@/page.js';
|
||||
import { getUserEnvironment } from '@/utility/get-user-environment.js';
|
||||
import type { UserEnvironment } from '@/utility/get-user-environment.js';
|
||||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkLink from '@/components/MkLink.vue';
|
||||
import MkCode from '@/components/MkCode.vue';
|
||||
|
||||
const userEnv = ref<UserEnvironment | null>(null);
|
||||
|
||||
async function onOpened() {
|
||||
if (userEnv.value == null) {
|
||||
userEnv.value = await getUserEnvironment();
|
||||
}
|
||||
}
|
||||
|
||||
definePage(() => ({
|
||||
title: i18n.ts.inquiry,
|
||||
|
||||
Reference in New Issue
Block a user