refactor queryRequest

This commit is contained in:
pa
2026-03-09 21:28:45 +09:00
parent c1a35223d4
commit 58b9bdc1c5
60 changed files with 1134 additions and 883 deletions

View File

@@ -5,8 +5,8 @@
<script setup>
import { ref, watch } from 'vue';
import { queryRequest } from '../api';
import { useUserStore } from '../stores';
import { userRequest } from '../api';
const userStore = useUserStore();
@@ -22,18 +22,24 @@
const username = ref(props.userid);
/**
*
*/
async function parse() {
username.value = props.userid;
if (props.hint) {
username.value = props.hint;
} else if (props.userid) {
const args = await userRequest.getCachedUser({ userId: props.userid });
const args = await queryRequest.fetch('user', { userId: props.userid });
if (args?.json?.displayName) {
username.value = args.json.displayName;
}
}
}
/**
*
*/
function showUserDialog() {
userStore.showUserDialog(props.userid);
}