diff --git a/src/main.tsx b/src/main.tsx index a89a4c57..0bd19142 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -2653,7 +2653,7 @@ class ScreenWindowView extends React.Component<{sw : ScreenWindow}, {}> { return {position: "absolute", width: "100%", height: "100%", overflowX: "hidden"}; } - renderError(message : string) { + renderError(message : string, fade : boolean) { let {sw} = this.props; return (
@@ -2661,7 +2661,7 @@ class ScreenWindowView extends React.Component<{sw : ScreenWindow}, {}> { {sw.name.get()}
-
+
{message}
@@ -2672,13 +2672,13 @@ class ScreenWindowView extends React.Component<{sw : ScreenWindow}, {}> { let {sw} = this.props; let win = this.getWindow(); if (win == null || !win.loaded.get()) { - return this.renderError("(loading)"); + return this.renderError("...", true); } if (win.loadError.get() != null) { - return this.renderError(sprintf("(%s)", win.loadError.get())); + return this.renderError(sprintf("(%s)", win.loadError.get()), false); } if (this.width.get() == 0) { - return this.renderError(""); + return this.renderError("", false); } let idx = 0; let line : LineType = null; diff --git a/src/sh2.less b/src/sh2.less index fae41507..1be6e0b0 100644 --- a/src/sh2.less +++ b/src/sh2.less @@ -120,6 +120,11 @@ body::-webkit-scrollbar { background-color: black; color: #4e9a06; } + + &.should-fade { + opacity: 0; + animation: fade-in 2.5s; + } } } } @@ -1987,3 +1992,17 @@ input[type=checkbox] { transform: rotate(360deg); } } + +@keyframes fade-in { + 0% { + opacity: 0; + } + + 80% { + opacity: 0; + } + + 100% { + opacity: 1; + } +}