Pembatasan Browser Aplikasi
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<html lang="id">
|
||||
|
||||
<head>
|
||||
@include('partials.cek-chrome')
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Login | {{ config('app.name') }}</title>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="id">
|
||||
|
||||
<head>
|
||||
@include('partials.cek-chrome')
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<!doctype html>
|
||||
<html lang="id">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Browser Tidak Didukung | {{ config('app.name') }}</title>
|
||||
<link rel="shortcut icon" href="{{ asset('assets/images/logo-untan.png') }}">
|
||||
<style>
|
||||
body { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #fafbfe; font-family: "Inter", system-ui, sans-serif; color: #000; }
|
||||
.box { max-width: 440px; padding: 40px 32px; text-align: center; background: #fff; border: 1px solid #e3e6ec; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
|
||||
img { height: 56px; }
|
||||
h1 { font-size: 20px; margin: 16px 0 8px; }
|
||||
p { margin: 0 0 20px; font-size: 14px; color: #6c757d; line-height: 1.6; }
|
||||
a.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; background: #1a73e8; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="box">
|
||||
<img src="{{ asset('assets/images/logo-untan.png') }}" alt="UNTAN">
|
||||
<h1>Browser Tidak Didukung</h1>
|
||||
<p>Aplikasi {{ config('app.name') }} hanya dapat diakses menggunakan browser <strong>Google Chrome</strong>. Silakan buka kembali halaman ini melalui Chrome.</p>
|
||||
<a class="btn" href="https://www.google.com/chrome/" target="_blank" rel="noopener">Unduh Google Chrome</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="id">
|
||||
|
||||
<head>
|
||||
@include('partials.cek-chrome')
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Dashboard Statistik Jurnal — UNTAN</title>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
@include('partials.cek-chrome')
|
||||
@include('layouts.header')
|
||||
@yield('css')
|
||||
<style>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{{-- Alihkan ke halaman penolakan bila browser bukan Google Chrome.
|
||||
Server sudah mengecek User-Agent (RequireChrome); Brave memakai User-Agent Chrome,
|
||||
jadi hanya bisa dikenali dari sisi browser lewat navigator.brave. --}}
|
||||
@if (config('app.chrome_only'))
|
||||
<script>
|
||||
(function () {
|
||||
function bukanChrome() {
|
||||
location.replace(@json(route('browser.tidak-didukung')));
|
||||
}
|
||||
|
||||
function isChrome(ua) {
|
||||
if (ua.indexOf('Chrome/') === -1 && ua.indexOf('CriOS/') === -1) return false;
|
||||
return !/Edg\/|EdgA\/|EdgiOS\/|OPR\/|Opera|OPT\/|SamsungBrowser|Vivaldi|YaBrowser|UCBrowser|Firefox|FxiOS|DuckDuckGo/.test(ua);
|
||||
}
|
||||
|
||||
if (!isChrome(navigator.userAgent)) return bukanChrome();
|
||||
|
||||
if (navigator.brave && typeof navigator.brave.isBrave === 'function') {
|
||||
navigator.brave.isBrave().then(function (brave) {
|
||||
if (brave) bukanChrome();
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
@endif
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="id">
|
||||
|
||||
<head>
|
||||
@include('partials.cek-chrome')
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Verifikasi Presensi | {{ config('app.name') }}</title>
|
||||
|
||||
Reference in New Issue
Block a user