Revert "feat: define drag areas in electron"

This reverts commit 976e4ce7ed.
This commit is contained in:
Tristan Yang
2023-07-05 10:20:59 +08:00
parent eca8ef39c9
commit c925347ca9
11 changed files with 17 additions and 29 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ const GuestBlankPlaceholder = () => {
};
const qrUrl = BASE_ORIGIN;
return (
<section className="flex flex-col items-center text-center app-no-drag">
<section className="flex flex-col items-center text-center">
<h2 className="text-3xl text-gray-600 dark:text-gray-50 font-bold">
{t("welcome", { name: serverName })}
</h2>
+4 -4
View File
@@ -94,10 +94,10 @@ const Layout: FC<Props> = ({
return (
<>
<ImagePreview container={messagesContainer.current} />
<section ref={drop} className={`app-no-drag relative h-full w-full rounded-r-2xl flex`}>
<main className="app-drag flex flex-col flex-1">
<section ref={drop} className={`relative h-full w-full rounded-r-2xl flex`}>
<main className="flex flex-col flex-1">
{header}
<div className="app-no-drag w-full h-full flex items-start justify-between relative">
<div className="w-full h-full flex items-start justify-between relative">
<div
className="rounded-br-2xl flex flex-col absolute bottom-0 w-full h-full"
ref={messagesContainer}
@@ -125,7 +125,7 @@ const Layout: FC<Props> = ({
{aside && (
<div
className={clsx(
"app-no-drag flex z-50 p-3 absolute right-0 top-14 md:right-0 md:top-0 md:translate-x-full flex-col"
"flex z-50 p-3 absolute right-0 top-14 md:right-0 md:top-0 md:translate-x-full flex-col"
)}
>
{aside}
+2 -2
View File
@@ -63,9 +63,9 @@ const VoiceFullscreen = ({ id, context }: Props) => {
const membersData = voicingMembers.byId;
const hasPin = typeof pinUid !== "undefined";
return (
<div className="app-no-drag h-full bg-black text-gray-300 flex flex-col justify-between rounded-r-2xl">
<div className="h-full bg-black text-gray-300 flex flex-col justify-between rounded-r-2xl">
{/* top */}
<div className="app-drag px-7 py-6 flex justify-between">
<div className="px-7 py-6 flex justify-between">
<span className="text-sm font-semibold">{_name}</span>
</div>
{/* middle */}
+1 -3
View File
@@ -77,7 +77,6 @@ function ChatPage() {
{usersModalVisible && <UsersModal closeModal={toggleUsersModalVisible} />}
<div
className={clsx(
"app-drag",
`flex h-screen md:h-full md:pt-2 md:pb-2.5 md:pr-1`,
isGuest ? "guest-container md:px-1" : "md:pr-12"
)}
@@ -90,7 +89,7 @@ function ChatPage() {
)}
<div
className={clsx(
"left-container app-no-drag flex-col md:rounded-l-2xl w-full h-screen md:h-full md:max-w-[250px] md:min-w-[268px] shadow-[rgb(0_0_0_/_10%)_-1px_0px_0px_inset] bg-white dark:!bg-gray-800",
"left-container flex-col md:rounded-l-2xl w-full h-screen md:h-full md:max-w-[250px] md:min-w-[268px] shadow-[rgb(0_0_0_/_10%)_-1px_0px_0px_inset] bg-white dark:!bg-gray-800",
isMainPath ? "flex" : "hidden md:flex"
)}
>
@@ -100,7 +99,6 @@ function ChatPage() {
</div>
<div
className={clsx(
"app-drag",
`right-container md:rounded-r-2xl w-full bg-white dark:!bg-gray-700`,
placeholderVisible && "h-full flex-center",
isMainPath && "hidden md:flex"
+1 -1
View File
@@ -8,7 +8,7 @@ type Props = {};
const Menu: FC<Props> = () => {
const { pathname } = useLocation();
return (
<ul className="app-no-drag flex flex-col absolute left-0 bottom-0 w-full px-3 py-2">
<ul className="flex flex-col absolute left-0 bottom-0 w-full px-3 py-2">
<li className="cursor-pointer flex items-center p-2.5 gap-2.5 link_navs">
<NavLink className="link" to={`/setting/overview?f=${pathname}`}>
<Tooltip placement="right" tip="Settings">
+1 -1
View File
@@ -14,7 +14,7 @@ const User: FC<Props> = ({ uid }) => {
if (!user) return null;
return (
<div className="app-no-drag px-3 py-2.5 invisible md:visible">
<div className="px-3 py-2.5 invisible md:visible">
<NavLink to={`/setting/my_account?f=${pathname}`}>
<div className="w-8 h-8">
<Avatar
+2 -2
View File
@@ -75,10 +75,10 @@ function HomePage() {
>
{!guest && (
<div
className={`app-drag hidden md:flex h-full flex-col items-center relative w-16 transition-all`}
className={`hidden md:flex h-full flex-col items-center relative w-16 transition-all`}
>
{loginUid && <User uid={loginUid} />}
<nav className="app-no-drag flex flex-col gap-1 px-3 my-6">
<nav className="flex flex-col gap-1 px-3 py-6">
<NavLink
className={({ isActive }) =>
`${linkClass} ${