Przeglądaj źródła

fix clip edit-as-new and disabled textarea style

Pi 3 miesięcy temu
rodzic
commit
63012053df
2 zmienionych plików z 7 dodań i 3 usunięć
  1. 5 0
      css/clip.css
  2. 2 3
      util-sqlpage/clip/form.sql

+ 5 - 0
css/clip.css

@@ -7,3 +7,8 @@ details svg, details img {
 textarea.form-control {
   font-family: FreeMono, monospace;
 }
+textarea.form-control[disabled] {
+  background-color: var(--tblr-bg-forms);
+  color: var(--tblr-body-color);
+  border-color: #2fb344;
+}

+ 2 - 3
util-sqlpage/clip/form.sql

@@ -1,5 +1,4 @@
-SET ":view" = COALESCE(:content, '') <> '' AND COALESCE(:action, '') <> ('Edit as New');
-SELECT 'button' AS component;
+SET ":view" = COALESCE(:content, '') <> '' AND COALESCE(:action, '') <> 'Edit as New';
 SELECT 'Open' AS title
 , 1 AS width
 , '/clip.sql?action=open' AS link
@@ -38,7 +37,7 @@ SELECT 'Paste something here...' AS placeholder
 , 'content' AS name
 , 'textarea' AS type
 , '' AS label
-, :view AS disabled
+, :view::bool AS disabled
 , CASE COALESCE(:action, '')
   WHEN 'New' THEN NULL
   ELSE :content