Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lgl
SmartVillages2
Commits
d22dc7a9
Commit
d22dc7a9
authored
Nov 20, 2025
by
Luna Riegel
Browse files
Change button layout of the object-library
parent
01d4b50c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/objectList.vue
View file @
d22dc7a9
...
@@ -7,26 +7,25 @@
...
@@ -7,26 +7,25 @@
</
template
>
</
template
>
<
template
#default
>
<
template
#default
>
<v-expansion-panels
multiple
>
<v-expansion-panels
multiple
>
<VcsExpansionPanel
v-for =
"(subcats, categoryName) in objLib"
:key=
"categoryName"
:heading=
"categoryName"
>
<VcsExpansionPanel
v-for =
"(subcats, categoryName) in objLib"
:key=
"categoryName"
:heading=
"categoryName"
>
<v-container
v-for=
"(entries, subCategory) in subcats"
:key =
"subCategory"
class=
" py-1 px-1 border-b-md"
>
<v-container
class=
"px-1 py-0"
>
<v-col>
<v-row
class=
"v-row--no-gutters"
>
<VcsLabel
class=
"mb-4 text-h2"
>
{{
subCategory
}}
</VcsLabel>
<template
v-for=
"(entries, subCategory) in subcats"
:key =
"subCategory"
>
<v-list>
<v-row>
<vcs-button
<vcs-button
v-for=
"entry in entries"
v-for=
"entry in entries"
:key=
"entry.title"
:key=
"entry.title"
@
click=
"placeCatalogModel(entry.model)"
@
click=
"placeCatalogModel(entry.model)"
class=
"p-0 mx-1 my-0 border gc-2"
class=
"p-0 mx-1 my-1 border gc-2"
style=
"width: auto; height: auto; margin-left: 1rem; margin-bottom: 1px;"
style=
"width: 66px; height: 66px; margin-left: 1rem; margin-bottom: 1px;"
variant=
"filled"
color=
"base-lighter-4"
variant=
"tonal"
:tooltip=
"getEntryTooltip(entry, subCategory)"
>
>
<img
:src=
"entry.icon"
:alt=
"entry.icon"
style=
"display: block;
max-
width:
100%; max-
height:
100%
;"
/>
<img
:src=
"entry.icon"
:alt=
"entry.icon"
style=
"display: block; width:
64px;
height:
64px
;"
/>
</vcs-button>
</vcs-button>
</v-row>
</v-list>
</v-col>
<v-divider/>
<v-divider/>
</
template
>
</v-row>
</v-container>
</v-container>
</VcsExpansionPanel>
</VcsExpansionPanel>
</v-expansion-panels>
</v-expansion-panels>
...
@@ -217,6 +216,15 @@ function getCatalogEntries(json, linkPrefix) {
...
@@ -217,6 +216,15 @@ function getCatalogEntries(json, linkPrefix) {
return
part
;
return
part
;
}
}
export
function
getEntryTooltip
(
entry
,
subcategory
)
{
let
tooltip
=
'
Kategorie:
'
;
const
category
=
subcategory
||
'
Unbekannt
'
;
tooltip
+=
category
;
return
tooltip
;
}
async
function
placeCatalogModel
(
modelLink
){
async
function
placeCatalogModel
(
modelLink
){
loadCatalogModel
(
modelLink
).
then
(
model
=>
{
loadCatalogModel
(
modelLink
).
then
(
model
=>
{
const
catModel
=
model
;
const
catModel
=
model
;
...
@@ -541,6 +549,9 @@ function uploadModel() {
...
@@ -541,6 +549,9 @@ function uploadModel() {
saveConfiguration
()
{
saveConfiguration
()
{
saveObjects
();
saveObjects
();
},
},
getEntryTooltip
(
entry
,
subcategory
)
{
return
getEntryTooltip
(
entry
,
subcategory
);
},
};
};
},
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment