| 
10 | 10 | 	import { likeEnhance } from "$lib/like"  | 
11 | 11 | 	import Autopilot from "./Autopilot.svelte"  | 
12 | 12 | 	import customProtocol from "./customprotocol"  | 
13 |  | -	import DedicatedHosting from "./DedicatedHosting.svelte"  | 
14 | 13 | 	import Thumbnails from "./Thumbnails.svelte"  | 
15 | 14 | 
  | 
16 | 15 | 	const { data } = $props()  | 
 | 
76 | 75 | 
  | 
77 | 76 | 	const tabs = ["Description", "Servers"]  | 
78 | 77 | 	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")  | 
85 | 83 | 
  | 
86 | 84 | 	let tabData = $state(TabData(data.url, tabs))  | 
87 | 85 | 	let tabData2 = $state(  | 
 | 
272 | 270 | 		{/if}  | 
273 | 271 | 	</Tab>  | 
274 | 272 | 
 
  | 
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 |  | - | 
296 | 273 | 	{#if tabs.includes("Selfhosting")}  | 
297 | 274 | 		<Tab bind:tabData>  | 
298 | 275 | 			<h3 class="pb-2">Hosting on {data.siteName}</h3>  | 
 | 
0 commit comments