|
8 | 8 | import contentStore from "./ContentStore"; |
9 | 9 | import { |
10 | 10 | clickOutside, |
| 11 | + formatDate, |
11 | 12 | get_items_from_uids, |
12 | 13 | request, |
13 | 14 | resolveIcon, |
|
67 | 68 |
|
68 | 69 | async function upload() { |
69 | 70 | updatePreview({ action: "clear" }); |
| 71 | + scrollToRight(); |
70 | 72 | showUpload = true; |
71 | 73 | await utils.timeout(1); |
72 | 74 | const uploadEl = document.querySelector(".upload-wrapper"); |
|
182 | 184 | ...document.querySelectorAll(".levelColumn .inPath"), // previously selected folder |
183 | 185 | ...document.querySelectorAll(".levelColumn .selectedItem"), // previously selected item |
184 | 186 | ]; |
185 | | - if(!possibleFocusEls.length && document.querySelector(".levelColumn .contentItem")) { |
| 187 | + if ( |
| 188 | + !possibleFocusEls.length && |
| 189 | + document.querySelector(".levelColumn .contentItem") |
| 190 | + ) { |
186 | 191 | possibleFocusEls.push(document.querySelector(".levelColumn .contentItem")); |
187 | 192 | } |
188 | 193 | if (possibleFocusEls.length) { |
|
426 | 431 | {#if level.selectable} |
427 | 432 | <button |
428 | 433 | class="btn btn-primary btn-xs" |
429 | | - title="{level.displayPath}" |
| 434 | + title={level.displayPath} |
430 | 435 | disabled={!isSelectable(level)} |
431 | 436 | on:click|preventDefault={() => addItem(level)} |
432 | 437 | > |
|
505 | 510 | /> |
506 | 511 | {item.Title} |
507 | 512 | {#if $config.mode == "search"} |
508 | | - <br><span class="small">{item.path}</span> |
| 513 | + <br /><span class="small" |
| 514 | + >{item.path}</span |
| 515 | + > |
509 | 516 | {/if} |
510 | 517 | </div> |
511 | 518 | {/if} |
|
568 | 575 | /> |
569 | 576 | </div> |
570 | 577 | {/if} |
571 | | - <h4>{previewItem.Title}</h4> |
572 | | - <p>{previewItem.Description}</p> |
| 578 | + <dl> |
| 579 | + <dt>{_t("Title")}</dt> |
| 580 | + <dd>{previewItem.Title}</dd> |
| 581 | + {#if previewItem.Description} |
| 582 | + <dt>{_t("Description")}</dt> |
| 583 | + <dd |
| 584 | + class="text-truncate" |
| 585 | + title={previewItem.Description} |
| 586 | + > |
| 587 | + {previewItem.Description} |
| 588 | + </dd> |
| 589 | + {/if} |
| 590 | + {#if previewItem.created} |
| 591 | + <dt>{_t("created")}</dt> |
| 592 | + <dd> |
| 593 | + <time datetime={previewItem.created} |
| 594 | + >{formatDate(previewItem.created)}</time |
| 595 | + > |
| 596 | + </dd> |
| 597 | + {/if} |
| 598 | + {#if previewItem.modified} |
| 599 | + <dt>{_t("modified")}</dt> |
| 600 | + <dd> |
| 601 | + <time datetime={previewItem.modified} |
| 602 | + >{formatDate(previewItem.modified)}</time |
| 603 | + > |
| 604 | + </dd> |
| 605 | + {/if} |
| 606 | + {#if previewItem.review_state} |
| 607 | + <dt>{_t("review_state")}</dt> |
| 608 | + <dd>{previewItem.review_state}</dd> |
| 609 | + {/if} |
| 610 | + </dl> |
573 | 611 | </div> |
574 | 612 | </div> |
575 | 613 | {/if} |
|
672 | 710 | .levelToolbar > .levelActions { |
673 | 711 | margin-left: auto; |
674 | 712 | } |
675 | | - .levelToolbar > button{ |
| 713 | + .levelToolbar > button { |
676 | 714 | white-space: nowrap; |
677 | 715 | overflow: hidden; |
678 | 716 | text-overflow: ellipsis; |
|
693 | 731 | outline: none; |
694 | 732 | } |
695 | 733 | .contentItem.even { |
696 | | - background-color: rgba(var(--bs-secondary-bg-rgb), .4); |
| 734 | + background-color: rgba(var(--bs-secondary-bg-rgb), 0.4); |
697 | 735 | } |
698 | 736 | .contentItem.inPath, |
699 | 737 | .contentItem:focus { |
|
726 | 764 | min-height: 300px; |
727 | 765 | display: flex; |
728 | 766 | flex-direction: column; |
| 767 | + flex-shrink: 0; |
729 | 768 | align-items: center; |
730 | 769 | } |
731 | 770 | .preview .info { |
|
740 | 779 | width: 50px !important; |
741 | 780 | height: 50px !important; |
742 | 781 | } |
743 | | - .preview h4 { |
744 | | - font-size: 1.2 rem; |
745 | | - } |
746 | 782 | .preview img { |
747 | 783 | max-width: 100%; |
748 | 784 | max-width: 100%; |
|
751 | 787 |
|
752 | 788 | .upload-wrapper { |
753 | 789 | padding: 1rem; |
754 | | - width: 590px; |
| 790 | + width: 540px; |
755 | 791 | overflow-x: auto; |
| 792 | + flex-shrink: 0; |
756 | 793 | } |
757 | 794 | .loadmore { |
758 | 795 | text-align: center; |
|
0 commit comments