Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-1404] chore: admin app improvements (#4580)

Prateek Shourya724f227842bc
diff --git a/admin/app/authentication/github/page.tsx b/admin/app/authentication/github/page.tsx
index b65b99205e..8532910f7a 100644
--- a/admin/app/authentication/github/page.tsx
+++ b/admin/app/authentication/github/page.tsx
@@ -64,8 +64,8 @@ const InstanceGithubAuthenticationPage = observer(() => {
return (
<>
<PageHeader title="Authentication - God Mode" />
- <div className="relative container mx-auto w-full h-full p-8 py-4 space-y-6 flex flex-col">
- <div className="border-b border-custom-border-100 pb-3 space-y-1 flex-shrink-0">
+ <div className="relative container mx-auto w-full h-full p-4 py-4 space-y-6 flex flex-col">
+ <div className="border-b border-custom-border-100 mx-4 py-4 space-y-1 flex-shrink-0">
<AuthenticationMethodCard
name="Github"
description="Allow members to login or sign up to plane with their Github accounts."
@@ -93,7 +93,7 @@ const InstanceGithubAuthenticationPage = observer(() => {
withBorder={false}
/>
</div>
- <div className="flex-grow overflow-hidden overflow-y-auto">
+ <div className="flex-grow overflow-hidden overflow-y-scroll vertical-scrollbar scrollbar-md p-4">
{formattedConfig ? (
<InstanceGithubConfigForm config={formattedConfig} />
) : (
diff --git a/admin/app/authentication/google/page.tsx b/admin/app/authentication/google/page.tsx
index 05117dbe33..fcdcd47ad0 100644
--- a/admin/app/authentication/google/page.tsx
+++ b/admin/app/authentication/google/page.tsx
@@ -58,8 +58,8 @@ const InstanceGoogleAuthenticationPage = observer(() => {
return (
<>
<PageHeader title="Authentication - God Mode" />
- <div className="relative container mx-auto w-full h-full p-8 py-4 space-y-6 flex flex-col">
- <div className="border-b border-custom-border-100 pb-3 space-y-1 flex-shrink-0">
+ <div className="relative container mx-auto w-full h-full p-4 py-4 space-y-6 flex flex-col">
+ <div className="border-b border-custom-border-100 mx-4 py-4 space-y-1 flex-shrink-0">
<AuthenticationMethodCard
name="Google"
description="Allow members to login or sign up to plane with their Google
@@ -81,7 +81,7 @@ const InstanceGoogleAuthenticationPage = observer(() => {
withBorder={false}
/>
</div>
- <div className="flex-grow overflow-hidden overflow-y-auto">
+ <div className="flex-grow overflow-hidden overflow-y-scroll vertical-scrollbar scrollbar-md p-4">
{formattedConfig ? (
<InstanceGoogleConfigForm config={formattedConfig} />
) : (
diff --git a/admin/app/globals.css b/admin/app/globals.css
index eefcb1b26d..0a2218c219 100644
--- a/admin/app/globals.css
+++ b/admin/app/globals.css
@@ -332,42 +332,90 @@ body {
}
/* scrollbar style */
-::-webkit-scrollbar {
- display: none;
+@-moz-document url-prefix() {
+ * {
+ scrollbar-width: none;
+ }
+ .vertical-scrollbar,
+ .horizontal-scrollbar {
+ scrollbar-width: initial;
+ scrollbar-color: rgba(96, 100, 108, 0.1) transparent;
+ }
+ .vertical-scrollbar:hover,
+ .horizontal-scrollbar:hover {
+ scrollbar-color: rgba(96, 100, 108, 0.25) transparent;
+ }
+ .vertical-scrollbar:active,
+ .horizontal-scrollbar:active {
+ scrollbar-color: rgba(96, 100, 108, 0.7) transparent;
+ }
}
-.horizontal-scroll-enable {
- overflow-x: scroll;
+.vertical-scrollbar {
+ overflow-y: auto;
}
-
-.horizontal-scroll-enable::-webkit-scrollbar {
+.horizontal-scrollbar {
+ overflow-x: auto;
+}
+.vertical-scrollbar::-webkit-scrollbar,
+.horizontal-scrollbar::-webkit-scrollbar {
display: block;
- height: 7px;
- width: 0;
}
-
-.horizontal-scroll-enable::-webkit-scrollbar-track {
- height: 7px;
- background-color: rgba(var(--color-background-100));
+.vertical-scrollbar::-webkit-scrollbar-track,
+.horizontal-scrollbar::-webkit-scrollbar-track {
+ background-color: transparent;
+ border-radius: 9999px;
}
-
-.horizontal-scroll-enable::-webkit-scrollbar-thumb {
- border-radius: 5px;
- background-color: rgba(var(--color-scrollbar));
+.vertical-scrollbar::-webkit-scrollbar-thumb,
+.horizontal-scrollbar::-webkit-scrollbar-thumb {
+ background-clip: padding-box;
+ background-color: rgba(96, 100, 108, 0.1);
+ border-radius: 9999px;
}
-
-.vertical-scroll-enable::-webkit-scrollbar {
- display: block;
- width: 5px;
+.vertical-scrollbar:hover::-webkit-scrollbar-thumb,
+.horizontal-scrollbar:hover::-webkit-scrollbar-thumb {
+ background-color: rgba(96, 100, 108, 0.25);
+}
+.vertical-scrollbar::-webkit-scrollbar-thumb:hover,
+.horizontal-scrollbar::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(96, 100, 108, 0.5);
+}
+.vertical-scrollbar::-webkit-scrollbar-thumb:active,
+.horizontal-scrollbar::-webkit-scrollbar-thumb:active {
+ background-color: rgba(96, 100, 108, 0.7);
+}
+.vertical-scrollbar::-webkit-scrollbar-corner,
+.horizontal-scrollbar::-webkit-scrollbar-corner {
+ background-color: transparent;
+}
+.vertical-scrollbar-margin-top-md::-webkit-scrollbar-track {
+ margin-top: 44px;
}
-.vertical-scroll-enable::-webkit-scrollbar-track {
- width: 5px;
+/* scrollbar sm size */
+.scrollbar-sm::-webkit-scrollbar {
+ height: 12px;
+ width: 12px;
}
+.scrollbar-sm::-webkit-scrollbar-thumb {
+ border: 3px solid rgba(0, 0, 0, 0);
+}
+/* scrollbar md size */
+.scrollbar-md::-webkit-scrollbar {
+ height: 14px;
+ width: 14px;
+}
+.scrollbar-md::-webkit-scrollbar-thumb {
+ border: 3px solid rgba(0, 0, 0, 0);
+}
+/* scrollbar lg size */
-.vertical-scroll-enable::-webkit-scrollbar-thumb {
- border-radius: 5px;
- background-color: rgba(var(--color-background-90));
+.scrollbar-lg::-webkit-scrollbar {
+ height: 16px;
+ width: 16px;
+}
+.scrollbar-lg::-webkit-scrollbar-thumb {
+ border: 4px solid rgba(0, 0, 0, 0);
}
/* end scrollbar style */
diff --git a/admin/components/admin-sidebar/help-section.tsx b/admin/components/admin-sidebar/help-section.tsx
index 371bb49d88..56ccbcd844 100644
--- a/admin/components/admin-sidebar/help-section.tsx
+++ b/admin/components/admin-sidebar/help-section.tsx
@@ -38,7 +38,7 @@ export const HelpSection: FC = observer(() => {
// refs
const helpOptionsRef = useRef<HTMLDivElement | null>(null);
- const redirectionLink = encodeURI(WEB_BASE_URL + "/create-workspace");
+ const redirectionLink = encodeURI(WEB_BASE_URL + "/");
return (
<div
diff --git a/admin/components/admin-sidebar/sidebar-menu.tsx b/admin/components/admin-sidebar/sidebar-menu.tsx
index f7c146fa29..a821243b82 100644
--- a/admin/components/admin-sidebar/sidebar-menu.tsx
+++ b/admin/components/admin-sidebar/sidebar-menu.tsx
@@ -56,7 +56,7 @@ export const SidebarMenu = observer(() => {
};
return (
- <div className="flex h-full w-full flex-col gap-2.5 overflow-y-auto px-4 py-4">
+ <div className="flex h-full w-full flex-col gap-2.5 overflow-y-scroll vertical-scrollbar scrollbar-sm px-4 py-4">
{INSTANCE_ADMIN_LINKS.map((item, index) => {
const isActive = item.href === pathName || pathName.includes(item.href);
return (
diff --git a/admin/components/instance/setup-form.tsx b/admin/components/instance/setup-form.tsx
index 56d536c742..77bf8e5622 100644
--- a/admin/components/instance/setup-form.tsx
+++ b/admin/components/instance/setup-form.tsx
@@ -158,6 +158,7 @@ export const InstanceSetupForm: FC = (props) => {
onError={() => setIsSubmitting(false)}
>
<input type="hidden" name="csrfmiddlewaretoken" value={csrfToken} />
+ <input type="hidden" name="is_telemetry_enabled" value={formData.is_telemetry_enabled ? "True" : "False"} />
<div className="flex flex-col sm:flex-row items-center gap-4">
<div className="w-full space-y-1">
@@ -319,8 +320,6 @@ export const InstanceSetupForm: FC = (props) => {
<div>
<Checkbox
id="is_telemetry_enabled"
- name="is_telemetry_enabled"
- value={formData.is_telemetry_enabled ? "True" : "False"}
onChange={() => handleFormChange("is_telemetry_enabled", !formData.is_telemetry_enabled)}
checked={formData.is_telemetry_enabled}
/>
diff --git a/admin/components/new-user-popup.tsx b/admin/components/new-user-popup.tsx
index 73a405d4a8..840de0c3ac 100644
--- a/admin/components/new-user-popup.tsx
+++ b/admin/components/new-user-popup.tsx
@@ -7,9 +7,9 @@ import { useTheme as nextUseTheme } from "next-themes";
// ui
import { Button, getButtonStyling } from "@plane/ui";
// helpers
-import { resolveGeneralTheme } from "helpers/common.helper";
+import { WEB_BASE_URL, resolveGeneralTheme } from "helpers/common.helper";
// hooks
-import { useInstance, useTheme } from "@/hooks/store";
+import { useTheme } from "@/hooks/store";
// icons
import TakeoffIconLight from "/public/logos/takeoff-icon-light.svg";
import TakeoffIconDark from "/public/logos/takeoff-icon-dark.svg";
@@ -17,11 +17,10 @@ import TakeoffIconDark from "/public/logos/takeoff-icon-dark.svg";
export const NewUserPopup: React.FC = observer(() => {
// hooks
const { isNewUserPopup, toggleNewUserPopup } = useTheme();
- const { config } = useInstance();
// theme
const { resolvedTheme } = nextUseTheme();
- const redirectionLink = `${config?.app_base_url ? `${config?.app_base_url}/create-workspace` : `/god-mode/`}`;
+ const redirectionLink = encodeURI(WEB_BASE_URL + "/create-workspace");
if (!isNewUserPopup) return <></>;
return (
diff --git a/apiserver/plane/license/api/views/instance.py b/apiserver/plane/license/api/views/instance.py
index 525ab54ece..1ec09fbb51 100644
--- a/apiserver/plane/license/api/views/instance.py
+++ b/apiserver/plane/license/api/views/instance.py
@@ -148,7 +148,7 @@ class InstanceEndpoint(BaseAPIView):
data["app_base_url"] = settings.APP_BASE_URL
instance_data = serializer.data
- instance_data["workspaces_exist"] = Workspace.objects.count() > 1
+ instance_data["workspaces_exist"] = Workspace.objects.count() >= 1
response_data = {"config": data, "instance": instance_data}
return Response(response_data, status=status.HTTP_200_OK)