Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
sort 啊
bulaienaofutuojiesenzhang61d6966f2c86
diff --git a/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss b/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scssindex 4b9f8ee7..83b9fda4 100644--- a/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss+++ b/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss@@ -52,7 +52,7 @@.accountSidebar-groupSort {position: absolute;- right: 0;+ right: -15px;top: 50%;transform: translateY(-50%);opacity: 0;@@ -180,10 +180,15 @@color: var(--grayColor5);opacity: 0;transition: opacity 0.2s;+ flex-shrink: 0;&:active {cursor: grabbing;}++ &:hover {+ color: var(--grayColor7);+ }}&:hover .accountList-item-dragHandle {diff --git a/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx b/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsxindex a5e35849..5e1a2b7f 100644--- a/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx+++ b/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx@@ -20,28 +20,20 @@ import {Input,message,} from "antd";-// 临时类型定义,等待安装react-beautiful-dnd-interface DragDropContextProps {- onDragEnd: (result: any) => void;- children: React.ReactNode;-}--interface DroppableProps {- droppableId: string;- children: (provided: any) => React.ReactNode;-}--interface DraggableProps {- key: string;- draggableId: string;- index: number;- children: (provided: any, snapshot: any) => React.ReactNode;-}+import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";++// 六点拖拽图标组件+const SixDotsIcon = () => (+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none">+ <circle cx="2" cy="2" r="1" fill="currentColor" />+ <circle cx="6" cy="2" r="1" fill="currentColor" />+ <circle cx="10" cy="2" r="1" fill="currentColor" />+ <circle cx="2" cy="6" r="1" fill="currentColor" />+ <circle cx="6" cy="6" r="1" fill="currentColor" />+ <circle cx="10" cy="6" r="1" fill="currentColor" />+ </svg>+);-// 临时组件定义-const DragDropContext = ({ onDragEnd, children }: DragDropContextProps) => <div>{children}</div>;-const Droppable = ({ droppableId, children }: DroppableProps) => children({ innerRef: null, droppableProps: {} });-const Draggable = ({ key, draggableId, index, children }: DraggableProps) => children({ innerRef: null, draggableProps: {}, dragHandleProps: {} }, { isDragging: false });// import { accountLogin, acpAccountLoginCheck } from "@/icp/account";import {CheckCircleOutlined,@@ -762,37 +754,40 @@ const AccountSidebar = memo(].join(" ")}ref={provided.innerRef}{...provided.draggableProps}- onClick={async () => {- // 如果是移动端平台,显示下载提示- if (isMobileOnlyPlatform) {- setMobileOnlyPlatform(account.type === PlatType.Douyin ? "抖音" : "小红书");- setShowAppDownloadModal(true);- return;- }-- if (- account.status === AccountStatus.DISABLE- ) {- // 掉线账户直接触发重新授权- await handleOfflineAccountClick(account);- return;- }- onAccountChange(account);- }}>{/* 拖拽手柄 */}<divclassName="accountList-item-dragHandle"{...provided.dragHandleProps}+ onClick={(e) => e.stopPropagation()}>- <DragOutlined />+ <SixDotsIcon /></div><Avatarstyle={{backgroundColor: 'aliceblue'}}src={getOssUrl(account.avatar)}size="large"/>- <div className="accountList-item-right">+ <div+ className="accountList-item-right"+ onClick={async () => {+ // 如果是移动端平台,显示下载提示+ if (isMobileOnlyPlatform) {+ setMobileOnlyPlatform(account.type === PlatType.Douyin ? "抖音" : "小红书");+ setShowAppDownloadModal(true);+ return;+ }++ if (+ account.status === AccountStatus.DISABLE+ ) {+ // 掉线账户直接触发重新授权+ await handleOfflineAccountClick(account);+ return;+ }+ onAccountChange(account);+ }}+ ><divclassName="accountList-item-right-name"title={account.nickname}