Skip to content

Commit cac7810

Browse files
committed
Remove dedicated hosting tab in preparation for moving to settings page
1 parent 2180388 commit cac7810

File tree

2 files changed

+5
-43
lines changed

2 files changed

+5
-43
lines changed

Site/src/routes/(main)/place/[id=asset]/[name]/+page.svelte

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import { likeEnhance } from "$lib/like"
1111
import Autopilot from "./Autopilot.svelte"
1212
import customProtocol from "./customprotocol"
13-
import DedicatedHosting from "./DedicatedHosting.svelte"
1413
import Thumbnails from "./Thumbnails.svelte"
1514
1615
const { data } = $props()
@@ -76,12 +75,11 @@
7675
7776
const tabs = ["Description", "Servers"]
7877
const isOwner = data.place.ownerUser?.username === user?.username
79-
if (isOwner || user.permissionLevel === 5) {
80-
if (data.hosting === "Dedicated" || data.hosting === "Both")
81-
tabs.push("Dedicated hosting")
82-
if (data.hosting === "Selfhosting" || data.hosting === "Both")
83-
tabs.push("Selfhosting")
84-
}
78+
if (
79+
(isOwner || user.permissionLevel === 5) &&
80+
(data.hosting === "Selfhosting" || data.hosting === "Both")
81+
)
82+
tabs.push("Selfhosting")
8583
8684
let tabData = $state(TabData(data.url, tabs))
8785
let tabData2 = $state(
@@ -272,27 +270,6 @@
272270
{/if}
273271
</Tab>
274272

275-
{#if tabs.includes("Dedicated hosting") && data.dedicatedOnline != null}
276-
<Tab bind:tabData>
277-
<h3 class="pb-2">Dedicated hosting</h3>
278-
<p>
279-
Dedicated hosting allows you to run your map on our servers, so
280-
that it has higher availability for players to join, or in cases
281-
where selfhosting is not an option.
282-
</p>
283-
<p>
284-
This place's dedicated server is currently
285-
{#if data.dedicatedOnline}
286-
<b class="text-emerald-500">online.</b>
287-
{:else}
288-
<b class="text-red-500">offline.</b>
289-
{/if}
290-
</p>
291-
292-
<DedicatedHosting online={data.dedicatedOnline} />
293-
</Tab>
294-
{/if}
295-
296273
{#if tabs.includes("Selfhosting")}
297274
<Tab bind:tabData>
298275
<h3 class="pb-2">Hosting on {data.siteName}</h3>

Site/src/routes/(main)/place/[id=asset]/[name]/DedicatedHosting.svelte

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)