feat(os-info): only showing screenshot button on linux

This commit is contained in:
2025-04-27 15:01:37 +01:00
parent 4922df6682
commit 365ef387dd
6 changed files with 64 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
import { Route, Router } from "@solidjs/router";
import { listen } from "@tauri-apps/api/event";
import { createEffect, createSignal, onCleanup } from "solid-js";
import { createEffect, createSignal, onCleanup, Show } from "solid-js";
import { Login } from "./Login";
import { ProtectedRoute } from "./ProtectedRoute";
import { Search } from "./Search";
@@ -10,6 +10,9 @@ import type { sendImage } from "./network";
import { ImageStatus } from "./components/image-status/ImageStatus";
import { invoke } from "@tauri-apps/api/core";
import { SearchImageContextProvider } from "./contexts/SearchImageContext";
import { platform } from "@tauri-apps/plugin-os";
const currentPlatform = platform();
export const App = () => {
const [processingImage, setProcessingImage] =
@@ -58,9 +61,11 @@ export const App = () => {
return (
<SearchImageContextProvider>
<button type="button" onClick={onTakeScreenshot}>
Take Screenshot [wayland :(]
</button>
<Show when={currentPlatform === "linux"}>
<button type="button" onClick={onTakeScreenshot}>
Take Screenshot [wayland :(]
</button>
</Show>
<ImageViewer onSendImage={setProcessingImage} />
<ImageStatus
processingImage={processingImage}