diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..8150def --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,8 @@ +RewriteEngine On + +RewriteCond %{HTTPS} off +RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . index.html [L] diff --git a/src/lib/components/Common.ts b/src/lib/components/Common.ts index 79fdaa6..2d7be2c 100644 --- a/src/lib/components/Common.ts +++ b/src/lib/components/Common.ts @@ -3,13 +3,12 @@ import Input from './Common/Input.svelte'; import InputWrappper from './Common/InputWrappper.svelte'; import Loading from './Common/Loading.svelte'; import SOffline from './Common/SOffline.svelte'; -import Link from './Common/Link.svelte'; import Sortable from './Common/Sortable.svelte'; import Radio from './Common/Radio.svelte'; import Checkbox from './Common/Checkbox.svelte'; import Switch from './Common/Switch.svelte'; import Select from './Common/Select.svelte'; -import { Body, Html, PwaInstaller } from './Common/Meta'; +export { Body, Html, PwaInstaller } from './Common/Meta'; -export { Button, Input, InputWrappper, Loading, SOffline, Body, Html, PwaInstaller, Link, Sortable, Switch, Radio, Checkbox, Select }; +export { Button, Input, InputWrappper, Loading, SOffline, Sortable, Switch, Radio, Checkbox, Select }; diff --git a/src/lib/components/Common/Button.svelte b/src/lib/components/Common/Button.svelte index 9cff1fe..d715b4f 100644 --- a/src/lib/components/Common/Button.svelte +++ b/src/lib/components/Common/Button.svelte @@ -1,13 +1,32 @@ -{#if href !== null} - - - +{#if href} + {#if isValidHttpUrl(href)} + + + + {:else} + + + + {/if} {:else} -{/if}