Skip to content

Commit

Permalink
Make Discord the only account type
Browse files Browse the repository at this point in the history
  • Loading branch information
larsenv committed Oct 10, 2023
1 parent aa9ae98 commit f053941
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ You can set yourself as an administrator by chaing the "role" column to "admin"
| DATABASE_URL | Connection String | mysql://USER:PASSWORD@127.0.0.1:3306/DATABASE |
| IRON_SECRET | Secret for Iron to encrypt the cookie | stringwithatleast64chars |
| DISCORD_CLIENT_ID | Discord Client ID | |
| DISCORD_CLIENT_SECRET | Discord Client Secret | |
| TWITTER_API_KEY | Twitter API Key | |
| TWITTER_API_SECRET_KEY | Twitter API Secret Key | |
| DISCORD_CLIENT_SECRET | Discord Client Secret | |
| WEBPACK_ANALYZE | Runs Webpack Analyzer on start | true |
| NEXT_PUBLIC_LOGGING_LEVEL | Logging Level | TRACE, DEBUG, INFO, WARNING, ERROR or CRITICAL |
| NEXT_PUBLIC_STAGING | If the instance is a staging instance where data may be deleted | true |
24 changes: 6 additions & 18 deletions src/components/account/OAuthAccountsCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,19 @@ function OAuthAccountsCard({ accounts }) {
const getProvider = ({ created_at, provider_id }) => (
<Row key={provider_id}>
<Col>
{provider_id === 'discord' ? (
<>
<FontAwesomeIcon className="me-1" icon={faDiscord} />
<strong>Discord</strong>
</>
) : (
<>
<FontAwesomeIcon className="me-1" icon={faQuestion} />
<strong>{provider_id} (Unsupported)</strong>
</>
)}{' '}
<>
<FontAwesomeIcon className="me-1" icon={faDiscord} />
<strong>Discord</strong>
</>
- Linked on {dayjs(created_at).format(DATE_FORMAT)}
{accounts.length === 1 && (
<>
<br />
<i>You cannot unlink your only account.</i>
</>
)}
{accounts.length}
</Col>
</Row>
);

return (
<Card className="mb-3" bg="secondary" text="white">
<Card.Header className="h5">Linked accounts</Card.Header>
<Card.Header className="h5">Linked Discord Account</Card.Header>
<Card.Body>
{accounts.map((account) => getProvider(account))}
{/* <hr /> */}
Expand Down

0 comments on commit f053941

Please sign in to comment.