mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 08:39:02 +03:00
fix(app): don't show the Hex tip on touch devices (#64583)
Co-authored-by: Brendan <brendan@anoma.ly>
This commit is contained in:
committed by
GitHub
Unverified
parent
54b4698a72
commit
aab2f85c86
@@ -1,3 +1,4 @@
|
||||
import { createMediaQuery } from "@solid-primitives/media"
|
||||
import { showToast, toaster } from "@opencode/ui/toast"
|
||||
import { Schema } from "effect"
|
||||
import { createEffect, createMemo, createSignal, onCleanup } from "solid-js"
|
||||
@@ -24,6 +25,7 @@ export function createTipToasts() {
|
||||
const servers = useServers()
|
||||
const language = useLanguage()
|
||||
const platform = usePlatform()
|
||||
const touch = createMediaQuery("(hover: none)")
|
||||
|
||||
const server = createMemo(() => {
|
||||
const conn = servers.visible.find(servers.current) ?? servers.visible[0]
|
||||
@@ -74,7 +76,7 @@ export function createTipToasts() {
|
||||
id: "hex",
|
||||
title: "tips.hex.title",
|
||||
description: "tips.hex.description",
|
||||
when: () => hexInstalled() === false,
|
||||
when: () => !touch() && hexInstalled() === false,
|
||||
action: {
|
||||
label: "tips.hex.install",
|
||||
// anoma.ly/hex 404s with a query string; the trailing slash is required.
|
||||
|
||||
Reference in New Issue
Block a user