Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions android/app/src/main/kotlin/cc/hafa/reader/sync/SyncConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ object SyncConfig {
/** The terms of service. */
const val TERMS_URL = "https://reader.hafa.cc/terms"

/** The contact page. */
const val CONTACT_URL = "https://reader.hafa.cc/contact"

/** Firebase options from the values above. */
fun firebaseOptions(): FirebaseOptions =
FirebaseOptions.Builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,14 @@ private fun Note(text: AnnotatedString) {
Text(text, fontSize = 14.sp, lineHeight = 20.sp, color = ReaderTheme.colors.muted)
}

@OptIn(ExperimentalLayoutApi::class)
@Composable
private fun Policies() {
val links = LocalUriHandler.current
val colors = ReaderTheme.colors
Row(Modifier.fillMaxWidth().padding(top = 12.dp), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
for ((label, address) in listOf(R.string.privacy to SyncConfig.PRIVACY_URL, R.string.terms to SyncConfig.TERMS_URL)) {
FlowRow(Modifier.fillMaxWidth().padding(top = 12.dp), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
val pages = listOf(R.string.privacy to SyncConfig.PRIVACY_URL, R.string.terms to SyncConfig.TERMS_URL, R.string.contact to SyncConfig.CONTACT_URL)
for ((label, address) in pages) {
TextButton(onClick = { links.openUri(address) }, colors = ButtonDefaults.textButtonColors(contentColor = colors.muted)) {
Text(stringResource(label), textDecoration = TextDecoration.Underline)
}
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@
<string name="share_failed">No app on this device can share that link.</string>
<string name="privacy">Privacy</string>
<string name="terms">Terms</string>
<string name="contact">Contact</string>
</resources>
5 changes: 4 additions & 1 deletion web/src/lib/components/shortcuts-pane.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import LogIn from "@lucide/svelte/icons/log-in";
import LogOut from "@lucide/svelte/icons/log-out";
import X from "@lucide/svelte/icons/x";
import { privacyUrl, termsUrl } from "#lib/config.ts";
import { contactUrl, privacyUrl, termsUrl } from "#lib/config.ts";
import { copy } from "#lib/copy.ts";
import type { Reader } from "#lib/reader.svelte.ts";
import { type Retention, retentionFromDays } from "#lib/sync/documents.ts";
Expand Down Expand Up @@ -237,6 +237,9 @@
>{copy.privacy}</a
>
<a class="underline hover:text-ink" href={termsUrl}>{copy.terms}</a>
<a class="underline hover:text-ink" href={contactUrl}
>{copy.contact}</a
>
</p>
</section>

Expand Down
3 changes: 3 additions & 0 deletions web/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const privacyUrl = "/privacy";
/** The terms of service, a page of its own beside the app (`src/routes/(policy)/terms`), like the privacy policy. */
export const termsUrl = "/terms";

/** How to reach support, a page of its own beside the app (`src/routes/(policy)/contact`), like the privacy policy. */
export const contactUrl = "/contact";

/** The extension's Chrome Web Store listing page. */
export const chromeWebStoreUrl =
"https://chromewebstore.google.com/detail/ehmpednijaggcbpmjldkdookepbjindc";
Expand Down
2 changes: 2 additions & 0 deletions web/src/lib/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,6 @@ export const copy = {
privacy: "Privacy",
/** Link to the terms of service. */
terms: "Terms",
/** Link to the contact page. */
contact: "Contact",
};
17 changes: 17 additions & 0 deletions web/src/routes/(policy)/contact/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<svelte:head>
<title>Contact Reader</title>
<meta name="description" content="How to reach Reader's support.">
</svelte:head>

<h1>Contact</h1>

<p>
Questions, problems or requests about Reader: write to
<a href="mailto:support@reader.hafa.cc">support@reader.hafa.cc</a>.
</p>

<p>
To delete your account, use the <a href="/delete">delete account page</a>.
What Reader stores, and where, is in the
<a href="/privacy">privacy policy</a>.
</p>
3 changes: 2 additions & 1 deletion web/src/routes/(policy)/privacy/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
<h2>Contact</h2>
<ul>
<li>
<a href="mailto:support@reader.hafa.cc">support@reader.hafa.cc</a>
<a href="mailto:support@reader.hafa.cc">support@reader.hafa.cc</a>, or see
the <a href="/contact">contact page</a>.
</li>
</ul>
3 changes: 2 additions & 1 deletion web/src/routes/(policy)/terms/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
it shows belong to the sites that publish them. Reader is provided as is, with
no warranty. You can stop at any time; what is stored and how to delete it is
in the <a href="/privacy">privacy policy</a>. Questions:
<a href="mailto:support@reader.hafa.cc">support@reader.hafa.cc</a>.
<a href="mailto:support@reader.hafa.cc">support@reader.hafa.cc</a>, or see the
<a href="/contact">contact page</a>.
</p>
Loading