clip.sql 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 'form' AS component
  20. , '/clip' AS action
  21. , '' AS validate
  22. , 'post' AS method
  23. ;
  24. SELECT 'Paste' AS value
  25. , '' AS label
  26. , 1 AS width
  27. , 'submit' AS type
  28. , 'action' AS name
  29. ;
  30. SELECT 'Edit as New' AS value
  31. , '' AS label
  32. , 2 AS width
  33. , 'submit' AS type
  34. , 'action' AS name
  35. ;
  36. SELECT 'New' AS value
  37. , '' AS label
  38. , 1 AS width
  39. , 'submit' AS type
  40. , 'action' AS name
  41. , '/clip.sql' AS action
  42. ;
  43. SELECT 'Open' AS value
  44. , '' AS label
  45. , 1 AS width
  46. , 'submit' AS type
  47. , 'action' AS name
  48. , '/clip/open.sql' AS action
  49. ;
  50. SELECT 'Download' AS value
  51. , '' AS label
  52. , 2 AS width
  53. , 'submit' AS type
  54. , 'action' AS name
  55. ;
  56. SELECT 'Paste something here...' AS placeholder
  57. , 'textarea' AS type
  58. , 'paste' AS name
  59. , '' AS label
  60. ;