@@ -189,38 +189,33 @@ export const OperationViewer: ComponentType<{
189
189
190
190
< div className = "flex-1" />
191
191
192
- { operation . uploaderId === auth . userId && (
193
- < Popover2
194
- content = {
195
- < ManageMenu
196
- operation = { operation }
197
- onUpdate = { ( ) => onCloseDrawer ( ) }
198
- />
199
- }
200
- >
201
- < Button
202
- className = "ml-4"
203
- icon = "wrench"
204
- text = "管理"
205
- rightIcon = "caret-down"
206
- />
207
- </ Popover2 >
208
- ) }
209
-
210
- < Button
211
- className = "ml-4"
212
- icon = "download"
213
- text = "下载原 JSON"
214
- onClick = { ( ) => handleDownloadJSON ( operation . parsedContent ) }
215
- />
192
+ < div className = "flex flex-wrap items-center gap-2 md:gap-4" >
193
+ { operation . uploaderId === auth . userId && (
194
+ < Popover2
195
+ content = {
196
+ < ManageMenu
197
+ operation = { operation }
198
+ onUpdate = { ( ) => onCloseDrawer ( ) }
199
+ />
200
+ }
201
+ >
202
+ < Button icon = "wrench" text = "管理" rightIcon = "caret-down" />
203
+ </ Popover2 >
204
+ ) }
205
+
206
+ < Button
207
+ icon = "download"
208
+ text = "下载原 JSON"
209
+ onClick = { ( ) => handleDownloadJSON ( operation . parsedContent ) }
210
+ />
216
211
217
- < Button
218
- className = "ml-4 "
219
- icon = "clipboard "
220
- text = "复制神秘代码 "
221
- intent = "primary"
222
- onClick = { ( ) => copyShortCode ( operation ) }
223
- / >
212
+ < Button
213
+ icon = "clipboard "
214
+ text = "复制神秘代码 "
215
+ intent = "primary "
216
+ onClick = { ( ) => copyShortCode ( operation ) }
217
+ />
218
+ </ div >
224
219
</ >
225
220
}
226
221
>
@@ -276,10 +271,10 @@ function OperationViewerInner({
276
271
handleRating : ( decision : OpRatingType ) => Promise < void >
277
272
} ) {
278
273
return (
279
- < div className = "h-full overflow-auto py -4 px-8 pt -8" >
274
+ < div className = "h-full overflow-auto p -4 md:p -8" >
280
275
< H3 > { operation . parsedContent . doc . title } </ H3 >
281
276
282
- < div className = "grid grid-rows-1 grid-cols-3 gap-8" >
277
+ < div className = "flex flex-col-reverse md: grid grid-rows-1 grid-cols-3 gap-2 md: gap-8" >
283
278
< div className = "flex flex-col" >
284
279
< Paragraphs content = { operation . parsedContent . doc . details } linkify />
285
280
</ div >
@@ -330,20 +325,20 @@ function OperationViewerInner({
330
325
</ FactItem >
331
326
</ div >
332
327
333
- < div className = "flex flex-col items-start select-none tabular-nums" >
334
- < FactItem title = "浏览量" icon = "eye-open" >
328
+ < div className = "flex flex-wrap md:flex- col items-start select-none tabular-nums gap-4 " >
329
+ < FactItem dense title = "浏览量" icon = "eye-open" >
335
330
< span className = "text-gray-800 dark:text-slate-100 font-bold" >
336
331
{ operation . views }
337
332
</ span >
338
333
</ FactItem >
339
334
340
- < FactItem title = "发布于" icon = "time" >
335
+ < FactItem dense title = "发布于" icon = "time" >
341
336
< span className = "text-gray-800 dark:text-slate-100 font-bold" >
342
337
< RelativeTime moment = { operation . uploadTime } />
343
338
</ span >
344
339
</ FactItem >
345
340
346
- < FactItem title = "作者" icon = "user" >
341
+ < FactItem dense title = "作者" icon = "user" >
347
342
< UserName
348
343
className = "text-gray-800 dark:text-slate-100 font-bold"
349
344
userId = { operation . uploaderId }
@@ -409,7 +404,7 @@ function OperationViewerInnerDetails({ operation }: { operation: Operation }) {
409
404
/>
410
405
</ H4 >
411
406
< Collapse isOpen = { showOperators } >
412
- < div className = "mt-2 flex flex-wrap -ml-4" >
407
+ < div className = "mt-2 flex flex-wrap -ml-4 gap-y-2 " >
413
408
{ ! operation . parsedContent . opers ?. length &&
414
409
! operation . parsedContent . groups ?. length && (
415
410
< NonIdealState
@@ -432,7 +427,7 @@ function OperationViewerInnerDetails({ operation }: { operation: Operation }) {
432
427
key = { group . name }
433
428
>
434
429
< H6 className = "text-gray-800" > { group . name } </ H6 >
435
- < div className = "flex gap-1 " >
430
+ < div className = "flex flex-wrap gap-y-2 " >
436
431
{ group . opers
437
432
?. filter ( Boolean )
438
433
. map ( ( operator ) => (
0 commit comments