Skip to content

Commit

Permalink
🦄 refactor: TS3 links tweaked
Browse files Browse the repository at this point in the history
Join link reformatted and are only displayed if the server is online.
  • Loading branch information
DNA-styx committed Nov 11, 2024
1 parent 3359142 commit 000a6e6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions web/pages/voicecomm_serverlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="w-full overflow-x-auto">
<table class="w-full whitespace-no-wrap">
<tr class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800">
<td>Voice Server Name</td>
<td>&nbsp;</td>
<td>Status</td>
<td>Server Address</td>
<td>Password</td>
Expand Down Expand Up @@ -205,6 +205,12 @@
}else{
$ts3q_server_uptime = '-';
}
$ts3q_server_link = $ts3_server['addr'] .":" . $ts3q_server_port .
"&nbsp;<a href=\"ts3server://" . $ts3_server['addr']. "?" .
"port=" . $ts3q_server_port .
"&password=" . $ts3_server['password'] .
"&addbookmark=" . $ts3q_server_name .
"\">(Join)</a>";
}
}else{
$ts3q_server_id = '0';
Expand All @@ -213,20 +219,17 @@
$ts3q_server_clients = '-';
$ts3q_server_status = '<span class="px-2 leading-tight text-red-700 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-700">offline</span>';
$ts3q_server_uptime = '-';
$ts3q_server_link = '-';
}

?>
<tr class="text-sm font-semibold text-gray-700 dark:text-gray-400">
<td class="flex items-center">
<img src="<?php echo IMAGE_PATH; ?>/teamspeak3/ts3.png" alt="tsicon">&nbsp;
<?php echo $ts3q_server_name ."\n"; ?>
<?php echo $ts3q_server_name ."\n"; ?>
</td>
<td><?php echo $ts3q_server_status ?></td>
<td>
<a href="ts3server://<?php echo $ts3_server['addr'].'?port='.$ts3q_server_port ?>&nickname=WebGuest">
<?php echo $ts3_server['addr'].':'.$ts3q_server_port; ?> (Join)
</a>
</td>
<td><?php echo $ts3q_server_link ?></td>
<td><?php echo $ts3_server['password']; ?></td>
<td><?php echo $ts3q_server_clients ?></td>
<td><?php echo $ts3q_server_uptime ?></td>
Expand Down

0 comments on commit 000a6e6

Please sign in to comment.