diff --git a/src/view/lib/styles.ts b/src/view/lib/styles.ts
index d3fc8c70fc..26d33f6cbd 100644
--- a/src/view/lib/styles.ts
+++ b/src/view/lib/styles.ts
@@ -68,6 +68,9 @@ export const s = StyleSheet.create({
light: {fontWeight: '300'},
fw200: {fontWeight: '200'},
+ // text decoration
+ underline: {textDecorationLine: 'underline'},
+
// font sizes
f9: {fontSize: 9},
f10: {fontSize: 10},
diff --git a/src/view/screens/Login.tsx b/src/view/screens/Login.tsx
index 4175e0a340..38c2c1c79d 100644
--- a/src/view/screens/Login.tsx
+++ b/src/view/screens/Login.tsx
@@ -15,6 +15,7 @@ import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import * as EmailValidator from 'email-validator'
import {observer} from 'mobx-react-lite'
import {Picker} from '../com/util/Picker'
+import {TextLink} from '../com/util/Link'
import {s, colors} from '../lib/styles'
import {
makeValidHandle,
@@ -370,6 +371,55 @@ const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => {
>
)
+ const Policies = () => {
+ if (!serviceDescription) {
+ return
+ }
+ const tos = validWebLink(serviceDescription.links?.termsOfService)
+ const pp = validWebLink(serviceDescription.links?.privacyPolicy)
+ if (!tos && !pp) {
+ return (
+
+
+
+
+
+ This service has not provided terms of service or a privacy policy.
+
+
+ )
+ }
+ const els = []
+ if (tos) {
+ els.push(
+ ,
+ )
+ }
+ if (pp) {
+ els.push(
+ ,
+ )
+ }
+ if (els.length === 2) {
+ els.splice(1, 0, and )
+ }
+ return (
+
+
+ By creating an account you agree to the {els}.
+
+
+ )
+ }
+
return (
@@ -510,6 +560,7 @@ const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => {
+
Back
@@ -567,6 +618,12 @@ export const Login = observer(
},
)
+function validWebLink(url?: string): string | undefined {
+ return url && (url.startsWith('http://') || url.startsWith('https://'))
+ ? url
+ : undefined
+}
+
const styles = StyleSheet.create({
outer: {
flex: 1,
@@ -692,6 +749,12 @@ const styles = StyleSheet.create({
pickerIcon: {
color: colors.white,
},
+ policies: {
+ flexDirection: 'row',
+ alignItems: 'flex-start',
+ paddingHorizontal: 20,
+ paddingBottom: 20,
+ },
error: {
borderWidth: 1,
borderColor: colors.red5,