Compare commits

..
2 Commits
Author SHA1 Message Date
dredgy a39f97a4be Fixed PWA on iOS 27 2026-11-03 13:17:31 +10:00
dredgy c575a8dcba Fixed PWA on iOS 27 2026-09-24 13:49:28 +10:00
5 changed files with 43 additions and 4 deletions

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8.4", "php": "^8.5.12",
"ext-pdo": "*", "ext-pdo": "*",
"inertiajs/inertia-laravel": "^2.0", "inertiajs/inertia-laravel": "^2.0",
"laravel-notification-channels/webpush": "^11.0", "laravel-notification-channels/webpush": "^11.0",
+2 -2
View File
@@ -1,7 +1,7 @@
FROM php:8.4-fpm-alpine FROM php:8.5-fpm-alpine
RUN apk add --no-cache nginx curl zip unzip git postgresql-dev nodejs npm dcron \ RUN apk add --no-cache nginx curl zip unzip git postgresql-dev nodejs npm dcron \
&& docker-php-ext-install pdo pdo_pgsql pgsql opcache pcntl && docker-php-ext-install pdo pdo_pgsql pgsql pcntl
RUN docker-php-ext-install bcmath RUN docker-php-ext-install bcmath
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
+33
View File
@@ -17,11 +17,34 @@ const page = usePage<SharedProps>().props
router.on('success', () => { router.on('success', () => {
transitionKey.value++; transitionKey.value++;
}); });
const isIOS27PlusPWA = (() => {
const ua = navigator.userAgent;
const isStandalone =
window.matchMedia('(display-mode: standalone)').matches ||
(navigator as Navigator & { standalone?: boolean }).standalone;
if (!isStandalone) return false;
// iPhone / iPad detection
const isIOS =
/iPhone|iPad|iPod/.test(ua) ||
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
if (!isIOS) return false;
// iOS 27+ detection (Safari version token)
const version = ua.match(/Version\/(\d+)/);
return version && parseInt(version[1]) >= 27;
})();
</script> </script>
<template> <template>
<Radar> <Radar>
<div class="layoutContainer"> <div class="layoutContainer">
<div v-if="isIOS27PlusPWA" class="ios-top-bar"></div>
<MainHeader :key="`header-${transitionKey}`" /> <MainHeader :key="`header-${transitionKey}`" />
<Transition name="fade" mode="out-in"> <Transition name="fade" mode="out-in">
<main id="pageContainer" :key="`main-${transitionKey}`"> <main id="pageContainer" :key="`main-${transitionKey}`">
@@ -49,6 +72,16 @@ router.on('success', () => {
overflow-y: auto; overflow-y: auto;
} }
.ios-top-bar {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 6px;
z-index: 9999;
background: var(--surface);
}
header, header,
footer { footer {
flex: 0 0 5dvh; flex: 0 0 5dvh;
-1
View File
@@ -16,7 +16,6 @@
<link rel="apple-touch-icon" href="/img/app_icons/apple-touch-icon-180.png"> <link rel="apple-touch-icon" href="/img/app_icons/apple-touch-icon-180.png">
<meta name="mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="FlightsGoneBy"> <meta name="apple-mobile-web-app-title" content="FlightsGoneBy">
<script defer src="https://stats.dredgy.au/script.js" data-website-id="70a7276c-bdd3-4833-b286-4962ab28b5b5"></script> <script defer src="https://stats.dredgy.au/script.js" data-website-id="70a7276c-bdd3-4833-b286-4962ab28b5b5"></script>
<link rel="apple-touch-startup-image" media="screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/img/logos/apple-splash-portrait-2048x2732.png"> <link rel="apple-touch-startup-image" media="screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/img/logos/apple-splash-portrait-2048x2732.png">
+7
View File
@@ -44,6 +44,13 @@ use Inertia\Inertia;
Route::get('/missing-airlines', [AdminController::class, 'reconcileMissingAirlines'])->name('reconcile-missing-airlines')->middleware('permission:reconcile_missing_liveries'); Route::get('/missing-airlines', [AdminController::class, 'reconcileMissingAirlines'])->name('reconcile-missing-airlines')->middleware('permission:reconcile_missing_liveries');
Route::post('/ignore-missing-airline', [AdminController::class, 'ignoreMissingAirline'])->name('admin.ignore-missing-airline'); Route::post('/ignore-missing-airline', [AdminController::class, 'ignoreMissingAirline'])->name('admin.ignore-missing-airline');
Route::get('/server-info', function () {
return response()->json([
'php_version' => PHP_VERSION,
'laravel_version' => app()->version(),
'environment' => app()->environment(),
]);
})->name('server-info');
}); });