From efb3c62df537d2f5796a7e0996f139159a7eda01 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Fri, 16 Jul 2021 01:38:24 +0700 Subject: [PATCH] feat: limit request notice --- client/src/components/notice.svelte | 11 +++++++++++ client/src/languages/en.json | 1 + client/src/languages/id.json | 1 + client/src/routes/api.svelte | 7 +++++++ 4 files changed, 20 insertions(+) create mode 100644 client/src/components/notice.svelte diff --git a/client/src/components/notice.svelte b/client/src/components/notice.svelte new file mode 100644 index 0000000..aaaf0b6 --- /dev/null +++ b/client/src/components/notice.svelte @@ -0,0 +1,11 @@ + +
+
+
{emoji}
+
+
+
diff --git a/client/src/languages/en.json b/client/src/languages/en.json index 0bdd65d..f439aad 100644 --- a/client/src/languages/en.json +++ b/client/src/languages/en.json @@ -67,6 +67,7 @@ } }, "api": { + "limit": "We limit the request to be 15 request/minute.", "get": { "title": "Get Jokes", "random": { diff --git a/client/src/languages/id.json b/client/src/languages/id.json index 349882f..15933c5 100644 --- a/client/src/languages/id.json +++ b/client/src/languages/id.json @@ -67,6 +67,7 @@ } }, "api": { + "limit": "Kami membatasi request menjadi 15 request/menit.", "get": { "title": "Dapatkan Jokes", "random": { diff --git a/client/src/routes/api.svelte b/client/src/routes/api.svelte index 3ba7580..8212309 100644 --- a/client/src/routes/api.svelte +++ b/client/src/routes/api.svelte @@ -3,6 +3,7 @@ import { _ } from 'svelte-i18n'; import env from '$lib/env'; import Codeblock from '../components/codeblock.svelte'; + import Notice from '../components/notice.svelte'; @@ -14,6 +15,12 @@ +
+ + {$_('api.limit')} + +
+

{$_('api.get.title')}

{$_('api.get.random.title')}