frontend-rw #1
3 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ const ContentTypeButton: React.FC<IContentTypeButton> = ({ composeId }) => {
|
||||||
|
|
||||||
const handleChange = (contentType: string) => () => dispatch(changeComposeContentType(composeId, contentType));
|
const handleChange = (contentType: string) => () => dispatch(changeComposeContentType(composeId, contentType));
|
||||||
|
|
||||||
const postFormats = instance.configuration.statuses.supported_mime_types;
|
const postFormats = instance.pleroma.metadata.post_formats;
|
||||||
|
|
||||||
const options = [];
|
const options = [];
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ const Preferences = () => {
|
||||||
}), [settings.locale]);
|
}), [settings.locale]);
|
||||||
|
|
||||||
const defaultContentTypeOptions = React.useMemo(() => {
|
const defaultContentTypeOptions = React.useMemo(() => {
|
||||||
const postFormats = instance.configuration.statuses.supported_mime_types;
|
const postFormats = instance.pleroma.metadata.post_formats;
|
||||||
|
|
||||||
const options = Object.entries({
|
const options = Object.entries({
|
||||||
'text/plain': intl.formatMessage(messages.content_type_plaintext),
|
'text/plain': intl.formatMessage(messages.content_type_plaintext),
|
||||||
|
|
|
@ -311,7 +311,7 @@ const importAccount = (compose: Compose, account: CredentialAccount) => {
|
||||||
// };
|
// };
|
||||||
|
|
||||||
const updateDefaultContentType = (compose: Compose, instance: Instance) => {
|
const updateDefaultContentType = (compose: Compose, instance: Instance) => {
|
||||||
const postFormats = instance.configuration.statuses.supported_mime_types;
|
const postFormats = instance.pleroma.metadata.post_formats;
|
||||||
|
|
||||||
compose.content_type = postFormats.includes(compose.content_type) ? compose.content_type : postFormats.includes('text/markdown') ? 'text/markdown' : postFormats[0];
|
compose.content_type = postFormats.includes(compose.content_type) ? compose.content_type : postFormats.includes('text/markdown') ? 'text/markdown' : postFormats[0];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue