Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Discord the only account type #53

Merged
merged 1 commit into from
Oct 12, 2023
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
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:[email protected]: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
Loading