koishi-plugin-chat-patch 0.8.3 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -337,6 +337,18 @@
337
337
  }
338
338
  }
339
339
 
340
+ @keyframes menuSlideIn {
341
+ 0% {
342
+ transform: translateY(8px);
343
+ opacity: 0;
344
+ }
345
+
346
+ 100% {
347
+ transform: translateY(0);
348
+ opacity: 1;
349
+ }
350
+ }
351
+
340
352
  .message-content {
341
353
  display: flex;
342
354
  flex-direction: column;
@@ -631,6 +643,107 @@
631
643
  display: inline;
632
644
  }
633
645
 
646
+ .message-paragraph {
647
+ display: block;
648
+ margin-bottom: 4px;
649
+ }
650
+
651
+ .message-paragraph:last-child {
652
+ margin-bottom: 0;
653
+ }
654
+
655
+ /* 合并转发消息样式 */
656
+ .forward-message-container {
657
+ border: 1px solid #ffffff;
658
+ border-radius: 8px;
659
+ margin: 4px 0;
660
+ overflow: hidden;
661
+ background: #f9f9f900;
662
+ }
663
+
664
+ .forward-message-preview {
665
+ padding: 12px;
666
+ cursor: pointer;
667
+ transition: background-color 0.2s;
668
+ }
669
+
670
+ .forward-message-preview:hover {
671
+ background: #f0f0f0;
672
+ }
673
+
674
+ .forward-message-title {
675
+ font-weight: 600;
676
+ color: #333;
677
+ margin-bottom: 8px;
678
+ font-size: 14px;
679
+ }
680
+
681
+ .forward-message-preview-item {
682
+ color: #666;
683
+ font-size: 13px;
684
+ margin: 2px 0;
685
+ line-height: 1.4;
686
+ }
687
+
688
+ .forward-message-footer {
689
+ display: flex;
690
+ justify-content: space-between;
691
+ align-items: center;
692
+ margin-top: 8px;
693
+ padding-top: 8px;
694
+ border-top: 1px solid #e8e8e8;
695
+ }
696
+
697
+ .forward-message-count {
698
+ color: #2196f3;
699
+ font-size: 12px;
700
+ }
701
+
702
+ .forward-message-toggle {
703
+ color: #666;
704
+ font-size: 12px;
705
+ }
706
+
707
+ .forward-message-expanded {
708
+ border-top: 1px solid #e0e0e0;
709
+ background: white;
710
+ max-height: 400px;
711
+ overflow-y: auto;
712
+ }
713
+
714
+ .forwarded-message-item {
715
+ padding: 12px;
716
+ border-bottom: 1px solid #f0f0f0;
717
+ }
718
+
719
+ .forwarded-message-item:last-child {
720
+ border-bottom: none;
721
+ }
722
+
723
+ .forwarded-message-header {
724
+ display: flex;
725
+ align-items: center;
726
+ margin-bottom: 6px;
727
+ }
728
+
729
+ .forwarded-message-nickname {
730
+ font-weight: 600;
731
+ color: #333;
732
+ font-size: 13px;
733
+ }
734
+
735
+ .forwarded-message-userid {
736
+ color: #999;
737
+ font-size: 11px;
738
+ margin-left: 6px;
739
+ }
740
+
741
+ .forwarded-message-content {
742
+ color: #555;
743
+ font-size: 13px;
744
+ line-height: 1.4;
745
+ }
746
+
634
747
  .message-at {
635
748
  background: rgba(33, 150, 243, .1);
636
749
  color: #2196f3;
@@ -1369,4 +1482,361 @@ body.dragging-bubble-global {
1369
1482
 
1370
1483
  .message-area .message-content {
1371
1484
  padding-bottom: 80px;
1485
+ }
1486
+
1487
+ /* 图片上传相关样式 */
1488
+ .image-preview-container {
1489
+ display: flex;
1490
+ flex-wrap: wrap;
1491
+ gap: 8px;
1492
+ padding: 8px 0;
1493
+ margin-bottom: 8px;
1494
+ border-bottom: 1px solid rgba(128, 128, 128, .1);
1495
+ }
1496
+
1497
+ .image-preview-item {
1498
+ position: relative;
1499
+ width: 60px;
1500
+ height: 60px;
1501
+ border-radius: 8px;
1502
+ overflow: hidden;
1503
+ border: 2px solid rgba(33, 150, 243, .3);
1504
+ background: rgba(128, 128, 128, .1);
1505
+ }
1506
+
1507
+ .preview-image {
1508
+ width: 100%;
1509
+ height: 100%;
1510
+ object-fit: cover;
1511
+ display: block;
1512
+ }
1513
+
1514
+ .remove-image-btn {
1515
+ position: absolute;
1516
+ top: -6px;
1517
+ right: -6px;
1518
+ width: 20px;
1519
+ height: 20px;
1520
+ border-radius: 50%;
1521
+ background: #f44336;
1522
+ color: white;
1523
+ border: none;
1524
+ cursor: pointer;
1525
+ display: flex;
1526
+ align-items: center;
1527
+ justify-content: center;
1528
+ font-size: 12px;
1529
+ transition: all .2s ease;
1530
+ box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
1531
+ }
1532
+
1533
+ .remove-image-btn:hover {
1534
+ background: #d32f2f;
1535
+ transform: scale(1.1);
1536
+ }
1537
+
1538
+ .input-actions {
1539
+ position: relative;
1540
+ margin-right: 8px;
1541
+ }
1542
+
1543
+ .add-button {
1544
+ width: 36px;
1545
+ height: 36px;
1546
+ border-radius: 12px;
1547
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
1548
+ border: none;
1549
+ color: white;
1550
+ cursor: pointer;
1551
+ display: flex;
1552
+ align-items: center;
1553
+ justify-content: center;
1554
+ transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
1555
+ flex-shrink: 0;
1556
+ box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
1557
+ position: relative;
1558
+ overflow: hidden;
1559
+ }
1560
+
1561
+ .add-button::before {
1562
+ content: '';
1563
+ position: absolute;
1564
+ top: 0;
1565
+ left: 0;
1566
+ right: 0;
1567
+ bottom: 0;
1568
+ background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
1569
+ border-radius: 12px;
1570
+ opacity: 0;
1571
+ transition: opacity .3s ease;
1572
+ }
1573
+
1574
+ .add-button:hover {
1575
+ transform: translateY(-2px) scale(1.05);
1576
+ box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
1577
+ }
1578
+
1579
+ .add-button:hover::before {
1580
+ opacity: 1;
1581
+ }
1582
+
1583
+ .add-button.active {
1584
+ background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
1585
+ transform: translateY(-2px) scale(1.05) rotate(45deg);
1586
+ box-shadow: 0 4px 16px rgba(245, 87, 108, 0.4);
1587
+ }
1588
+
1589
+ .add-button:active {
1590
+ transform: translateY(0) scale(0.98);
1591
+ transition: all .1s ease;
1592
+ }
1593
+
1594
+ .action-menu {
1595
+ position: absolute;
1596
+ bottom: 100%;
1597
+ left: 0;
1598
+ margin-bottom: 12px;
1599
+ background: rgba(255, 255, 255, .98);
1600
+ border: none;
1601
+ border-radius: 16px;
1602
+ box-shadow: 0 8px 32px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .08);
1603
+ backdrop-filter: blur(20px);
1604
+ -webkit-backdrop-filter: blur(20px);
1605
+ overflow: hidden;
1606
+ z-index: 1000;
1607
+ min-width: 140px;
1608
+ transform: translateY(8px);
1609
+ opacity: 0;
1610
+ animation: menuSlideIn .3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
1611
+ }
1612
+
1613
+ .action-menu-item {
1614
+ display: flex;
1615
+ align-items: center;
1616
+ gap: 12px;
1617
+ padding: 14px 18px;
1618
+ background: none;
1619
+ border: none;
1620
+ color: #333;
1621
+ font-size: 14px;
1622
+ font-weight: 500;
1623
+ cursor: pointer;
1624
+ transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
1625
+ width: 100%;
1626
+ text-align: left;
1627
+ position: relative;
1628
+ }
1629
+
1630
+ .action-menu-item::before {
1631
+ content: '';
1632
+ position: absolute;
1633
+ left: 0;
1634
+ top: 0;
1635
+ bottom: 0;
1636
+ width: 3px;
1637
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
1638
+ transform: scaleY(0);
1639
+ transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1);
1640
+ }
1641
+
1642
+ .action-menu-item:hover {
1643
+ background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
1644
+ color: #667eea;
1645
+ transform: translateX(4px);
1646
+ }
1647
+
1648
+ .action-menu-item:hover::before {
1649
+ transform: scaleY(1);
1650
+ }
1651
+
1652
+ .action-menu-item svg {
1653
+ flex-shrink: 0;
1654
+ }
1655
+
1656
+ @media (prefers-color-scheme: dark) {
1657
+ .action-menu {
1658
+ background: rgba(30, 30, 30, .98);
1659
+ box-shadow: 0 8px 32px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .2);
1660
+ }
1661
+
1662
+ .action-menu-item {
1663
+ color: #fff;
1664
+ }
1665
+
1666
+ .action-menu-item::before {
1667
+ background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
1668
+ }
1669
+
1670
+ .action-menu-item:hover {
1671
+ background: linear-gradient(90deg, rgba(79, 172, 254, 0.12) 0%, rgba(0, 242, 254, 0.12) 100%);
1672
+ color: #4facfe;
1673
+ }
1674
+
1675
+ .add-button {
1676
+ background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
1677
+ box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
1678
+ }
1679
+
1680
+ .add-button:hover {
1681
+ box-shadow: 0 4px 16px rgba(79, 172, 254, 0.4);
1682
+ }
1683
+
1684
+ .add-button.active {
1685
+ background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
1686
+ box-shadow: 0 4px 16px rgba(250, 112, 154, 0.4);
1687
+ }
1688
+
1689
+ .image-preview-item {
1690
+ border-color: rgba(100, 181, 246, .5);
1691
+ background: rgba(255, 255, 255, .05);
1692
+ }
1693
+ }
1694
+
1695
+ @media (max-width: 768px) {
1696
+ .image-preview-container {
1697
+ padding: 6px 0;
1698
+ margin-bottom: 6px;
1699
+ }
1700
+
1701
+ .image-preview-item {
1702
+ width: 50px;
1703
+ height: 50px;
1704
+ }
1705
+
1706
+ .add-button {
1707
+ width: 32px;
1708
+ height: 32px;
1709
+ border-radius: 10px;
1710
+ }
1711
+
1712
+ .action-menu {
1713
+ min-width: 100px;
1714
+ }
1715
+
1716
+ .action-menu-item {
1717
+ padding: 10px 12px;
1718
+ font-size: 13px;
1719
+ }
1720
+
1721
+ .remove-image-btn {
1722
+ width: 18px;
1723
+ height: 18px;
1724
+ top: -5px;
1725
+ right: -5px;
1726
+ }
1727
+ }
1728
+
1729
+ /* 消息历史区域的滚动条 */
1730
+ .message-history::-webkit-scrollbar {
1731
+ width: 6px;
1732
+ }
1733
+
1734
+ .message-history::-webkit-scrollbar-track {
1735
+ background: transparent;
1736
+ }
1737
+
1738
+ .message-history::-webkit-scrollbar-thumb {
1739
+ background-color: rgba(144, 147, 153, .3);
1740
+ border-radius: 4px;
1741
+ transition: background-color .3s;
1742
+ }
1743
+
1744
+ .message-history::-webkit-scrollbar-thumb:hover {
1745
+ background-color: rgba(144, 147, 153, .5);
1746
+ }
1747
+
1748
+ /* 机器人列表的滚动条 */
1749
+ .bot-items::-webkit-scrollbar {
1750
+ width: 6px;
1751
+ }
1752
+
1753
+ .bot-items::-webkit-scrollbar-track {
1754
+ background: transparent;
1755
+ }
1756
+
1757
+ .bot-items::-webkit-scrollbar-thumb {
1758
+ background-color: rgba(144, 147, 153, .3);
1759
+ border-radius: 4px;
1760
+ transition: background-color .3s;
1761
+ }
1762
+
1763
+ .bot-items::-webkit-scrollbar-thumb:hover {
1764
+ background-color: rgba(144, 147, 153, .5);
1765
+ }
1766
+
1767
+ /* 频道列表的滚动条 */
1768
+ .channel-items::-webkit-scrollbar {
1769
+ width: 6px;
1770
+ }
1771
+
1772
+ .channel-items::-webkit-scrollbar-track {
1773
+ background: transparent;
1774
+ }
1775
+
1776
+ .channel-items::-webkit-scrollbar-thumb {
1777
+ background-color: rgba(144, 147, 153, .3);
1778
+ border-radius: 4px;
1779
+ transition: background-color .3s;
1780
+ }
1781
+
1782
+ .channel-items::-webkit-scrollbar-thumb:hover {
1783
+ background-color: rgba(144, 147, 153, .5);
1784
+ }
1785
+
1786
+ /* 合并转发消息展开区域的滚动条 */
1787
+ .forward-message-expanded::-webkit-scrollbar {
1788
+ width: 6px;
1789
+ }
1790
+
1791
+ .forward-message-expanded::-webkit-scrollbar-track {
1792
+ background: transparent;
1793
+ }
1794
+
1795
+ .forward-message-expanded::-webkit-scrollbar-thumb {
1796
+ background-color: rgba(144, 147, 153, .3);
1797
+ border-radius: 4px;
1798
+ transition: background-color .3s;
1799
+ }
1800
+
1801
+ .forward-message-expanded::-webkit-scrollbar-thumb:hover {
1802
+ background-color: rgba(144, 147, 153, .5);
1803
+ }
1804
+
1805
+ /* JSON内容区域的滚动条 */
1806
+ .json-raw-content::-webkit-scrollbar {
1807
+ width: 6px;
1808
+ }
1809
+
1810
+ .json-raw-content::-webkit-scrollbar-track {
1811
+ background: transparent;
1812
+ }
1813
+
1814
+ .json-raw-content::-webkit-scrollbar-thumb {
1815
+ background-color: rgba(144, 147, 153, .3);
1816
+ border-radius: 4px;
1817
+ transition: background-color .3s;
1818
+ }
1819
+
1820
+ .json-raw-content::-webkit-scrollbar-thumb:hover {
1821
+ background-color: rgba(144, 147, 153, .5);
1822
+ }
1823
+
1824
+ /* 深色模式下的滚动条样式调整 */
1825
+ @media (prefers-color-scheme: dark) {
1826
+
1827
+ .message-history::-webkit-scrollbar-thumb,
1828
+ .bot-items::-webkit-scrollbar-thumb,
1829
+ .channel-items::-webkit-scrollbar-thumb,
1830
+ .forward-message-expanded::-webkit-scrollbar-thumb,
1831
+ .json-raw-content::-webkit-scrollbar-thumb {
1832
+ background-color: rgba(255, 255, 255, .2);
1833
+ }
1834
+
1835
+ .message-history::-webkit-scrollbar-thumb:hover,
1836
+ .bot-items::-webkit-scrollbar-thumb:hover,
1837
+ .channel-items::-webkit-scrollbar-thumb:hover,
1838
+ .forward-message-expanded::-webkit-scrollbar-thumb:hover,
1839
+ .json-raw-content::-webkit-scrollbar-thumb:hover {
1840
+ background-color: rgba(255, 255, 255, .4);
1841
+ }
1372
1842
  }