From 85eda69bebc3a4150f64df112fb9874b4ee801f9 Mon Sep 17 00:00:00 2001 From: Tio Date: Fri, 6 May 2022 20:05:45 +0700 Subject: [PATCH] feat: add share button (#67) * feat: add share button * fix: adjust icon size Co-authored-by: Akhmad Salafudin --- src/component/TajweedView.svelte | 61 +++++++++++------- src/component/button/share.svelte | 71 +++++++++++++++++---- src/routes/[source]/surah/[surah_id].svelte | 8 +-- src/routes/index.svelte | 8 ++- src/store/Setting.ts | 2 +- 5 files changed, 103 insertions(+), 47 deletions(-) diff --git a/src/component/TajweedView.svelte b/src/component/TajweedView.svelte index 86c58e3..5969e51 100644 --- a/src/component/TajweedView.svelte +++ b/src/component/TajweedView.svelte @@ -94,26 +94,30 @@ {#each surah as aya} -
+
{#if aya.sura_id != 1 || aya.aya_number != 1}
- - {#each aya.tajweed as tajweed} - showToolTip(e, tajweed)} - >{aya.aya_text.slice(tajweed.start, tajweed.end)} - {/each} - - +
+ + {#each aya.tajweed as tajweed} + showToolTip(e, tajweed)} + >{aya.aya_text.slice(tajweed.start, tajweed.end)} + {/each} + +
+ +
+
+ + + +
{/if} {/if} diff --git a/src/component/button/share.svelte b/src/component/button/share.svelte index 459c706..5abe75a 100644 --- a/src/component/button/share.svelte +++ b/src/component/button/share.svelte @@ -1,4 +1,6 @@ -
- Share: - - - - - - - - - - - - +
+
+ + + {#if show} + + {/if} +
diff --git a/src/routes/[source]/surah/[surah_id].svelte b/src/routes/[source]/surah/[surah_id].svelte index e21a5c7..f1c234d 100644 --- a/src/routes/[source]/surah/[surah_id].svelte +++ b/src/routes/[source]/surah/[surah_id].svelte @@ -31,7 +31,6 @@ import TajweedView from '$component/TajweedView.svelte'; import { Setting$ } from '$store/Setting'; import { goto } from '$app/navigation'; - import Share from '$component/button/share.svelte'; import Header from '$component/header.svelte'; import ModalGoToAyat from '$component/modal/ModalGoToAyat.svelte'; @@ -43,7 +42,7 @@ const saveLastReading = ({ detail: { sura_id, aya_number } }: { detail: IAya }) => { $Setting$.last_read_aya = aya_number.toString(); $Setting$.last_read_surah = sura_id.toString(); - alert('Data berhasil disimpan'); + alert('berhasil menandai sebagai ayat terakhir dibaca'); }; const nextSurah = () => { @@ -58,7 +57,7 @@
prevSurah()}> {#if surahDetail.id > 1} @@ -92,9 +91,6 @@ >{surahDetail.id == 1 ? '1. ' : ''}{basmalah01} {/if} -
{/if}
diff --git a/src/routes/index.svelte b/src/routes/index.svelte index 100524d..ab387ec 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -22,6 +22,10 @@ } }; + const gotoBookMark = () => { + alert('fitur masih dalam tahap pengembangan'); + }; + const gotoTasbih = () => { goto('tasbih'); }; @@ -55,7 +59,7 @@
setting
@@ -123,7 +127,7 @@
{surah.surat_text} diff --git a/src/store/Setting.ts b/src/store/Setting.ts index caa5fbc..db06071 100644 --- a/src/store/Setting.ts +++ b/src/store/Setting.ts @@ -14,7 +14,7 @@ const defaultSetting: ISetting = { last_read_aya: '', last_read_surah: '', theme: 'light', - ukuranAyat: 16, + ukuranAyat: 26, ukuranTerjemahan: 12, showTranslate: true };