From d175dea05a9dce32e9f3cf0f55eca5fe88dde390 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Mon, 8 Jul 2024 20:02:36 +0700 Subject: [PATCH] fix: toggle button for expand log section on modal troubleshoot (#3130) --- web/containers/ModalTroubleShoot/index.tsx | 124 +++++++++++++-------- 1 file changed, 78 insertions(+), 46 deletions(-) diff --git a/web/containers/ModalTroubleShoot/index.tsx b/web/containers/ModalTroubleShoot/index.tsx index 46ef947dd..67ccbe22f 100644 --- a/web/containers/ModalTroubleShoot/index.tsx +++ b/web/containers/ModalTroubleShoot/index.tsx @@ -1,7 +1,8 @@ import { useState } from 'react' -import { Modal } from '@janhq/joi' +import { Button, Modal } from '@janhq/joi' import { atom, useAtom } from 'jotai' +import { Maximize2 } from 'lucide-react' import { twMerge } from 'tailwind-merge' import ServerLogs from '@/containers/ServerLogs' @@ -17,6 +18,7 @@ const ModalTroubleShooting = () => { modalTroubleShootingAtom ) const [isTabActive, setIsTabActivbe] = useState(0) + const [showLogFullSize, setshowLogFullSize] = useState(false) return ( { title="Troubleshooting Assistance" content={
-
+

{`We're here to help! Your report is crucial for debugging and shaping the next version. Hereโ€™s how you can report & get further support:`}

-
-

Step 1

-

- Follow our  - - troubleshooting guide - -  for step-by-step solutions. -

-
- -
-
-

Step 2

+ {!showLogFullSize && ( +
+

Step 1

- {`If you can't find what you need in our troubleshooting guide, feel - free reach out to us for extra help:`} + Follow our  + + troubleshooting guide + +  for step-by-step solutions.

-
    -
  • -

    - Copy your 2-hour logs & device specifications provided - below.{' '} -

    -
  • -
  • -

    - Go to our  - - Discord - -  & send it to #๐Ÿ†˜|get-help channel for further support. -

    -
  • -
-
-
+ )} + +
+ {!showLogFullSize && ( +
+

Step 2

+

+ {`If you can't find what you need in our troubleshooting guide, feel + free reach out to us for extra help:`} +

+
    +
  • +

    + Copy your 2-hour logs & device specifications provided + below.{' '} +

    +
  • +
  • +

    + Go to our  + + Discord + +  & send it to #๐Ÿ†˜|get-help channel for further + support. +

    +
  • +
+
+ )} + +
+
    {logOption.map((name, i) => { return ( @@ -103,7 +122,20 @@ const ModalTroubleShooting = () => { })}
-
+
+