clip.sql 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. SELECT 'shell' AS component
  2. , 'dark' AS theme
  3. , 'Clip' AS title
  4. , 'https://shandan.one/static/clip/clip-favicon_square.svg' AS image
  5. , 'https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css' AS css
  6. ;
  7. SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/Style.sql') AS properties;
  8. SET color = '#4f8f4f';
  9. SET tool = 'clip';
  10. SET hash = CASE $hash = ''
  11. WHEN TRUE THEN NULL
  12. ELSE $hash
  13. END;
  14. SET inner = CASE $hash IS NULL
  15. WHEN TRUE THEN 'sqlpage/Link.sql'
  16. ELSE 'sqlpage/link.sql'
  17. END;
  18. SELECT 'dynamic' AS component, sqlpage.run_sql($inner) AS properties;
  19. SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/QR.sql') AS properties;
  20. SELECT 'form' AS component
  21. , '/clip' AS action
  22. , '' AS validate
  23. , 'post' AS method
  24. ;
  25. SELECT 'Paste' AS value
  26. , '' AS label
  27. , 1 AS width
  28. , 'submit' AS type
  29. , 'action' AS name
  30. ;
  31. SELECT 'Edit as New' AS value
  32. , '' AS label
  33. , 2 AS width
  34. , 'submit' AS type
  35. , 'action' AS name
  36. ;
  37. SELECT 'New' AS value
  38. , '' AS label
  39. , 1 AS width
  40. , 'submit' AS type
  41. , 'action' AS name
  42. , '/clip.sql' AS action
  43. ;
  44. SELECT 'Open' AS value
  45. , '' AS label
  46. , 1 AS width
  47. , 'submit' AS type
  48. , 'action' AS name
  49. , '/clip/open.sql' AS action
  50. ;
  51. SELECT 'Download' AS value
  52. , '' AS label
  53. , 2 AS width
  54. , 'submit' AS type
  55. , 'action' AS name
  56. ;
  57. SELECT 'Paste something here...' AS placeholder
  58. , 'textarea' AS type
  59. , 'paste' AS name
  60. , '' AS label
  61. ;