Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
viavr-editor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIA-VR
viavr-editor
Commits
19c493cc
Commit
19c493cc
authored
3 weeks ago
by
Samuel Truman
Browse files
Options
Downloads
Patches
Plain Diff
Fixed possibly unwanted behaviors in build dialog
parent
94450b0e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/Components/BuildDialog/UnityPackageConfigurations.tsx
+5
-5
5 additions, 5 deletions
...src/Components/BuildDialog/UnityPackageConfigurations.tsx
with
5 additions
and
5 deletions
frontend/src/Components/BuildDialog/UnityPackageConfigurations.tsx
+
5
−
5
View file @
19c493cc
import
{
SettingAccordion
}
from
'
../Settings/SettingAccordion
'
import
{
Setting
}
from
'
../Settings/Setting
'
import
{
value_t
}
from
'
../../@types/Settings
'
import
{
useEffect
,
useState
}
from
'
react
'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
export
const
UnityPackageConfigurations
=
({
packages
})
=>
{
const
[
packageDescriptions
,
setPackageDescriptions
]
=
useState
<
any
[]
>
([])
const
[
visible
,
setVisible
]
=
useState
(
true
)
// used to force redraw, no other purpose
const
loadPackageSettings
=
async
()
=>
{
const
loadPackageSettings
=
useCallback
(
async
()
=>
{
for
(
const
packageDescription
of
packages
)
{
const
packageConfig
=
await
api
.
invoke
(
api
.
channels
.
toMain
.
getPackageSetting
,
packageDescription
.
name
)
if
(
packageConfig
!==
undefined
)
{
...
...
@@ -16,7 +16,7 @@ export const UnityPackageConfigurations = ({ packages }) => {
}
setPackageDescriptions
(
packages
)
setVisible
(
true
)
}
}
,
[
packages
])
const
sendUpdateToBackend
=
async
(
uuid
:
string
,
newValue
:
value_t
)
=>
{
await
api
.
invoke
(
api
.
channels
.
toMain
.
changePackageSetting
,
uuid
,
newValue
)
...
...
@@ -37,11 +37,11 @@ export const UnityPackageConfigurations = ({ packages }) => {
}
init
()
})
}
,
[
packages
,
loadPackageSettings
]
)
const
drawPackageConfig
=
(
packageDescription
)
=>
{
return
<>
{
(
visible
||
true
)
&&
{
(
visible
)
&&
Object
.
entries
(
packageDescription
[
'
configDescription
'
])
.
map
(([
name
,
setting
])
=>
{
const
id
=
packageDescription
[
'
name
'
]
+
'
.
'
+
name
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment