1
1
import './compose.css' ;
2
2
import '@github/text-expander-element' ;
3
3
4
- import { msg , plural , t , Trans } from '@lingui/macro' ;
4
+ import { plural , t , Trans } from '@lingui/macro' ;
5
5
import { useLingui } from '@lingui/react' ;
6
6
import { MenuItem } from '@szhsin/react-menu' ;
7
7
import { deepEqual } from 'fast-equals' ;
8
8
import Fuse from 'fuse.js' ;
9
9
import { 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' ;
17
11
import { useHotkeys } from 'react-hotkeys-hook' ;
18
12
import stringLength from 'string-length' ;
19
13
// import { detectAll } from 'tinyld/light';
@@ -43,12 +37,7 @@ import shortenNumber from '../utils/shorten-number';
43
37
import showToast from '../utils/show-toast' ;
44
38
import states , { saveStatus } from '../utils/states' ;
45
39
import 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' ;
52
41
import supports from '../utils/supports' ;
53
42
import useCloseWatcher from '../utils/useCloseWatcher' ;
54
43
import useInterval from '../utils/useInterval' ;
@@ -61,6 +50,7 @@ import Loader from './loader';
61
50
import Modal from './modal' ;
62
51
import Status from './status' ;
63
52
53
+
64
54
const {
65
55
PHANPY_IMG_ALT_API_URL : IMG_ALT_API_URL ,
66
56
PHANPY_GIPHY_API_KEY : GIPHY_API_KEY ,
@@ -1155,7 +1145,9 @@ function Compose({
1155
1145
/>
1156
1146
< Icon icon = { `eye-${ sensitive ? 'close' : 'open' } ` } />
1157
1147
</ label > { ' ' }
1158
- { supports ( '@akkoma/post-content-type' ) && (
1148
+ { (
1149
+ supports ( '@akkoma/post-content-type' ) | supports ( '@pleroma/post-content-type' )
1150
+ ) && (
1159
1151
< >
1160
1152
< label
1161
1153
class = { `toolbar-button ${
@@ -1189,9 +1181,11 @@ function Compose({
1189
1181
< option value = "text/bbcode" >
1190
1182
< Trans > BBCode</ Trans >
1191
1183
</ 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
+ ) }
1195
1189
</ select >
1196
1190
</ label > { ' ' }
1197
1191
</ >
0 commit comments