Files
backend-mm/resources/views/nova/chat.blade.php

64 lines
2.7 KiB
PHP

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="robots" content="noindex">
<title>{{ __('Chat') }} — {{ config('nova.name', config('app.name')) }}</title>
<link rel="stylesheet" href="{{ asset('assets/panel/css/chat.css') }}">
</head>
<body>
<div class="mm-chat" id="mm-chat">
<header class="mm-chat__top">
<a class="mm-chat__back" href="{{ url('/panel') }}">{{ __('Back to panel') }}</a>
<h1>{{ __('Chat') }}</h1>
<span class="mm-chat__badge" id="mm-chat-unread" hidden>0</span>
</header>
<div class="mm-chat__shell">
<aside class="mm-chat__inbox">
<div class="mm-chat__inbox-head">{{ __('Conversations') }}</div>
<div class="mm-chat__list" id="mm-chat-list"></div>
<p class="mm-chat__empty" id="mm-chat-empty-inbox" hidden>{{ __('No conversations yet.') }}</p>
</aside>
<section class="mm-chat__thread">
<div class="mm-chat__thread-head" id="mm-chat-thread-head">{{ __('Select a conversation') }}</div>
<div class="mm-chat__messages" id="mm-chat-messages"></div>
<form class="mm-chat__composer" id="mm-chat-form" hidden>
<textarea
id="mm-chat-input"
rows="1"
maxlength="5000"
placeholder="{{ __('Write a message...') }}"
autocomplete="off"
></textarea>
<button type="submit" id="mm-chat-send">{{ __('Send') }}</button>
</form>
</section>
</div>
</div>
<script>
window.MM_CHAT = {
conversationsUrl: @json(url('/panel/chat/conversations')),
messagesUrl: @json(url('/panel/chat/conversations')),
csrf: @json(csrf_token()),
broadcastAuth: @json(url('/panel/broadcasting/auth')),
pusher: @json($pusher),
strings: {
select: @json(__('Select a conversation')),
noMessages: @json(__('No messages yet.')),
you: @json(__('You')),
},
};
</script>
@if (! empty($pusher['key']))
<script src="{{ asset('assets/panel/js/pusher.min.js') }}"></script>
<script src="{{ asset('assets/panel/js/echo.iife.js') }}"></script>
@endif
<script src="{{ asset('assets/panel/js/chat.js') }}"></script>
</body>
</html>