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

✨ Add Property for Mastodon Profile URL #551

Merged
merged 1 commit into from
Nov 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
1 change: 1 addition & 0 deletions src/api/Ticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface TickerInformation {
twitter: string
facebook: string
telegram: string
mastodon: string
}

export interface TickerTelegram {
Expand Down
20 changes: 19 additions & 1 deletion src/components/ticker/TickerForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MapContainer, Marker, TileLayer } from 'react-leaflet'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { Alert, Button, Checkbox, FormControlLabel, FormGroup, Grid, InputAdornment, Stack, TextField, Typography } from '@mui/material'
import { faComputerMouse, faEnvelope, faUser } from '@fortawesome/free-solid-svg-icons'
import { faFacebook, faTelegram, faTwitter } from '@fortawesome/free-brands-svg-icons'
import { faFacebook, faMastodon, faTelegram, faTwitter } from '@fortawesome/free-brands-svg-icons'

interface Props {
id: string
Expand All @@ -28,6 +28,7 @@ interface FormValues {
twitter: string
facebook: string
telegram: string
mastodon: string
}
location: {
lat: number
Expand All @@ -49,6 +50,7 @@ const TickerForm: FC<Props> = ({ callback, id, ticker }) => {
twitter: ticker?.information.twitter,
facebook: ticker?.information.facebook,
telegram: ticker?.information.telegram,
mastodon: ticker?.information.mastodon,
},
location: {
lat: ticker?.location.lat || 0,
Expand Down Expand Up @@ -224,6 +226,22 @@ const TickerForm: FC<Props> = ({ callback, id, ticker }) => {
/>
</FormGroup>
</Grid>
<Grid item sm={6} xs={12}>
<FormGroup>
<TextField
{...register('information.mastodon')}
InputProps={{
startAdornment: (
<InputAdornment position="start">
<FontAwesomeIcon icon={faMastodon} />
</InputAdornment>
),
}}
label="Mastodon"
margin="dense"
/>
</FormGroup>
</Grid>
<Grid item xs={12}>
<Typography component="h6" variant="h6">
Location
Expand Down