thanhlmm / refi-app

A tool to make interacting with Firestore less painful
https://refiapp.io
MIT License
607 stars 47 forks source link

Fix Windows (Minimize,Maximize,Close) #81

Closed Aerglonus closed 2 years ago

Aerglonus commented 2 years ago

Description

The users weren't able to create tabs nor minimize, maximize, close the app mentioned in #69 This is because the entire bar had the drag-title css ID with -webkit-app-region: drag; when you set this up like that it disables the functionality of the other buttons because it converts them into draggable elements, I don't know if this is a good fix but an easy way to fix this is by just creating an empty <section> between the Tabs component and the Windows buttons and make that section draggable so can users can still drag the window or double-click to Maximize.

empty <section> taildwind classes:

<section className="draggable-containers p-3 xl:w-auto flex-1  md:w-auto sm:w-auto"></section>

custom css to make it draggable:

 .draggable-containers {
    -webkit-user-select: none;
    user-select: none;
  -webkit-app-region: drag;
}

Fixes # (issue)

Type of change

Please delete options that are not relevant.

Note about some dependencies

Some dependencies are missing from package.json or need to be changed

thanhlmm commented 2 years ago

Hi @Aerglonus I appreciate your contribution. Everything is perfect, just a small code style. Could you please revert the file vite/src/pages/Tabs.tsx

That file seems no difference except for the style change!

Thank you!

Aerglonus commented 2 years ago

Done, sorry for that :)

thanhlmm commented 2 years ago

Thanks, @Aerglonus . Super work!