mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -31,6 +31,7 @@ class Client
|
||||
/** @var int */
|
||||
protected $timeConnected = 0;
|
||||
|
||||
public static $user = [];
|
||||
public static $subdomains = [];
|
||||
|
||||
public function __construct(LoopInterface $loop, Configuration $configuration, CliRequestLogger $logger)
|
||||
@@ -119,6 +120,7 @@ class Client
|
||||
$this->logger->line('');
|
||||
|
||||
static::$subdomains[] = "{$httpProtocol}://{$data->subdomain}.{$host}";
|
||||
static::$user = $data->user;
|
||||
|
||||
$deferred->resolve($data);
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@ class DashboardController extends Controller
|
||||
public function handle(Request $request, ConnectionInterface $httpConnection)
|
||||
{
|
||||
$httpConnection->send(respond_html($this->getView($httpConnection, 'client.dashboard', [
|
||||
'user' => Client::$user,
|
||||
'subdomains' => Client::$subdomains,
|
||||
'max_logs'=> config()->get('expose.max_logged_requests', 10),
|
||||
])));
|
||||
|
||||
@@ -173,6 +173,7 @@ class ControlMessageController implements MessageComponentInterface
|
||||
'message' => config('expose.admin.messages.resolve_connection_message')($connectionInfo, $user),
|
||||
'subdomain' => $connectionInfo->subdomain,
|
||||
'server_host' => $connectionInfo->serverHost,
|
||||
'user' => $user,
|
||||
'client_id' => $connectionInfo->client_id,
|
||||
],
|
||||
]));
|
||||
@@ -202,7 +203,8 @@ class ControlMessageController implements MessageComponentInterface
|
||||
$connection->send(json_encode([
|
||||
'event' => 'authenticated',
|
||||
'data' => [
|
||||
'message' => config('expose.admin.messages.message_of_the_day'),
|
||||
'message' => config('expose.admin.messages.resolve_connection_message')($connectionInfo, $user),
|
||||
'user' => $user,
|
||||
'port' => $connectionInfo->port,
|
||||
'shared_port' => $connectionInfo->shared_port,
|
||||
'client_id' => $connectionInfo->client_id,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>Expose Dashboard :: {{ subdomains|join(", ") }}</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script>
|
||||
<script src="https://unpkg.com/tailwindcss-jit-cdn"></script>
|
||||
<script src="https://unpkg.com/tailwindcss-jit-cdn@1.2.0"></script>
|
||||
<script type="tailwind-config">
|
||||
{
|
||||
"darkMode": "class",
|
||||
@@ -119,6 +119,12 @@
|
||||
<div class="pt-8 flex flex-col md:flex-row">
|
||||
<div class="w-full md:w-1/3 flex flex-col mr-5">
|
||||
<div class="-my-2 py-2 overflow-x-auto sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8">
|
||||
{% if user.can_specify_subdomains == 1 %}
|
||||
<p class="text-pink-500 font-medium pb-4 leading-loose">
|
||||
You are using Expose Free -
|
||||
<a class="underline" href="https://expose.beyondco.de">Upgrade now</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
<div class="flex items-center pb-4 justify-between">
|
||||
<span
|
||||
@click.prevent="useDarkMode = !useDarkMode"
|
||||
|
||||
Reference in New Issue
Block a user