add more view for test
This commit is contained in:
parent
93add0c315
commit
5c0f5b2127
|
@ -6,8 +6,8 @@ import { useThemeStore } from "./stores/theme";
|
|||
const theme = useThemeStore();
|
||||
const items = [
|
||||
{ id: 1, icon: iconMenu, text: "用户界面", page: "/user" },
|
||||
{ id: 2, icon: iconMenu, text: "Component Test", page: "/test" },
|
||||
{ id: 3, icon: iconMenu, text: "Jtag Test", page: "/test/jtag" },
|
||||
{ id: 2, icon: iconMenu, text: "ComponentTest", page: "/test" },
|
||||
{ id: 3, icon: iconMenu, text: "JtagTest", page: "/test/jtag" },
|
||||
];
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
|
||||
import type { AppRouter } from '../server/router';
|
||||
|
||||
export const client = createTRPCProxyClient<AppRouter>({
|
||||
links: [
|
||||
httpBatchLink({
|
||||
url: 'http://localhost:3002',
|
||||
// You can pass any HTTP headers you wish here
|
||||
async headers() {
|
||||
return {
|
||||
authorization: document.cookie,
|
||||
};
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
|
@ -1,10 +1,18 @@
|
|||
<template>
|
||||
<div class="card card-dash shadow-xl h-screen" :class="[sidebar.isClose ? 'w-31' : 'w-80']">
|
||||
<div class="card-body flex relative transition-all duration-500 ease-in-out">
|
||||
<div
|
||||
class="card card-dash shadow-xl h-screen"
|
||||
:class="[sidebar.isClose ? 'w-31' : 'w-80']"
|
||||
>
|
||||
<div
|
||||
class="card-body flex relative transition-all duration-500 ease-in-out"
|
||||
>
|
||||
<!-- Avatar and Name -->
|
||||
<div class="relative" :class="sidebar.isClose ? 'h-50' : 'h-20'">
|
||||
<!-- Img -->
|
||||
<div class="avatar h-10 fixed top-10" :class="sidebar.isClose ? 'left-10' : 'left-7'">
|
||||
<div
|
||||
class="avatar h-10 fixed top-10"
|
||||
:class="sidebar.isClose ? 'left-10' : 'left-7'"
|
||||
>
|
||||
<div class="rounded-full">
|
||||
<img src="../assets/user.svg" alt="User" />
|
||||
</div>
|
||||
|
@ -18,14 +26,28 @@
|
|||
</div>
|
||||
|
||||
<!-- Toggle Button -->
|
||||
<button class="btn btn-square rounded-lg p-2 m-3 fixed"
|
||||
:class="sidebar.isClose ? 'left-7 top-23' : 'left-60 top-7'" @click="sidebar.toggleSidebar">
|
||||
<svg t="1741694970690" :class="sidebar.isClose ? 'rotate-0' : 'rotate-540'" class="icon" viewBox="0 0 1024 1024"
|
||||
version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4546" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="200" height="200">
|
||||
<button
|
||||
class="btn btn-square rounded-lg p-2 m-3 fixed"
|
||||
:class="sidebar.isClose ? 'left-7 top-23' : 'left-60 top-7'"
|
||||
@click="sidebar.toggleSidebar"
|
||||
>
|
||||
<svg
|
||||
t="1741694970690"
|
||||
:class="sidebar.isClose ? 'rotate-0' : 'rotate-540'"
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="4546"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="200"
|
||||
height="200"
|
||||
>
|
||||
<path
|
||||
d="M803.758 514.017c-0.001-0.311-0.013-0.622-0.018-0.933-0.162-23.974-9.386-47.811-27.743-65.903-0.084-0.082-0.172-0.157-0.256-0.239-0.154-0.154-0.296-0.315-0.451-0.468L417.861 94.096c-37.685-37.153-99.034-37.476-136.331-0.718-37.297 36.758-36.979 97.231 0.707 134.384l290.361 286.257-290.362 286.257c-37.685 37.153-38.004 97.625-0.707 134.383 37.297 36.758 98.646 36.435 136.331-0.718l357.43-352.378c0.155-0.153 0.297-0.314 0.451-0.468 0.084-0.082 0.172-0.157 0.256-0.239 18.354-18.089 27.578-41.922 27.743-65.892 0.004-0.315 0.017-0.631 0.018-0.947z"
|
||||
:fill="theme.isLightTheme() ? '#828282' : '#C0C3C8'" p-id="4547"></path>
|
||||
:fill="theme.isLightTheme() ? '#828282' : '#C0C3C8'"
|
||||
p-id="4547"
|
||||
></path>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
|
@ -34,15 +56,33 @@
|
|||
<ul class="menu h-full w-full">
|
||||
<li v-for="item in props.items" class="text-xl my-1">
|
||||
<a @click="router.push(item.page)">
|
||||
<svg t="1741694797806" class="icon h-[1.5em] w-[1.5em] opacity-50 mx-1" viewBox="0 0 1024 1024"
|
||||
version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2622" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="200" height="200">
|
||||
<path d="M192 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" p-id="2623"></path>
|
||||
<path d="M192 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" p-id="2624"></path>
|
||||
<path d="M192 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" p-id="2625"></path>
|
||||
<svg
|
||||
t="1741694797806"
|
||||
class="icon h-[1.5em] w-[1.5em] opacity-50 mx-1"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="2622"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="200"
|
||||
height="200"
|
||||
>
|
||||
<path
|
||||
d="M192 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z"
|
||||
p-id="2623"
|
||||
></path>
|
||||
<path
|
||||
d="M192 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z"
|
||||
p-id="2624"
|
||||
></path>
|
||||
<path
|
||||
d="M192 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z"
|
||||
p-id="2625"
|
||||
></path>
|
||||
<path
|
||||
d="M864 160H352c-17.7 0-32 14.3-32 32s14.3 32 32 32h512c17.7 0 32-14.3 32-32s-14.3-32-32-32zM864 480H352c-17.7 0-32 14.3-32 32s14.3 32 32 32h512c17.7 0 32-14.3 32-32s-14.3-32-32-32zM864 800H352c-17.7 0-32 14.3-32 32s14.3 32 32 32h512c17.7 0 32-14.3 32-32s-14.3-32-32-32z"
|
||||
p-id="2626"></path>
|
||||
p-id="2626"
|
||||
></path>
|
||||
</svg>
|
||||
<Transition>
|
||||
<p class="break-keep" v-if="!sidebar.isClose">{{ item.text }}</p>
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { client } from "@/client";
|
||||
import { TRPCClientError } from "@trpc/client";
|
||||
|
||||
var bitstream = null;
|
||||
|
||||
function handleFileChange(event: Event): void {
|
||||
|
@ -43,22 +40,9 @@ function handleFileChange(event: Event): void {
|
|||
console.log(bitstream);
|
||||
}
|
||||
|
||||
async function uploadBitStream() {
|
||||
try {
|
||||
const serverStatus = await client.api.status.query();
|
||||
if (serverStatus != "OK") {
|
||||
throw new Error("Server Busy...");
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof TRPCClientError) {
|
||||
console.error("Can't connect to Server!");
|
||||
} else {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
async function uploadBitStream() {}
|
||||
|
||||
function checkFileType(file: File) { }
|
||||
function checkFileType(file: File) {}
|
||||
</script>
|
||||
|
||||
<style scoped lang="postcss">
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
<template>
|
||||
|
||||
<div class="h-screen w-screen flex justify-center">
|
||||
<div class="h-full w-32"></div>
|
||||
|
||||
<div class="h-full w-[70%] shadow-2xl">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
</script>
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<style scoped lang="postcss">
|
||||
|
||||
@import "../assets/main.css";
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in New Issue