goto.sql 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. SET ":title" = 'GoTo';
  2. SET ":tool" = 'goto';
  3. SET ":hash" = COALESCE($hash, '');
  4. SET ":hash" = sqlpage.url_encode(:hash);
  5. SET ":go" = COALESCE($go, '');
  6. SET ":color" = '#dc4e41';
  7. SET ":tabler_color" = 'google';
  8. SET ":image" = '/static/goto/chain-link2fr-3-2.svg';
  9. SET ":favicon" = :image;
  10. SET ":manifest" = '/static/goto/manifest.json';
  11. SET ":action" = COALESCE($action, :action, '');
  12. SET ":inner" = (CASE :action
  13. WHEN 'open' THEN 'sqlpage/Open.sql'
  14. ELSE 'goto/Index.sql'
  15. END);
  16. SELECT 'dynamic' AS component, sqlpage.run_sql('goto/redirect.sql') AS properties
  17. WHERE (:go = 'true' AND :hash <> '');
  18. SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/theme.sql') AS properties;
  19. SET ":spinner" = COALESCE(:content,'') <> '' AND COALESCE(:action, '') = 'Shrtn It!';
  20. SELECT 'loader-start' AS component
  21. , 'lg' AS size
  22. , :tabler_color AS color
  23. , '' AS spinner
  24. WHERE :spinner
  25. ;
  26. SELECT 'progress' AS component
  27. , 'lg' AS size
  28. , :tabler_color AS color
  29. WHERE :spinner
  30. ;
  31. SELECT 'dynamic' AS component, sqlpage.run_sql(:inner) AS properties;