11import './compose.css' ;
22import '@github/text-expander-element' ;
33
4- import { msg , plural , t , Trans } from '@lingui/macro' ;
4+ import { plural , t , Trans } from '@lingui/macro' ;
55import { useLingui } from '@lingui/react' ;
66import { MenuItem } from '@szhsin/react-menu' ;
77import { deepEqual } from 'fast-equals' ;
88import Fuse from 'fuse.js' ;
99import { forwardRef , memo } from 'preact/compat' ;
10- import {
11- useCallback ,
12- useEffect ,
13- useMemo ,
14- useRef ,
15- useState ,
16- } from 'preact/hooks' ;
10+ import { useCallback , useEffect , useMemo , useRef , useState } from 'preact/hooks' ;
1711import { useHotkeys } from 'react-hotkeys-hook' ;
1812import stringLength from 'string-length' ;
1913// import { detectAll } from 'tinyld/light';
@@ -43,12 +37,7 @@ import shortenNumber from '../utils/shorten-number';
4337import showToast from '../utils/show-toast' ;
4438import states , { saveStatus } from '../utils/states' ;
4539import store from '../utils/store' ;
46- import {
47- getCurrentAccount ,
48- getCurrentAccountNS ,
49- getCurrentInstance ,
50- getCurrentInstanceConfiguration ,
51- } from '../utils/store-utils' ;
40+ import { getCurrentAccount , getCurrentAccountNS , getCurrentInstanceConfiguration } from '../utils/store-utils' ;
5241import supports from '../utils/supports' ;
5342import useCloseWatcher from '../utils/useCloseWatcher' ;
5443import useInterval from '../utils/useInterval' ;
@@ -61,6 +50,7 @@ import Loader from './loader';
6150import Modal from './modal' ;
6251import Status from './status' ;
6352
53+
6454const {
6555 PHANPY_IMG_ALT_API_URL : IMG_ALT_API_URL ,
6656 PHANPY_GIPHY_API_KEY : GIPHY_API_KEY ,
@@ -1155,7 +1145,9 @@ function Compose({
11551145 />
11561146 < Icon icon = { `eye-${ sensitive ? 'close' : 'open' } ` } />
11571147 </ label > { ' ' }
1158- { supports ( '@akkoma/post-content-type' ) && (
1148+ { (
1149+ supports ( '@akkoma/post-content-type' ) | supports ( '@pleroma/post-content-type' )
1150+ ) && (
11591151 < >
11601152 < label
11611153 class = { `toolbar-button ${
@@ -1189,9 +1181,11 @@ function Compose({
11891181 < option value = "text/bbcode" >
11901182 < Trans > BBCode</ Trans >
11911183 </ option >
1192- < option value = "text/x.misskeymarkdown" >
1193- < Trans > MFM</ Trans >
1194- </ option >
1184+ { supports ( '@akkoma/post-content-type' ) && (
1185+ < option value = "text/x.misskeymarkdown" >
1186+ < Trans > MFM</ Trans >
1187+ </ option >
1188+ ) }
11951189 </ select >
11961190 </ label > { ' ' }
11971191 </ >
0 commit comments