[mod] wait for server side confirmation for a message
Christian Fraß

Christian Fraß commited on 2021-11-20 18:48:27
Zeige 3 geänderte Dateien mit 12 Einfügungen und 8 Löschungen.

... ...
@@ -34,9 +34,9 @@
34 34
 				</div>
35 35
 			</div>
36 36
 			<div id="middle">
37
-				<ul class="pane" id="users"></ul>
38
-				<ul class="pane" id="entries"></ul>
39 37
 				<ul class="pane" id="spots"></ul>
38
+				<ul class="pane" id="entries"></ul>
39
+				<ul class="pane" id="users"></ul>
40 40
 			</div>
41 41
 			<form action="?">
42 42
 				<div id="container_content">
... ...
@@ -199,7 +199,7 @@ namespace ns_model
199 199
 					({
200 200
 						"timestamp": event.timestamp,
201 201
 						"kind": enum_entrykind.message,
202
-						"sender": event.data["sender"],
202
+						"sender": (event.data["sender"] ?? model.nickname),
203 203
 						"content": event.data["content"],
204 204
 					});
205 205
 					shall_update_entries = true;
... ...
@@ -220,7 +220,7 @@ namespace ns_model
220 220
 					({
221 221
 						"timestamp": event.timestamp,
222 222
 						"kind": enum_entrykind.message,
223
-						"sender": event.data["sender"],
223
+						"sender": (event.data["sender"] ?? model.nickname),
224 224
 						"content": event.data["content"],
225 225
 					});
226 226
 					shall_update_entries = true;
... ...
@@ -322,6 +322,7 @@ namespace ns_model
322 322
 						"content": content,
323 323
 					}
324 324
 				);
325
+				/*
325 326
 				const event: type_event =
326 327
 				{
327 328
 					"timestamp": get_timestamp(),
... ...
@@ -335,6 +336,7 @@ namespace ns_model
335 336
 				};
336 337
 				process_events(model, [event]);
337 338
 				notify(model, "entries_changed");
339
+				 */
338 340
 				notify(model, "message_sent");
339 341
 				break;
340 342
 			}
... ...
@@ -350,6 +352,7 @@ namespace ns_model
350 352
 						"content": content,
351 353
 					}
352 354
 				);
355
+				/*
353 356
 				const event: type_event =
354 357
 				{
355 358
 					"timestamp": get_timestamp(),
... ...
@@ -363,6 +366,7 @@ namespace ns_model
363 366
 				};
364 367
 				process_events(model, [event]);
365 368
 				notify(model, "entries_changed");
369
+				 */
366 370
 				notify(model, "message_sent");
367 371
 				break;
368 372
 			}
... ...
@@ -175,7 +175,7 @@ body
175 175
 #middle
176 176
 {
177 177
 	display: flex;
178
-	flex-direction: row-reverse;
178
+	flex-direction: row;
179 179
 	flex-wrap: wrap;
180 180
 	
181 181
 	& #spots
... ...
@@ -183,7 +183,7 @@ body
183 183
 		flex-grow: 1;
184 184
 		flex-shrink: 1;
185 185
 		
186
-		min-width: 240px;
186
+		flex-basis: 240px;
187 187
 		height: 75vh;
188 188
 	}
189 189
 	
... ...
@@ -192,7 +192,7 @@ body
192 192
 		flex-grow: 4;
193 193
 		flex-shrink: 4;
194 194
 		
195
-		min-width: 480px;
195
+		flex-basis: 480px;
196 196
 		height: 75vh;
197 197
 	}
198 198
 	
... ...
@@ -201,7 +201,7 @@ body
201 201
 		flex-grow: 1;
202 202
 		flex-shrink: 1;
203 203
 		
204
-		min-width: 240px;
204
+		flex-basis: 240px;
205 205
 		height: 75vh;
206 206
 	}
207 207
 }
208 208