-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove simple bar cuz it breaks the loading
- Loading branch information
Showing
4 changed files
with
1 addition
and
62 deletions.
There are no files selected for viewing
52 changes: 0 additions & 52 deletions
52
frontend/src/main/scala/it/unibo/scafi/js/facade/simplebar/SimpleBar.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
frontend/src/main/scala/it/unibo/scafi/js/view/dynamic/ErrorModal.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
package it.unibo.scafi.js.view.dynamic | ||
import it.unibo.scafi.js.facade.simplebar.SimpleBar | ||
import org.scalajs.dom.html.Element | ||
import scalatags.JsDom.all._ | ||
|
||
object ErrorModal extends Modal { | ||
private val text = pre(cls := "overflow-auto text-light", style := "max-height : 50vh").render // init the page | ||
private var bar: SimpleBar = null | ||
override val title: Element = h4(cls := "modal-tile", "Error!").render | ||
override val body: Seq[Element] = Seq(text) | ||
override val footer: Seq[Element] = Seq.empty | ||
override def minBound: Double = 0 | ||
def showError(error: String): Unit = { | ||
text.innerHTML = error | ||
bar = SimpleBar.wrap(text) // with hide, the simple bar has some problem... with rewrapping it seems to work | ||
this.toggle() | ||
} | ||
this.appendOnRoot() // put in the page.. | ||
onClose = () => { | ||
bar.unMount() | ||
this.hide() | ||
} | ||
} |