fix(client): sql result taking unnecessary space when inactive

This commit is contained in:
Elian Doran 2025-09-06 11:28:19 +03:00
parent 10a6a3056a
commit 49c80f0e0b
No known key found for this signature in database

View File

@ -14,9 +14,10 @@ export default function SqlResults() {
setResults(results); setResults(results);
}) })
const isEnabled = note?.mime === "text/x-sqlite;schema=trilium";
return ( return (
<div className="sql-result-widget"> <div className={`sql-result-widget ${!isEnabled ? "hidden-ext" : ""}`}>
{note?.mime === "text/x-sqlite;schema=trilium" && ( {isEnabled && (
results?.length === 1 && Array.isArray(results[0]) && results[0].length === 0 ? ( results?.length === 1 && Array.isArray(results[0]) && results[0].length === 0 ? (
<Alert type="info"> <Alert type="info">
{t("sql_result.no_rows")} {t("sql_result.no_rows")}