Rename empty state -> initial state (#405)

* Rename empty state -> initial state

* Fix build due to changing socket.io types
This commit is contained in:
Stephen Weatherford (MSFT) 2018-03-15 15:43:25 -07:00 коммит произвёл GitHub
Родитель d9d1a2d6a1
Коммит f840234db6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -221,7 +221,7 @@ textarea {
border-bottom-color: var(--color);
}
#queryWatermark, #graphWatermark {
#initialWatermark, #graphWatermark {
padding-top: 18%;
}
@ -241,7 +241,7 @@ textarea {
/* Handle visibility of sections depending on current state */
#states:not(.state-empty) #queryWatermark {
#states:not(.state-initial) #initialWatermark {
display:none;
}

Просмотреть файл

@ -25,7 +25,7 @@
</head>
<!-- Possible states (set on #states)
state-empty
state-initial (just loaded - user needs to do a query)
state-querying
state-error
state-results + state-graph-results
@ -33,7 +33,7 @@
-->
<body>
<div id="states" class="state-empty">
<div id="states" class="state-initial">
</script>
<header>
<img id="cosmos" src="../../resources/cosmos.png">
@ -72,7 +72,7 @@
<textarea id="jsonResults"></textarea>
</div>
</div>
<div id="queryWatermark" class="watermark">
<div id="initialWatermark" class="watermark">
No data has been loaded. Please enter a query and click Execute.
</div>
<div id="queryStatus">Querying...</div>

Просмотреть файл

@ -36,7 +36,7 @@ let htmlElements: {
resultsBackground: HTMLDivElement
};
type State = "empty" | "querying" | "error" | "json-results" | "graph-results";
type State = "initial" | "querying" | "error" | "json-results" | "graph-results";
window.onerror = (message) => {
logToUI("ERROR: " + message);
@ -121,7 +121,7 @@ export class GraphClient {
htmlElements.queryInput.value = defaultQuery;
this.setStateEmpty();
this.setStateInitial();
this.log(`Listening on port ${port}`);
this._socket = new SocketWrapper(io.connect(`http://localhost:${port}`));
@ -238,8 +238,8 @@ export class GraphClient {
logToUI(s);
}
private setStateEmpty() {
this._setState("empty");
private setStateInitial() {
this._setState("initial");
}
private setStateQuerying() {