From 5477c5d473abd0b1b6b24d8885d32fc286bfaf9d Mon Sep 17 00:00:00 2001 From: Rexogamer Date: Thu, 13 Feb 2025 05:48:07 +0000 Subject: [PATCH] chore: misc cleanup --- .eslintrc.js | 1 + App.tsx | 4 +- .../sections/server/InviteSettingsSection.tsx | 38 ++++++++++++++++++- src/lib/utils/utils.ts | 2 +- 4 files changed, 40 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f762ecea..36fc6deb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,4 +5,5 @@ module.exports = { 'react/react-in-jsx-scope': 0, 'react-native/no-inline-styles': 0, // TODO: turn this back on when the codebase is less error-filled }, + ignorePatterns: ['dist'], }; diff --git a/App.tsx b/App.tsx index 7b0ffb00..14d996b5 100644 --- a/App.tsx +++ b/App.tsx @@ -30,9 +30,9 @@ export const App = () => { - {/* */} + - {/* */} + ); diff --git a/src/components/common/settings/sections/server/InviteSettingsSection.tsx b/src/components/common/settings/sections/server/InviteSettingsSection.tsx index 22ac8dd6..f9871022 100644 --- a/src/components/common/settings/sections/server/InviteSettingsSection.tsx +++ b/src/components/common/settings/sections/server/InviteSettingsSection.tsx @@ -7,10 +7,11 @@ import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; import type {API, Server} from 'revolt.js'; +// import {app} from '@clerotri/Generic'; import {styles} from '@clerotri/Theme'; import {Text} from '@clerotri/components/common/atoms'; import {SettingsEntry} from '@clerotri/components/common/settings/atoms'; -import {ThemeContext} from '@clerotri/lib/themes'; +import {commonValues, ThemeContext} from '@clerotri/lib/themes'; export const InviteSettingsSection = observer(({server}: {server: Server}) => { const {currentTheme} = useContext(ThemeContext); @@ -30,7 +31,40 @@ export const InviteSettingsSection = observer(({server}: {server: Server}) => { return ( <> - {t('app.servers.settings.invites.title')} + + + {t('app.servers.settings.invites.title')} + + {/* TODO: add channel selector + {server.havePermission('InviteOthers') ? ( + { + app.openCreateChannelModal({ + server, + callback: () => {}, + }); + }} + style={{ + width: 30, + height: 20, + alignItems: 'center', + justifyContent: 'center', + }}> + + + + + ) : null} */} + {invites ? ( invites.length ? ( invites.map(i => ( diff --git a/src/lib/utils/utils.ts b/src/lib/utils/utils.ts index f4b5b455..13b005aa 100644 --- a/src/lib/utils/utils.ts +++ b/src/lib/utils/utils.ts @@ -1,4 +1,4 @@ -import {Linking, Platform, ToastAndroid} from 'react-native'; +import {Linking} from 'react-native'; import {differenceInMinutes} from 'date-fns/differenceInMinutes'; import {isSameDay} from 'date-fns/isSameDay';