feat(os-info): only showing screenshot button on linux
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user