Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webapp-lib
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
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
Simon Lefort
webapp-lib
Commits
8970451f
Commit
8970451f
authored
5 months ago
by
Dylan Noah Vairoli
Browse files
Options
Downloads
Plain Diff
Merge branch 'dv/fix' into 'main'
Add error message on no UI found See merge request
!18
parents
c59d6a2f
597c5f80
Branches
main
Branches containing commit
Tags
v0.10.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/src/main/scala/cs214/webapp/client/Pages.scala
+3
-1
3 additions, 1 deletion
js/src/main/scala/cs214/webapp/client/Pages.scala
with
3 additions
and
1 deletion
js/src/main/scala/cs214/webapp/client/Pages.scala
+
3
−
1
View file @
8970451f
...
...
@@ -158,7 +158,9 @@ case class UIPage(appId: AppId, instanceId: InstanceId) extends Page:
WebClient
.
navigateTo
(
JoinPageLoader
(
appId
,
ui
.
uiId
,
instanceId
))
def
renderInto
(
target
:
Element
)
=
if
appUIs
.
size
<=
1
then
if
appUIs
.
size
<=
0
then
throw
IllegalStateException
(
f
"No UI found for app with id $appId."
)
else
if
appUIs
.
size
==
1
then
WebClient
.
navigateTo
(
JoinPageLoader
(
appId
,
appUIs
(
0
).
uiId
,
instanceId
))
else
replaceChildren
(
target
)
:
dom.window.addEventListener
(
"
keydown
"
,
(
e:
dom.KeyboardEvent
)
=>
handleKeyboardEvent
(
e
))
...
...
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