Skip to content

Commit

Permalink
add license
Browse files Browse the repository at this point in the history
  • Loading branch information
gkasdorf committed Oct 21, 2023
1 parent c661489 commit 30e4949
Show file tree
Hide file tree
Showing 8 changed files with 832 additions and 10 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module.exports = {
"asyncArrow": "always"
}],
"@typescript-eslint/no-non-null-assertion": [0],
"@typescript-eslint/no-confusing-void-expression": 'off',
"react/jsx-curly-brace-presence": [2, { props: "never", children: "never" }],
"jsx-quotes": [2, "prefer-double"],
"prettier/prettier": [2, {
Expand Down
678 changes: 678 additions & 0 deletions assets/licenseAgreement.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions assets/terms.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<p>Welcome to Memmy! Before you proceed, please carefully read and agree to the following Terms of Service (&quot;Terms&quot;) governing your use of our app. By accessing or using Memmy, you acknowledge that you have read, understood, and agreed to be bound by these Terms. If you do not agree with any part of these Terms, please refrain from using our app.</p>

<p>1. User Responsibilities</p>

<p>1.1 Reporting Content: Memmy encourages users to report any content they find questionable or in violation of the Lemmy instance's rules and guidelines. You may report such content to the moderators of the Lemmy instance you are using, either within Memmy or through the reporting mechanisms provided by the instance. We are not responsible for moderating or enforcing Lemmy instance rules, but we encourage you to help maintain a positive and respectful community by reporting objectionable content.</p>

<p>1.2 Blocking Users and Instances: Memmy provides users with the ability to block individual users or entire instances that they find questionable or wish to avoid. This feature empowers you to customize your Memmy experience and enhance your interactions within the app. We encourage you to use these blocking features as needed to create a safe and enjoyable environment for yourself.</p>

<p>1.3 Following Rules of Instances: Memmy encourages all users to follow the rules of the instance they are using. The terms of your instance can be found on the website for your instance. Failure to comply with all the rules of your instance will result in termination of your account with that instance.</p>

<p>1.4 No Misuse: The misuse of Memmy will result in termination of all services - to the furthest of our ability - with us. We reserve the right to terminate - to the furthest of our ability - all services that you use including push notifications and instance searching.</p>

<p>1.5 No Abusive, Unlawful, or Offensive Content: You agree that you will not use Memmy to produce any abusive or offensive content. This includes, but is not limited to: content that is unlawful, harmful, threatening, abusive, harassing, tortious, defamatory, vulgar, obscene, libelous, invasive, hateful, or racially, ethnically, or otherwise objectionable. The content you produce will not harm minors in any way. You will not impersonate any person or entity. You will not upload or post any content that you do not have the right to make available under any US or foreign laws. You will not produce content that interferes with or disrupts the app, the Lemmy instances that you use, other Lemmy instances, or any other service or person. You will not transmit misinformation in any capacity to any individual.</p>

<p>2. Limitation of Liability</p>

<p>2.1 No Liability: To the fullest extent permitted by applicable law, we disclaim any liability for any direct, indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, arising from your use of Memmy or any interactions within the Lemmy instances. This includes, but is not limited to, any damages resulting from the content, actions, or conduct of other users or the Lemmy instances.</p>

<p>3. General Provisions</p>

<p>3.1 Modifications: We reserve the right to modify, suspend, or terminate Memmy or these Terms, at our sole discretion, at any time and without prior notice. Your continued use of Memmy after any modifications to these Terms shall constitute your acceptance of the modified Terms.</p>

<p>3.2 Governing Law: These Terms shall be governed by and construed in accordance with the laws of the United States, without regard to its conflict of laws principles.</p>

<p>3.3 Entire Agreement: These Terms constitute the entire agreement between you and us regarding your use of Memmy and supersede any prior or contemporaneous agreements, communications, or proposals, whether oral or written, between you and us.</p>

<p>By using Memmy, you affirm that you have read, understood, and agreed to these revised Terms of Service. If you have any questions or concerns, please contact us at [email protected]. Thank you for using Memmy!</p>
6 changes: 6 additions & 0 deletions src/components/Navigation/MainScreens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import CommentChainScreen from '@components/Comment/screens/CommentChainScreen';
import ReplyScreen from '@components/Reply/screens/ReplyScreen';
import ProfileScreen from '@components/Profile/screens/ProfileScreen';
import NewPostScreen from '@components/NewPost/screens/NewPostScreen';
import WebViewScreen from '@components/WebViewer/WebViewScreen';

export default function MainScreens(
stack: TypedNavigator<
Expand Down Expand Up @@ -72,6 +73,11 @@ export default function MainScreens(
component={NewPostScreen}
options={{ gestureEnabled: false, headerTitle: 'New Post' }}
/>
<stack.Screen
name="WebView"
component={WebViewScreen}
options={{ headerTitle: 'View' }}
/>
</stack.Group>
</>
);
Expand Down
6 changes: 6 additions & 0 deletions src/components/Navigation/SettingsStackScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SettingsAppearanceScreen from '@components/Settings/screens/SettingsAppea
import SettingsThemeScreen from '@components/Settings/screens/SettingsThemesScreen';
import SettingsAccentScreen from '@components/Settings/screens/SettingsAccentScreen';
import AddAccountModal from '@components/Account/screens/AddAccountModal';
import WebViewScreen from '@components/WebViewer/WebViewScreen';

const SettingsStack = createNativeStackNavigator();

Expand Down Expand Up @@ -67,6 +68,11 @@ export default function SettingsStackScreen(): React.JSX.Element {
headerTitle: 'Add Account',
}}
/>
<SettingsStack.Screen
name="WebView"
component={WebViewScreen}
options={{ headerTitle: 'View' }}
/>
</SettingsStack.Group>
</SettingsStack.Navigator>
);
Expand Down
56 changes: 50 additions & 6 deletions src/components/Settings/screens/SettingsAboutScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import Table from '@components/Common/Table/Table';
import { getBuildNumber, getReadableVersion } from 'react-native-device-info';
import ScrollView from '@components/Common/Gui/ScrollView';
import { openLink } from '@helpers/links';
import { useTheme } from 'tamagui';

interface IProps {
navigation: NativeStackNavigationProp<any>;
Expand All @@ -11,19 +13,61 @@ interface IProps {
export default function SettingsAboutScreen({
navigation,
}: IProps): React.JSX.Element {
const theme = useTheme();

return (
<ScrollView flex={1}>
<Table.Container>
<Table.Section>
<Table.Section footer="Mouse Loading Icon by Icons8">
<Table.Cell
label="Version"
rightLabel={`${getReadableVersion()} (${getBuildNumber()})`}
/>
<Table.Cell label="License" useChevron onPress={() => {}} />
<Table.Cell label="Acknowledgements" useChevron onPress={() => {}} />
<Table.Cell label="Privacy Policy" useChevron onPress={() => {}} />
<Table.Cell label="Terms" useChevron onPress={() => {}} />
<Table.Cell label="GitHub" useChevron onPress={() => {}} />
<Table.Cell
label="License"
useChevron
onPress={() => {
navigation.push('WebView', { source: 'licenseAgreement' });
}}
/>
<Table.Cell
label="Acknowledgements"
useChevron
onPress={() => {
navigation.push('WebView', { source: 'acknowledgements' });
}}
/>
<Table.Cell
label="Privacy Policy"
useChevron
onPress={() => {
navigation.push('WebView', { source: 'privacy' });
}}
/>
<Table.Cell
label="Terms"
useChevron
onPress={() => {
navigation.push('WebView', { source: 'terms' });
}}
/>
<Table.Cell
label="GitHub"
useChevron
onPress={() => {
void openLink(
'https://github.com/memmy-app/memmy',
theme.navBarBg.val,
);
}}
/>
<Table.Cell
label="Icons8"
useChevron
onPress={() => {
void openLink('https://icons8.com/', theme.navBarBg.val);
}}
/>
</Table.Section>
</Table.Container>
</ScrollView>
Expand Down
18 changes: 14 additions & 4 deletions src/components/Settings/screens/SettingsIndexScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {
} from '@tamagui/lucide-icons';
import { deleteLog, sendLog } from '@src/helpers';
import { Alert } from 'react-native';
import { openLink } from '@helpers/links';
import { useTheme } from 'tamagui';

interface IProps {
navigation: NativeStackNavigationProp<any>;
Expand Down Expand Up @@ -42,6 +44,8 @@ const onClearDebugLogPress = (): void => {
export default function SettingsIndexScreen({
navigation,
}: IProps): React.JSX.Element {
const theme = useTheme();

return (
<ScrollView flex={1} contentInsetAdjustmentBehavior="automatic">
<Table.Container>
Expand Down Expand Up @@ -103,10 +107,16 @@ export default function SettingsIndexScreen({
/>
</Table.Section>
<Table.Section header="Memmy">
<Table.Cell label="Privacy" useChevron />
<Table.Cell label="Terms" useChevron />
<Table.Cell label="Report a Bug" useChevron />
<Table.Cell label="Check Lemmy Service" useChevron />
<Table.Cell
label="Report a Bug"
useChevron
onPress={() => {
void openLink(
'https://github.com/Memmy-App/memmy/issues/new?assignees=&labels=bug%2Ctriage&projects=&template=bug_report.yml&title=%5BBug%5D%3A+',
theme.navBarBg.val,
);
}}
/>
<Table.Cell
label="Submit Debug Log"
useChevron
Expand Down
48 changes: 48 additions & 0 deletions src/components/WebViewer/WebViewScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from 'react';
import { INavigationProps } from '@src/types';
import WebView from 'react-native-webview';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const licenseHtml = require('../../../assets/licenseAgreement.html');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const terms = require('../../../assets/terms.html');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const acknowledgements = require('../../../assets/license.html');

export default function WebViewScreen({
route,
}: INavigationProps): React.JSX.Element {
const { source } = route.params;

let content;

switch (source) {
case 'licenseAgreement': {
content = licenseHtml;
break;
}
case 'terms': {
content = terms;
break;
}
case 'acknowledgements': {
content = acknowledgements;
break;
}
case 'privacy': {
content = 'https://memmy.app/privacy.txt';
break;
}
default: {
content = acknowledgements;
}
}

return (
<WebView
style={{ flex: 1 }}
source={content}
originWhitelist={['*']}
></WebView>
);
}

0 comments on commit 30e4949

Please sign in to comment.