chore: more app drag
This commit is contained in:
@@ -140,6 +140,7 @@
|
|||||||
}
|
}
|
||||||
/* context menu */
|
/* context menu */
|
||||||
.context-menu {
|
.context-menu {
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ const Profile: FC<Props> = ({ uid, type = "embed", cid }) => {
|
|||||||
const hasMore = email || canRemoveFromChannel || canRemoveFromServer;
|
const hasMore = email || canRemoveFromChannel || canRemoveFromServer;
|
||||||
const iconClass = `cursor-pointer flex flex-col items-center gap-1 rounded-lg w-32 text-primary-400 bg-gray-50 hover:bg-gray-100 dark:bg-gray-800 text-sm pt-3.5 pb-3`;
|
const iconClass = `cursor-pointer flex flex-col items-center gap-1 rounded-lg w-32 text-primary-400 bg-gray-50 hover:bg-gray-100 dark:bg-gray-800 text-sm pt-3.5 pb-3`;
|
||||||
const containerClass = clsx(
|
const containerClass = clsx(
|
||||||
|
"app-no-drag",
|
||||||
`flex-center flex-col gap-1 z-[99] mt-20 select-none`,
|
`flex-center flex-col gap-1 z-[99] mt-20 select-none`,
|
||||||
isCard ? "p-4 w-[280px] bg-white dark:bg-gray-800 drop-shadow rounded-md" : "md:w-[432px]"
|
isCard ? "p-4 w-[280px] bg-white dark:bg-gray-800 drop-shadow rounded-md" : "md:w-[432px]"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ function ChannelChat({ cid = 0, dropFiles = [] }: Props) {
|
|||||||
<GoBackNav />
|
<GoBackNav />
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<ChannelIcon personal={!is_public} />
|
<ChannelIcon personal={!is_public} />
|
||||||
<span className="text-gray-800 dark:text-white">{name}</span>
|
<span className="text-gray-800 dark:text-white whitespace-nowrap">{name}</span>
|
||||||
<span className="ml-2 text-gray-500 hidden md:block">{description}</span>
|
<span className="ml-2 text-gray-500 hidden md:block">{description}</span>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -120,14 +120,15 @@ function FavsPage() {
|
|||||||
removeFavorite(id);
|
removeFavorite(id);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div className="h-screen flex bg-white mt-2 mr-6 mb-2.5 overflow-auto dark:bg-gray-700 rounded-2xl">
|
<div className="app-drag h-screen flex bg-white mt-2 mr-6 mb-2.5 overflow-auto dark:bg-gray-700 rounded-2xl">
|
||||||
<div className=" md:min-w-[268px] p-2 shadow-inner-[-1px_0px_0px_rgba(0,_0,_0,_0.1)]">
|
<div className="md:min-w-[268px] p-2 shadow-inner-[-1px_0px_0px_rgba(0,_0,_0,_0.1)]">
|
||||||
<ul className="flex flex-col gap-0.5">
|
<ul className="flex flex-col gap-0.5">
|
||||||
{Filters.map(({ icon, title, filter: f }) => {
|
{Filters.map(({ icon, title, filter: f }) => {
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
key={f}
|
key={f}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
"app-no-drag",
|
||||||
f == filter && "bg-[rgba(116,_127,_141,_0.2)]",
|
f == filter && "bg-[rgba(116,_127,_141,_0.2)]",
|
||||||
`cursor-pointer flex items-center gap-2 p-2 rounded-lg md:hover:bg-[rgba(116,_127,_141,_0.2)]`
|
`cursor-pointer flex items-center gap-2 p-2 rounded-lg md:hover:bg-[rgba(116,_127,_141,_0.2)]`
|
||||||
)}
|
)}
|
||||||
@@ -167,7 +168,7 @@ function FavsPage() {
|
|||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<div className="max-w-[600px] flex flex-col gap-1" key={id}>
|
<div className="max-w-[600px] flex flex-col gap-1 app-no-drag" key={id}>
|
||||||
<h4 className="inline-flex items-center text-xs text-gray-400">
|
<h4 className="inline-flex items-center text-xs text-gray-400">
|
||||||
{tip}
|
{tip}
|
||||||
{dayjs(created_at).format("YYYY-MM-DD")}
|
{dayjs(created_at).format("YYYY-MM-DD")}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ const Search: FC<Props> = ({ value = "", updateSearchValue = null, embed = false
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
"app-no-drag",
|
||||||
`hidden md:block relative w-full py-1.5 px-4 shadow`,
|
`hidden md:block relative w-full py-1.5 px-4 shadow`,
|
||||||
embed && "py-2 shadow-none"
|
embed && "py-2 shadow-none"
|
||||||
)}
|
)}
|
||||||
@@ -29,7 +30,7 @@ const Search: FC<Props> = ({ value = "", updateSearchValue = null, embed = false
|
|||||||
<input
|
<input
|
||||||
value={value}
|
value={value}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
className="bg-black/5 dark:bg-black/20 rounded-full text-sm text-gray-500 py-2.5 pl-9"
|
className="bg-black/5 dark:bg-black/20 rounded-full text-sm text-gray-500 py-2.5 pl-9 app-no-drag"
|
||||||
placeholder={`${t("action.search")}...`}
|
placeholder={`${t("action.search")}...`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -90,14 +90,15 @@ function ResourceManagement() {
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-screen md:overflow-y-scroll flex flex-col items-start my-2 mr-6 rounded-2xl bg-white dark:bg-gray-700">
|
<div className="app-drag h-screen md:overflow-y-scroll flex flex-col items-start my-2 mr-6 rounded-2xl bg-white dark:bg-gray-700">
|
||||||
<Search value={filter.name} updateSearchValue={handleUpdateSearch} />
|
<Search value={filter.name} updateSearchValue={handleUpdateSearch} />
|
||||||
<div className="flex justify-between w-full px-4 py-5">
|
<div className="app-no-drag flex justify-between w-full px-4 py-5">
|
||||||
<Filter filter={filter} updateFilter={updateFilter} />
|
<Filter filter={filter} updateFilter={updateFilter} />
|
||||||
<View view={view} />
|
<View view={view} />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
"app-drag",
|
||||||
`w-full h-full px-4 overflow-scroll flex`,
|
`w-full h-full px-4 overflow-scroll flex`,
|
||||||
view == "item" && "gap-2 flex-col",
|
view == "item" && "gap-2 flex-col",
|
||||||
view == "grid" && "flex-wrap"
|
view == "grid" && "flex-wrap"
|
||||||
@@ -116,7 +117,7 @@ function ResourceManagement() {
|
|||||||
const url = thumbnail || content;
|
const url = thumbnail || content;
|
||||||
if (isExpired(url)) return null;
|
if (isExpired(url)) return null;
|
||||||
return (
|
return (
|
||||||
<div key={mid} className="grid-box mb-2">
|
<div key={mid} className="app-no-drag grid-box mb-2">
|
||||||
<FileBox
|
<FileBox
|
||||||
preview={view == "grid"}
|
preview={view == "grid"}
|
||||||
flex={view == "item"}
|
flex={view == "item"}
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ function UsersPage() {
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
"app-drag",
|
||||||
`md:rounded-r-2xl bg-white w-full flex justify-center items-start dark:bg-gray-700`,
|
`md:rounded-r-2xl bg-white w-full flex justify-center items-start dark:bg-gray-700`,
|
||||||
!user_id && "h-full items-center",
|
!user_id && "h-full items-center",
|
||||||
!isUserDetail && "hidden md:flex"
|
!isUserDetail && "hidden md:flex"
|
||||||
|
|||||||
Reference in New Issue
Block a user