add image and door

This commit is contained in:
2026-05-29 07:59:45 +07:00
parent 94e38b1140
commit 2e1ac68859
3 changed files with 30 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite --mode local_web",
"build:local_web": "vite build --mode local_web", "build:local_web": "vite build --mode local_web",
"build:global_web": "vite build --mode global_web", "build:global_web": "vite build --mode global_web",
"build": "run-p type-check \"build-only {@}\" --", "build": "run-p type-check \"build-only {@}\" --",
+20 -1
View File
@@ -17,7 +17,11 @@ const emptyNode: GraphNode = {
code: "", code: "",
name: "", name: "",
text: "", text: "",
image: "",
applications: [], applications: [],
hidden: false,
doors: [],
id: "", id: "",
label: "", label: "",
links: [], links: [],
@@ -28,7 +32,11 @@ const selectedNode = ref<GraphNode>({
code: "", code: "",
name: "", name: "",
text: "", text: "",
image: "",
applications: [], applications: [],
hidden: false,
doors: [],
id: "", id: "",
label: "", label: "",
links: [], links: [],
@@ -38,7 +46,11 @@ const focusedNode = ref<GraphNode>({
code: "", code: "",
name: "", name: "",
text: "", text: "",
image: "",
applications: [], applications: [],
hidden: false,
doors: [],
id: "", id: "",
label: "", label: "",
links: [], links: [],
@@ -226,11 +238,17 @@ function showGraph(show: boolean) {
<div class="message-header" :class="[action.code == selectedNode.code ? 'selected-message-header' : '']"> <div class="message-header" :class="[action.code == selectedNode.code ? 'selected-message-header' : '']">
{{ action.code }}: {{ action.name }} {{ action.code }}: {{ action.name }}
</div> </div>
<div v-if="action.image !== ''">
{{ action.image }}
</div>
<hr class="hr" /> <hr class="hr" />
<div class="message-content"> <div class="message-content">
{{ action.text }} {{ action.text }}
</div> </div>
<hr class="hr" v-if="action.applications.length" /> <hr class="hr" v-if="action.applications.length" />
<div class="message-footer" v-for="door in action.doors" :key="door.code">
Дверь: [{{ door.code }}] - "{{ door.name }}"
</div>
<div class="message-footer" v-for="application in action.applications" :key="application.name"> <div class="message-footer" v-for="application in action.applications" :key="application.name">
Приложение: {{ application.name }} Приложение: {{ application.name }}
</div> </div>
@@ -428,7 +446,8 @@ function showGraph(show: boolean) {
max-height: calc(100vh - 70px); max-height: calc(100vh - 70px);
} }
.scroll-y::-webkit-scrollbar, .scroll-y-right::-webkit-scrollbar { .scroll-y::-webkit-scrollbar,
.scroll-y-right::-webkit-scrollbar {
display: none; display: none;
} }
+9
View File
@@ -31,7 +31,10 @@ export type GraphNode = {
code: string code: string
name: string name: string
text: string text: string
image: string
applications: Array<GraphApplication> applications: Array<GraphApplication>
hidden: boolean
doors: Array<GraphDoor>
// fields for graph // fields for graph
id: string id: string
@@ -50,3 +53,9 @@ export type GraphEdge = {
export type GraphApplication = { export type GraphApplication = {
name: string name: string
} }
export type GraphDoor = {
code: string
name: string
show: boolean
}