@@ -236,15 +236,6 @@ function formatRepoDisplay(url: string) {
236236 return url
237237}
238238
239- /** 获取仓库地址的主机名用于辅助显示。 */
240- function formatRepoHost(url : string ) {
241- try {
242- return new URL (url ).hostname
243- } catch {
244- return ' '
245- }
246- }
247-
248239/** 返回拖拽列表项的稳定键。 */
249240function repoItemKey(repo : string ) {
250241 return repo
@@ -256,26 +247,17 @@ onMounted(() => {
256247 </script >
257248
258249<template >
259- <VDialog width="56rem" scrollable :fullscreen =" ! display .mdAndUp .value " >
250+ <VDialog width="56rem" :fullscreen =" ! display .mdAndUp .value " >
260251 <VCard class="plugin-market-dialog-card">
261- <VCardItem >
252+ <VCardItem class="plugin-market-card-item" >
262253 <div class =" plugin-market-header" >
263- <div class =" plugin-market-title-block" >
264- <VCardTitle class="d-flex align-center pa-0">
265- <VIcon icon="mdi-store-cog" class="me-2" />
266- {{ t('dialog.pluginMarketSetting.title') }}
267- </VCardTitle >
268- <div class =" plugin-market-subtitle" >
269- {{ t('dialog.pluginMarketSetting.description') }}
270- </div >
271- </div >
272- <VChip color="primary" variant="tonal" prepend-icon="mdi-source-repository">
273- {{ t('dialog.pluginMarketSetting.repoCount', { count: activeRepoCount }) }}
274- </VChip >
254+ <VCardTitle class="plugin-market-title d-flex align-center pa-0">
255+ <VIcon icon="mdi-store-cog" class="me-2" />
256+ {{ t('dialog.pluginMarketSetting.title') }}
257+ </VCardTitle >
275258 </div >
276259 <VDialogCloseBtn @click =" emit (' close' )" />
277260 </VCardItem >
278- <VDivider />
279261
280262 <VCardText class="plugin-market-dialog-body pt-4">
281263 <div class =" plugin-market-toolbar" >
@@ -295,10 +277,6 @@ onMounted(() => {
295277 {{ t('dialog.pluginMarketSetting.textMode') }}
296278 </VBtn >
297279 </VBtnToggle >
298-
299- <div class =" plugin-market-toolbar-info" >
300- {{ editorMode === 'list' ? t('dialog.pluginMarketSetting.listHint') : t('dialog.pluginMarketSetting.textHint') }}
301- </div >
302280 </div >
303281
304282 <div v-if =" editorMode === 'list'" class =" plugin-market-list-panel" >
@@ -353,15 +331,6 @@ onMounted(() => {
353331 <div class =" plugin-market-repo-title" >
354332 <span class =" plugin-market-repo-index" >{{ index + 1 }}</span >
355333 <span class =" text-truncate" :title =" repo" >{{ formatRepoDisplay(repo) }}</span >
356- <VChip
357- v-if =" formatRepoHost (repo )"
358- size="x-small"
359- variant="tonal"
360- color="secondary"
361- class="plugin-market-host-chip"
362- >
363- {{ formatRepoHost(repo) }}
364- </VChip >
365334 </div >
366335 </VListItemTitle >
367336 <VListItemSubtitle class="text-truncate mt-1" :title =" repo " >
@@ -417,38 +386,14 @@ onMounted(() => {
417386 <VTextarea
418387 v-model =" repoText "
419388 class="plugin-market-textarea"
420- rows="11"
421- auto-grow
422- max-rows="18"
389+ rows="8"
423390 variant="outlined"
424391 prepend-inner-icon="mdi-text-box-edit-outline"
425392 :placeholder =" t (' dialog.pluginMarketSetting.textPlaceholder' )"
426393 :hint =" t (' dialog.pluginMarketSetting.textHint' )"
427394 persistent-hint
428395 />
429396
430- <div class =" plugin-market-text-summary" >
431- <VChip color="primary" variant="tonal" prepend-icon="mdi-check-circle-outline">
432- {{ t('dialog.pluginMarketSetting.repoCount', { count: parsedTextRepos.repos.length }) }}
433- </VChip >
434- <VChip
435- v-if =" parsedTextRepos .duplicateRepos .length > 0 "
436- color="warning"
437- variant="tonal"
438- prepend-icon="mdi-content-duplicate"
439- >
440- {{ t('dialog.pluginMarketSetting.duplicateCount', { count: parsedTextRepos.duplicateRepos.length }) }}
441- </VChip >
442- <VChip
443- v-if =" parsedTextRepos .invalidRepos .length > 0 "
444- color="error"
445- variant="tonal"
446- prepend-icon="mdi-alert-circle-outline"
447- >
448- {{ t('dialog.pluginMarketSetting.invalidCount', { count: parsedTextRepos.invalidRepos.length }) }}
449- </VChip >
450- </div >
451-
452397 <VAlert
453398 v-if =" parsedTextRepos .invalidRepos .length > 0 "
454399 type="error"
@@ -473,15 +418,8 @@ onMounted(() => {
473418 </div >
474419 </VCardText >
475420
476- <VDivider />
477421 <VCardActions class="plugin-market-actions">
478- <div class =" plugin-market-footer-summary" >
479- {{ t('dialog.pluginMarketSetting.repoCount', { count: activeRepoCount }) }}
480- </div >
481422 <VSpacer />
482- <VBtn variant="text" @click =" emit (' close' )" >
483- {{ t('dialog.pluginMarketSetting.close') }}
484- </VBtn >
485423 <VBtn
486424 color="primary"
487425 variant="flat"
@@ -501,67 +439,56 @@ onMounted(() => {
501439.plugin-market-dialog-card {
502440 display : flex ;
503441 flex-direction : column ;
504- max-block-size : min (82vh , 50rem );
442+ block-size : min (82vh , 50rem );
443+ }
444+
445+ .plugin-market-card-item {
446+ flex : 0 0 auto ;
447+ padding-block : 0.875rem ;
505448}
506449
507450.plugin-market-header {
508451 display : flex ;
509- align-items : flex-start ;
452+ align-items : center ;
510453 justify-content : space-between ;
511454 gap : 1rem ;
512455 padding-inline-end : 2rem ;
513456}
514457
515- .plugin-market-title-block {
458+ .plugin-market-title {
516459 min-inline-size : 0 ;
517460}
518461
519- .plugin-market-subtitle {
520- color : rgba (var (--v-theme-on-surface ), 0.68 );
521- font-size : 0.875rem ;
522- margin-block-start : 0.25rem ;
523- }
524-
525462.plugin-market-dialog-body {
526463 display : flex ;
527464 overflow : hidden ;
528465 flex : 1 ;
529466 flex-direction : column ;
530- gap : 1 rem ;
467+ gap : 0.875 rem ;
531468 min-block-size : 0 ;
469+ padding-block : 0.875rem !important ;
532470}
533471
534472.plugin-market-toolbar {
535473 display : flex ;
536- align-items : center ;
537- justify-content : space-between ;
538- gap : 1rem ;
539- border : 1px solid rgba (var (--v-border-color ), var (--v-border-opacity ));
540- border-radius : 8px ;
541- background : rgba (var (--v-theme-surface-variant ), 0.18 );
542- padding : 0.75rem ;
474+ flex-shrink : 0 ;
543475}
544476
545477.plugin-market-mode-toggle {
546- flex-shrink : 0 ;
478+ inline-size : 100 % ;
547479
548480 :deep (.v-btn ) {
549- min-inline-size : 7rem ;
481+ flex : 1 ;
482+ min-inline-size : 0 ;
550483 }
551484}
552485
553- .plugin-market-toolbar-info {
554- color : rgba (var (--v-theme-on-surface ), 0.68 );
555- font-size : 0.875rem ;
556- text-align : end ;
557- }
558-
559486.plugin-market-list-panel ,
560487.plugin-market-text-panel {
561488 display : flex ;
562489 flex : 1 ;
563490 flex-direction : column ;
564- gap : 1 rem ;
491+ gap : 0.75 rem ;
565492 min-block-size : 0 ;
566493}
567494
@@ -574,7 +501,7 @@ onMounted(() => {
574501 border : 1px solid rgba (var (--v-border-color ), var (--v-border-opacity ));
575502 border-radius : 8px ;
576503 background : rgba (var (--v-theme-surface ), 0.72 );
577- min-block-size : 14 rem ;
504+ min-block-size : 0 ;
578505 overflow-y : auto ;
579506}
580507
@@ -601,10 +528,6 @@ onMounted(() => {
601528 inline-size : 1.75rem ;
602529}
603530
604- .plugin-market-host-chip {
605- flex : 0 0 auto ;
606- }
607-
608531.plugin-market-empty {
609532 display : flex ;
610533 align-items : center ;
@@ -614,47 +537,65 @@ onMounted(() => {
614537}
615538
616539.plugin-market-textarea {
540+ flex : 1 ;
541+ min-block-size : 0 ;
542+
543+ :deep (.v-input__control ),
544+ :deep (.v-field ),
545+ :deep (.v-field__field ) {
546+ block-size : 100% ;
547+ min-block-size : 0 ;
548+ }
549+
550+ :deep(.v-field__input ) {
551+ align-items : stretch ;
552+ block-size : 100% ;
553+ min-block-size : 0 ;
554+ }
555+
617556 :deep(textarea ) {
557+ block-size : 100% ;
618558 font-family : ui-monospace , SFMono- Regular, Menlo, Monaco, Consolas, " Liberation Mono" , monospace ;
619559 line-height : 1.6 ;
560+ overflow-y : auto ;
620561 }
621562}
622563
623- .plugin-market-text-summary {
624- display : flex ;
625- flex-wrap : wrap ;
626- gap : 0.5rem ;
627- }
628-
629564.plugin-market-invalid-alert {
630565 :deep (.v-alert__content ) {
631566 min-inline-size : 0 ;
632567 }
633568}
634569
635570.plugin-market-actions {
571+ flex : 0 0 auto ;
636572 gap : 0.5rem ;
637- }
638-
639- .plugin-market-footer-summary {
640- color : rgba (var (--v-theme-on-surface ), 0.62 );
641- font-size : 0.875rem ;
642- margin-inline-start : 0.5rem ;
573+ padding : 0.75rem 1.5rem 1rem ;
643574}
644575
645576@media (max-width : 600px ) {
646577 .plugin-market-dialog-card {
647- max- block-size : 100 vh ;
578+ block-size : 100 dvh ;
648579 }
649580
650- .plugin-market-header ,
651- .plugin-market-toolbar {
652- align-items : stretch ;
653- flex-direction : column ;
581+ .plugin-market-card-item {
582+ padding : 0.75rem 1rem 0.625rem ;
583+ }
584+
585+ .plugin-market-header {
586+ align-items : center ;
587+ gap : 0.5rem ;
588+ padding-inline-end : 2.25rem ;
654589 }
655590
656- .plugin-market-toolbar-info {
657- text-align : start ;
591+ .plugin-market-header :deep (.v-card-title ) {
592+ font-size : 1.125rem ;
593+ line-height : 1.35 ;
594+ }
595+
596+ .plugin-market-dialog-body {
597+ gap : 0.625rem ;
598+ padding : 0.75rem 1rem !important ;
658599 }
659600
660601 .plugin-market-mode-toggle {
@@ -666,8 +607,21 @@ onMounted(() => {
666607 }
667608 }
668609
669- .plugin-market-footer-summary {
670- display : none ;
610+ .plugin-market-list-panel ,
611+ .plugin-market-text-panel {
612+ gap : 0.625rem ;
613+ }
614+
615+ .plugin-market-list-wrap {
616+ min-block-size : 0 ;
617+ }
618+
619+ .plugin-market-empty {
620+ min-block-size : 10rem ;
621+ }
622+
623+ .plugin-market-actions {
624+ padding : 0.75rem 1rem calc (0.75rem + env (safe-area-inset-bottom ));
671625 }
672626}
673627 </style >
0 commit comments