Skip to content

Commit

Permalink
refactor(web): resize style
Browse files Browse the repository at this point in the history
  • Loading branch information
LeezQ committed Mar 6, 2023
1 parent f2cd1ea commit 68d136c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
3 changes: 1 addition & 2 deletions web/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@
/* 设置滚动条的样式 */
::-webkit-scrollbar {
width: 4px;
height: 6px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
box-shadow: inset006pxrgba(0, 0, 0, 0.3);
border-radius: 2px;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
border-radius: 4px;
background: rgba(0, 0, 0, 0.5);
box-shadow: inset006pxrgba(0, 0, 0, 0.5);
}

html,
Expand Down
26 changes: 17 additions & 9 deletions web/src/components/Resize/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function Resize(props: {
}
{...separatorProps}
>
<Center className="w-full h-full">
<Center className="w-full h-full relative">
{type === "x" && width <= 20 ? (
<div
className={clsx(
Expand All @@ -55,14 +55,22 @@ export default function Resize(props: {
{reverse ? <ChevronLeftIcon fontSize={10} /> : <ChevronRightIcon fontSize={10} />}
</div>
) : (
<div
className={clsx(
type === "x" && isDragging ? "h-full " : "h-0",
type === "y" && isDragging ? "w-full " : "w-0",
isDragging ? " border-primary-400 " : "",
"border-l-2 border-t-2 transition-all",
)}
></div>
<>
<div
className={clsx(
type === "x" && isDragging ? "h-full " : "h-0",
type === "y" && isDragging ? "w-full " : "w-0",
isDragging ? " border-primary-400 border" : "",
"transition-all absolute z-10 overflow-hidden",
)}
></div>
<div
className={clsx(
type === "x" ? "h-[18px]" : "w-[18px]",
" border rounded border-slate-300 absolute",
)}
></div>
</>
)}
</Center>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,12 @@ export default function DataPanel() {
showBg
tooltip={t("Copy").toString()}
size={32}
className="ml-2 hover:bg-rose-100 group/icon"
className="ml-2 hover:bg-gray-200 group/icon"
>
<CopyText
hideToolTip
text={JSON.stringify(newData, null, 2)}
tip={String(t("Copied"))}
className="group-hover/icon:text-error-500"
>
<CopyIcon />
</CopyText>
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/app/functions/mods/EditorPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ function EditorPanel() {
const functionListQuery = useFunctionListQuery();

return (
<Panel className="flex-1 flex-grow">
<Panel className="flex-1 flex-grow px-0">
{currentFunction?.name ? (
<Panel.Header style={{ borderBottom: "2px solid #F4F6F8" }} className="!mb-3 h-[50px]">
<Panel.Header style={{ borderBottom: "2px solid #F4F6F8" }} className="!mb-3 h-[50px] px-2">
<HStack maxW={"60%"} spacing={2}>
<CopyText className="font-bold text-lg" text={currentFunction?.name}>
<span>{currentFunction?.name}</span>
Expand Down
2 changes: 2 additions & 0 deletions web/src/pages/globalStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const useGlobalStore = create<State>()(
position: "top",
title: text,
status: "success",
variant: "subtle",
duration: 1000,
containerStyle: {
maxWidth: "100%",
Expand All @@ -154,6 +155,7 @@ const useGlobalStore = create<State>()(
position: "top",
title: text,
status: "error",
variant: "subtle",
duration: 1500,
containerStyle: {
maxWidth: "100%",
Expand Down

0 comments on commit 68d136c

Please sign in to comment.