Fixed namespace, updated mobile navbar z-index

This commit is contained in:
Alois 2026-04-05 11:41:05 +02:00
commit 287d01c157
25 changed files with 30 additions and 45 deletions

View file

@ -1,5 +1,4 @@
import java.util.Properties
import java.io.FileInputStream
plugins {
id("com.android.application")
@ -16,10 +15,10 @@ val tauriProperties = Properties().apply {
android {
compileSdk = 36
namespace = "net.tensamin.app"
namespace = "net.tensamin.client"
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
applicationId = "net.tensamin.app"
applicationId = "net.tensamin.client"
minSdk = 24
targetSdk = 36
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()

View file

@ -1,4 +1,4 @@
package net.tensamin.app
package net.tensamin.client
import android.os.Bundle
import androidx.activity.enableEdgeToEdge

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#fff</color>
</resources>

View file

@ -118,8 +118,8 @@ export function MobileNavbar() {
const { setOpenMobile } = useSidebar();
return (
<div className="z-100 w-full pb-[env(safe-area-inset-bottom)] bg-card border-t">
<div className="z-100 w-full h-14 flex justify-center items-center gap-8">
<div className="z-51 w-full pb-[env(safe-area-inset-bottom)] bg-card border-t">
<div className="z-51 w-full h-14 flex justify-center items-center gap-8">
<SidebarTrigger
className="text-foreground w-12! h-12! aspect-square rounded-xl"
variant="link"

View file

@ -20,38 +20,10 @@ import { isTauri } from "@tauri-apps/api/core";
* @returns unknown.
*/
export default function Layout(props: { children: ReactNode }) {
const [pixelRatio, setPixelRatio] = useState(devicePixelRatio);
const [visible, setVisible] = useState(false);
const isMobile = useIsMobile();
useEffect(() => {
const handleResize = () => {
setPixelRatio(devicePixelRatio);
setVisible(true);
setTimeout(() => setVisible(false), 1000);
};
window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
}, []);
return (
<>
<div className="fixed top-0 left-0 z-100 w-screen h-screen flex flex-col justify-center items-center pointer-events-none select-none">
{visible && (
<div className="bg-card border p-1 text-xs">
{Math.round(pixelRatio)}
</div>
)}
{/* Todo: Make this nicer */}
{pixelRatio !== 1 && (
<div className="fixed bottom-0 right-0 m-3 text-xs text-red-500">
Hey! You're zoomed in.
</div>
)}
</div>
<Toaster
position={isMobile ? "top-center" : "bottom-right"}
{...(isTauri()

View file

@ -3,7 +3,30 @@ import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
import tailwindcss from "@tailwindcss/vite";
const host = process.env.TAURI_DEV_HOST;
export default defineConfig({
clearScreen: false,
server: {
port: 5173,
strictPort: true,
host: host || "0.0.0.0",
hmr: host
? {
protocol: "ws",
host,
port: 1421,
}
: undefined,
watch: {
ignored: ["**/src-tauri/**"],
},
},
envPrefix: ["VITE_", "TAURI_ENV_*"],
build: {
minify: !process.env.TAURI_ENV_DEBUG ? "esbuild" : false,
sourcemap: !!process.env.TAURI_ENV_DEBUG,
},
plugins: [react(), tsconfigPaths(), tailwindcss()],
worker: {
format: "es",

View file

@ -31,7 +31,7 @@ function DialogOverlay({
<DialogPrimitive.Backdrop
data-slot="dialog-overlay"
className={cn(
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
"fixed inset-0 isolate z-52 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
className,
)}
{...props}
@ -53,7 +53,7 @@ function DialogContent({
<DialogPrimitive.Popup
data-slot="dialog-content"
className={cn(
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
"fixed top-1/2 left-1/2 z-52 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
className,
)}
{...props}