-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into shift-ci-v10.25.2
- Loading branch information
Showing
12 changed files
with
344 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\Models\Result; | ||
use Illuminate\Http\Request; | ||
|
||
class HomeController extends Controller | ||
{ | ||
/** | ||
* Handle the incoming request. | ||
*/ | ||
public function __invoke(Request $request) | ||
{ | ||
$hasResults = Result::count() > 0; | ||
|
||
return view($hasResults ? 'dashboard' : 'get-started'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace App\View\Components; | ||
|
||
use Closure; | ||
use Illuminate\Contracts\View\View; | ||
use Illuminate\View\Component; | ||
|
||
class AppLayout extends Component | ||
{ | ||
public $title = 'Page Title'; | ||
|
||
public function __construct($title) | ||
{ | ||
$this->title = $title; | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
*/ | ||
public function render(): View|Closure|string | ||
{ | ||
return view('layouts.app'); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@layer base { | ||
[x-cloak] { | ||
display: none !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<x-app-layout title="Dashboard"> | ||
<div class="grid gap-4 sm:grid-cols-6 sm:gap-8"> | ||
<div class="col-span-full"> | ||
@livewire(\App\Filament\Widgets\StatsOverviewWidget::class) | ||
</div> | ||
|
||
<div class="col-span-full"> | ||
@livewire(\App\Filament\Widgets\RecentSpeedChartWidget::class) | ||
</div> | ||
|
||
<div class="col-span-full"> | ||
@livewire(\App\Filament\Widgets\RecentPingChartWidget::class) | ||
</div> | ||
|
||
<div class="col-span-full"> | ||
@livewire(\App\Filament\Widgets\RecentJitterChartWidget::class) | ||
</div> | ||
</div> | ||
</x-app-layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="h-full"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<title>Getting Started - {{ config('app.name') }}</title> | ||
|
||
{{-- Fonts --}} | ||
<link href="{{ asset('fonts/inter/inter.css') }}" rel="stylesheet" /> | ||
|
||
{{-- Styles --}} | ||
@filamentStyles | ||
@vite('resources/css/app.css') | ||
|
||
<script> | ||
const theme = localStorage.getItem('theme') ?? 'system' | ||
if ( | ||
theme === 'dark' || | ||
(theme === 'system' && | ||
window.matchMedia('(prefers-color-scheme: dark)') | ||
.matches) | ||
) { | ||
document.documentElement.classList.add('dark') | ||
} | ||
</script> | ||
</head> | ||
<body class="h-full antialiased bg-gray-50 dark:bg-gray-950 text-gray-950 dark:text-white"> | ||
<main class="flex flex-col justify-center min-h-full p-4 space-y-4 sm:mx-auto sm:p-6 lg:p-8 sm:max-w-3xl sm:space-y-8"> | ||
<header> | ||
<h1 class="text-2xl font-bold tracking-tight text-gray-950 dark:text-white sm:text-3xl">{{ __("Getting Started") }} - {{ config('app.name') }}</h1> | ||
</header> | ||
<div> | ||
<ul role="list" class="divide dark:divide-white/5 divide-white/80"> | ||
<li class="relative flex items-center py-4 space-x-4"> | ||
<div class="flex-auto min-w-0"> | ||
<div class="flex items-center gap-x-3"> | ||
<div class="flex-none p-1 rounded-full text-amber-400 bg-gray-100/10"> | ||
<div class="w-2 h-2 bg-current rounded-full"></div> | ||
</div> | ||
<h2 class="min-w-0 text-sm font-semibold leading-6 text-white"> | ||
<a href="{{ url('/admin/login') }}" class="flex gap-x-2"> | ||
<span class="truncate">Sign In</span> | ||
<span class="text-amber-400">/</span> | ||
<span class="whitespace-nowrap">Admin Panel</span> | ||
<span class="absolute inset-0"></span> | ||
</a> | ||
</h2> | ||
</div> | ||
<div class="mt-3 flex items-center gap-x-2.5 text-sm leading-5 dark:text-gray-400 text-gray-950"> | ||
<p class="truncate"> | ||
Sign in to the admin panel to run your first speedtest or to setup scheduled tests. | ||
</p> | ||
</div> | ||
</div> | ||
<svg class="flex-none w-5 h-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" /> | ||
</svg> | ||
</li> | ||
<li class="relative flex items-center py-4 space-x-4"> | ||
<div class="flex-auto min-w-0"> | ||
<div class="flex items-center gap-x-3"> | ||
<div class="flex-none p-1 rounded-full text-amber-400 bg-gray-100/10"> | ||
<div class="w-2 h-2 bg-current rounded-full"></div> | ||
</div> | ||
<h2 class="min-w-0 text-sm font-semibold leading-6 text-white"> | ||
<a href="https://docs.speedtest-tracker.dev/" target="_blank" rel="nofollow" class="flex gap-x-2"> | ||
<span class="truncate">Getting Started</span> | ||
<span class="text-amber-400">/</span> | ||
<span class="whitespace-nowrap">Docs</span> | ||
<span class="absolute inset-0"></span> | ||
</a> | ||
</h2> | ||
</div> | ||
<div class="mt-3 flex items-center gap-x-2.5 text-sm leading-5 dark:text-gray-400 text-gray-950"> | ||
<p class="truncate"> | ||
Need help getting started with Speedtest Tracker? Check out the docs. | ||
</p> | ||
</div> | ||
</div> | ||
<svg class="flex-none w-5 h-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" /> | ||
</svg> | ||
</li> | ||
<li class="relative flex items-center py-4 space-x-4"> | ||
<div class="flex-auto min-w-0"> | ||
<div class="flex items-center gap-x-3"> | ||
<div class="flex-none p-1 rounded-full text-amber-400 bg-gray-100/10"> | ||
<div class="w-2 h-2 bg-current rounded-full"></div> | ||
</div> | ||
<h2 class="min-w-0 text-sm font-semibold leading-6 text-white"> | ||
<a href="https://github.com/alexjustesen/speedtest-tracker" target="_blank" rel="nofollow" class="flex gap-x-2"> | ||
<span class="truncate">GitHub</span> | ||
<span class="text-amber-400">/</span> | ||
<span class="whitespace-nowrap">Repo</span> | ||
<span class="absolute inset-0"></span> | ||
</a> | ||
</h2> | ||
</div> | ||
</div> | ||
<svg class="flex-none w-5 h-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" /> | ||
</svg> | ||
</li> | ||
<li class="relative flex items-center py-4 space-x-4"> | ||
<div class="flex-auto min-w-0"> | ||
<div class="flex items-center gap-x-3"> | ||
<div class="flex-none p-1 rounded-full text-amber-400 bg-gray-100/10"> | ||
<div class="w-2 h-2 bg-current rounded-full"></div> | ||
</div> | ||
<h2 class="min-w-0 text-sm font-semibold leading-6 text-white"> | ||
<a href="https://github.com/alexjustesen/speedtest-tracker/discussions" target="_blank" rel="nofollow" class="flex gap-x-2"> | ||
<span class="truncate">Discussions</span> | ||
<span class="text-amber-400">/</span> | ||
<span class="whitespace-nowrap">Community</span> | ||
<span class="absolute inset-0"></span> | ||
</a> | ||
</h2> | ||
</div> | ||
</div> | ||
<svg class="flex-none w-5 h-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" /> | ||
</svg> | ||
</li> | ||
<!-- More items... --> | ||
</ul> | ||
</div> | ||
</main> | ||
{{-- Scripts --}} | ||
@filamentScripts | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<title>{{ $title }} - {{ config('app.name') }}</title> | ||
|
||
{{-- Fonts --}} | ||
<link href="{{ asset('fonts/inter/inter.css') }}" rel="stylesheet" /> | ||
|
||
{{-- Styles --}} | ||
@filamentStyles | ||
@vite('resources/css/app.css') | ||
|
||
<script> | ||
const theme = localStorage.getItem('theme') ?? 'system' | ||
if ( | ||
theme === 'dark' || | ||
(theme === 'system' && | ||
window.matchMedia('(prefers-color-scheme: dark)') | ||
.matches) | ||
) { | ||
document.documentElement.classList.add('dark') | ||
} | ||
</script> | ||
</head> | ||
<body class="min-h-screen antialiased bg-gray-50 dark:bg-gray-950 text-gray-950 dark:text-white"> | ||
<main class="p-4 sm:p-6 lg:p-8 mx-auto max-w-{{ config('speedtest.content_width') }} space-y-4 sm:space-y-8"> | ||
<header class="flex flex-col gap-4 sm:flex-row sm:justify-between sm:items-center"> | ||
<div> | ||
<h1 class="text-2xl font-bold tracking-tight text-gray-950 dark:text-white sm:text-3xl">{{ $title ?? 'Page Title' }}</h1> | ||
</div> | ||
<div class="flex-shrink-0"> | ||
<x-filament::button | ||
href="{{ url('/admin') }}" | ||
tag="a" | ||
> | ||
Admin Panel | ||
</x-filament::button> | ||
</div> | ||
</header> | ||
{{ $slot }} | ||
</main> | ||
{{-- Scripts --}} | ||
@filamentScripts | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import defaultTheme from 'tailwindcss/defaultTheme'; | ||
import forms from '@tailwindcss/forms'; | ||
import presets from './vendor/filament/support/tailwind.config.preset'; | ||
import typography from '@tailwindcss/typography'; | ||
|
||
/** @type {import('tailwindcss').Config} */ | ||
export default { | ||
presets: [presets], | ||
|
||
content: [ | ||
'./resources/views/**/*.blade.php', | ||
'./storage/framework/views/*.php', | ||
], | ||
|
||
darkMode: 'class', | ||
|
||
theme: { | ||
extend: { | ||
fontFamily: { | ||
sans: ['Inter', ...defaultTheme.fontFamily.sans], | ||
}, | ||
}, | ||
}, | ||
|
||
plugins: [ | ||
forms, | ||
typography, | ||
], | ||
} |
Oops, something went wrong.