mirror of
https://github.com/owncast/owncast.git
synced 2024-11-26 14:56:14 +03:00
Add support for some specific placeholders for correct social urls
This commit is contained in:
parent
53cf80282e
commit
38a20d022d
1 changed files with 6 additions and 1 deletions
|
@ -42,6 +42,11 @@ export default function EditSocialLinks() {
|
|||
|
||||
let resetTimer = null;
|
||||
|
||||
const PLACEHOLDERS = {
|
||||
'mastodon': 'https://mastodon.social/@username',
|
||||
'twitter': 'https://twitter.com/username'
|
||||
}
|
||||
|
||||
const getAvailableIcons = async () => {
|
||||
try {
|
||||
const result = await fetchData(SOCIAL_PLATFORMS_LIST, { auth: false });
|
||||
|
@ -267,7 +272,7 @@ export default function EditSocialLinks() {
|
|||
<TextField
|
||||
fieldName="social-url"
|
||||
label="URL"
|
||||
placeholder="Url to page"
|
||||
placeholder={PLACEHOLDERS[modalDataState.platform] || 'Url to page'}
|
||||
value={modalDataState.url}
|
||||
onChange={handleUrlChange}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue