|
190 | 190 | <header class="card-header font-bold text-2xl text-center">
|
191 | 191 | <T defaultValue="Dedicated Servers" keyName="server-manager.title" />
|
192 | 192 | </header>
|
193 |
| - <section class="p-4 flex-auto space-y-4 overflow-y-auto flex"> |
| 193 | + <section class="p-4 flex-auto space-y-4 flex"> |
194 | 194 | <button class="btn flex-auto h-12 text-sm variant-filled-primary" on:click={() => BrowserOpenURL('https://docs.ficsit.app/satisfactory-modding/latest/ForUsers/DedicatedServerSetup.html')}>
|
195 | 195 | <T defaultValue="Get help connecting to servers" keyName="server-manager.get-help" />
|
196 | 196 | <div class="grow" />
|
|
199 | 199 | icon={mdiWeb} />
|
200 | 200 | </button>
|
201 | 201 | </section>
|
202 |
| - <section class="p-4 flex-auto space-y-4 overflow-y-auto flex"> |
| 202 | + <header class="card-header font-bold text-2xl text-center"> |
| 203 | + <T defaultValue="Manage Existing Servers" keyName="server-manager.existing-servers.title" /> |
| 204 | + </header> |
| 205 | + <section class="p-4 flex-auto space-y-4 flex"> |
203 | 206 | <div class="flex-auto w-full overflow-x-auto overflow-y-auto">
|
204 | 207 | <table class="table">
|
205 | 208 | <tbody>
|
206 |
| - {#each $remoteServers as remoteServer} |
207 |
| - <tr> |
208 |
| - <td class="break-all">{$installsMetadata[remoteServer]?.info?.launcher}</td> |
209 |
| - <td class="break-all">{redactRemoteURL(remoteServer)}</td> |
210 |
| - <td> |
211 |
| - {#if $installsMetadata[remoteServer]?.state === ficsitcli.InstallState.VALID} |
212 |
| - {$installsMetadata[remoteServer]?.info?.type} |
213 |
| - {:else} |
214 |
| - <Tooltip popupId={installWarningPopupId(remoteServer)}> |
215 |
| - <span class="text-base"> |
| 209 | + {#if $remoteServers.length > 0} |
| 210 | + {#each $remoteServers as remoteServer} |
| 211 | + <tr> |
| 212 | + <td class="break-all">{$installsMetadata[remoteServer]?.info?.launcher}</td> |
| 213 | + <td class="break-all">{redactRemoteURL(remoteServer)}</td> |
| 214 | + <td> |
| 215 | + {#if $installsMetadata[remoteServer]?.state === ficsitcli.InstallState.VALID} |
| 216 | + {$installsMetadata[remoteServer]?.info?.type} |
| 217 | + {:else} |
| 218 | + <Tooltip popupId={installWarningPopupId(remoteServer)}> |
| 219 | + <span class="text-base"> |
| 220 | + {#if $installsMetadata[remoteServer]?.state === ficsitcli.InstallState.LOADING} |
| 221 | + <T defaultValue="Loading..." keyName="server-manager.loading" /> |
| 222 | + {:else if $installsMetadata[remoteServer]?.state === ficsitcli.InstallState.INVALID} |
| 223 | + <T defaultValue="SMM cannot manage this install" keyName="server-manager.invalid" /> |
| 224 | + {:else} |
| 225 | + <T defaultValue="Failed to connect to server, click to retry" keyName="server-manager.failed-to-connect" /> |
| 226 | + {/if} |
| 227 | + </span> |
| 228 | + </Tooltip> |
| 229 | + <div |
| 230 | + class="h-6 w-full text-sm" |
| 231 | + use:popup={installWarningPopups[remoteServer]}> |
216 | 232 | {#if $installsMetadata[remoteServer]?.state === ficsitcli.InstallState.LOADING}
|
217 |
| - <T defaultValue="Loading..." keyName="server-manager.loading" /> |
| 233 | + <SvgIcon |
| 234 | + class="!p-0 !m-0 !w-full !h-full animate-spin text-primary-600" |
| 235 | + icon={mdiLoading} /> |
218 | 236 | {:else if $installsMetadata[remoteServer]?.state === ficsitcli.InstallState.INVALID}
|
219 |
| - <T defaultValue="SMM cannot manage this install" keyName="server-manager.invalid" /> |
220 |
| - {:else} |
221 |
| - <T defaultValue="Failed to connect to server, click to retry" keyName="server-manager.failed-to-connect" /> |
222 |
| - {/if} |
223 |
| - </span> |
224 |
| - </Tooltip> |
225 |
| - <div |
226 |
| - class="h-6 w-full text-sm" |
227 |
| - use:popup={installWarningPopups[remoteServer]}> |
228 |
| - {#if $installsMetadata[remoteServer]?.state === ficsitcli.InstallState.LOADING} |
229 |
| - <SvgIcon |
230 |
| - class="!p-0 !m-0 !w-full !h-full animate-spin text-primary-600" |
231 |
| - icon={mdiLoading} /> |
232 |
| - {:else if $installsMetadata[remoteServer]?.state === ficsitcli.InstallState.INVALID} |
233 |
| - <SvgIcon |
234 |
| - class="!p-0 !m-0 !w-full !h-full text-red-500" |
235 |
| - icon={mdiAlert} /> |
236 |
| - {:else} |
237 |
| - <button |
238 |
| - class="btn-icon h-6 w-full" |
239 |
| - on:click={() => retryConnect(remoteServer)}> |
240 | 237 | <SvgIcon
|
241 | 238 | class="!p-0 !m-0 !w-full !h-full text-red-500"
|
242 | 239 | icon={mdiAlert} />
|
243 |
| - </button> |
244 |
| - {/if} |
245 |
| - </div> |
246 |
| - {/if} |
247 |
| - </td> |
248 |
| - <td> |
249 |
| - {#if $installsMetadata[remoteServer]?.info?.version} |
250 |
| - CL{$installsMetadata[remoteServer].info?.version} |
251 |
| - {/if} |
252 |
| - </td> |
253 |
| - <td> |
254 |
| - <button |
255 |
| - class="btn-icon h-5 w-full" |
256 |
| - on:click={() => removeServer(remoteServer)}> |
257 |
| - <SvgIcon |
258 |
| - class="!p-0 !m-0 !w-full !h-full hover:text-red-500" |
259 |
| - icon={mdiTrashCan}/> |
260 |
| - </button> |
261 |
| - </td> |
262 |
| - </tr> |
263 |
| - {/each} |
| 240 | + {:else} |
| 241 | + <button |
| 242 | + class="btn-icon h-6 w-full" |
| 243 | + on:click={() => retryConnect(remoteServer)}> |
| 244 | + <SvgIcon |
| 245 | + class="!p-0 !m-0 !w-full !h-full text-red-500" |
| 246 | + icon={mdiAlert} /> |
| 247 | + </button> |
| 248 | + {/if} |
| 249 | + </div> |
| 250 | + {/if} |
| 251 | + </td> |
| 252 | + <td> |
| 253 | + {#if $installsMetadata[remoteServer]?.info?.version} |
| 254 | + CL{$installsMetadata[remoteServer].info?.version} |
| 255 | + {/if} |
| 256 | + </td> |
| 257 | + <td> |
| 258 | + <button |
| 259 | + class="btn-icon h-5 w-full" |
| 260 | + on:click={() => removeServer(remoteServer)}> |
| 261 | + <SvgIcon |
| 262 | + class="!p-0 !m-0 !w-full !h-full hover:text-red-500" |
| 263 | + icon={mdiTrashCan}/> |
| 264 | + </button> |
| 265 | + </td> |
| 266 | + </tr> |
| 267 | + {/each} |
| 268 | + {:else} |
| 269 | + <tr><p><T defaultValue="No servers added yet. Add one below!" keyName="server-manager.existing-servers.none-yet" /></p></tr> |
| 270 | + {/if} |
264 | 271 | </tbody>
|
265 | 272 | </table>
|
266 | 273 | </div>
|
267 | 274 | </section>
|
268 |
| - <section class="p-4 space-y-4 overflow-y-auto"> |
| 275 | + <section class="px-4"> |
| 276 | + <header class="card-header font-bold text-2xl text-center"> |
| 277 | + <T defaultValue="Add a New Server" keyName="server-manager.new-server.title" /> |
| 278 | + </header> |
| 279 | + <p class="font-mono">{err}</p> |
| 280 | + </section> |
| 281 | + <section class="p-4 overflow-y-auto"> |
269 | 282 | <div class="grid grid-cols-2 sm:grid-cols-4 gap-4 items-start auto-rows-[minmax(2.5rem,_max-content)]">
|
270 | 283 | <Select
|
271 | 284 | name="newServerProtocol"
|
|
386 | 399 | icon={mdiServerNetwork} />
|
387 | 400 | </button>
|
388 | 401 | </div>
|
389 |
| - <p class="font-mono">{err}</p> |
390 | 402 | </section>
|
391 | 403 | <footer class="card-footer">
|
392 | 404 | <button
|
|
0 commit comments