Add iOS & Android build + frontend fixes for desktop
Build & Push Docker Images / test-backend (push) Successful in 53s
Build & Push Docker Images / test-frontend (push) Successful in 58s
Build & Push Docker Images / build-backend (push) Successful in 1m4s
Build & Push Docker Images / build-frontend (push) Failing after 56s
Build & Push Docker Images / test-backend (push) Successful in 53s
Build & Push Docker Images / test-frontend (push) Successful in 58s
Build & Push Docker Images / build-backend (push) Successful in 1m4s
Build & Push Docker Images / build-frontend (push) Failing after 56s
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: 1.25rem;
|
||||
margin-top: 1rem;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding: 0.5rem 0.5rem 0.5rem 0;
|
||||
animation: fadeInUp 0.8s ease-out 0.4s backwards;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
import './index.css';
|
||||
import { initNativeShell } from './utils/native';
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')).render(
|
||||
<React.StrictMode>
|
||||
@@ -9,3 +10,5 @@ ReactDOM.createRoot(document.getElementById('root')).render(
|
||||
</React.StrictMode>
|
||||
);
|
||||
|
||||
initNativeShell();
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
// Capacitor bootstrap — no-ops on the web, configures native shell on mobile.
|
||||
// Plugins are dynamic-imported so the web bundle isn't penalized.
|
||||
|
||||
let initStarted = false;
|
||||
|
||||
export function isNativeApp() {
|
||||
return typeof window !== 'undefined' && Boolean(window.Capacitor?.isNativePlatform?.());
|
||||
}
|
||||
|
||||
export async function initNativeShell() {
|
||||
if (initStarted || !isNativeApp()) return;
|
||||
initStarted = true;
|
||||
|
||||
try {
|
||||
const { StatusBar, Style } = await import('@capacitor/status-bar');
|
||||
await StatusBar.setBackgroundColor({ color: '#0f766e' }).catch(() => {});
|
||||
await StatusBar.setStyle({ style: Style.Light }).catch(() => {});
|
||||
} catch {
|
||||
/* plugin not present — fine on web */
|
||||
}
|
||||
|
||||
try {
|
||||
const { SplashScreen } = await import('@capacitor/splash-screen');
|
||||
await SplashScreen.hide({ fadeOutDuration: 250 }).catch(() => {});
|
||||
} catch {
|
||||
/* plugin not present — fine on web */
|
||||
}
|
||||
|
||||
try {
|
||||
const { App } = await import('@capacitor/app');
|
||||
App.addListener('backButton', ({ canGoBack }) => {
|
||||
if (canGoBack) window.history.back();
|
||||
else App.exitApp();
|
||||
});
|
||||
} catch {
|
||||
/* plugin not present — fine on web */
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user