Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
12bd0b8
chore: return workspace name and logo in profile settings api
sangeethailango Apr 23, 2025
526d7da
chore: remove unwanted fields
sangeethailango Apr 23, 2025
89a29f7
fix: backend
gakshita Apr 23, 2025
767788b
feat: workspace settings
gakshita Apr 23, 2025
71e1de2
feat: workspce settings + layouting
gakshita Apr 23, 2025
3493939
feat: profile + workspace settings ui
gakshita Apr 24, 2025
b6ef8aa
chore: project settings + refactoring
gakshita Apr 24, 2025
c82e35f
routes
gakshita Apr 25, 2025
57560c2
fix: handled no project
gakshita Apr 25, 2025
b6b7baa
fix: css + build
gakshita Apr 29, 2025
d5780df
feat: profile settings internal screens upgrade
gakshita Apr 29, 2025
427d488
fix: workspace settings internal screens
gakshita Apr 29, 2025
75f6ea7
fix: external scrolling allowed
gakshita Apr 30, 2025
a9e4f15
Merge branch 'feat-workspace-settings-internal' of https://github.com…
gakshita Apr 30, 2025
5036ece
Merge branch 'feat-profile-settings-internal' of https://github.com/m…
gakshita Apr 30, 2025
10ed2bd
fix: css
gakshita Apr 30, 2025
ab32c20
fix: css
gakshita Apr 30, 2025
44b09cd
fix: css
gakshita Apr 30, 2025
ce6c8bd
fix: preferences settings
gakshita Apr 30, 2025
3f3c581
fix: css
gakshita Apr 30, 2025
c4da02d
fix: mobile interface
gakshita May 1, 2025
b2e9392
fix: profile redirections
gakshita May 6, 2025
c33b559
Merge branch 'preview' of https://github.com/makeplane/plane into fea…
gakshita May 6, 2025
7fab504
fix: dark theme
gakshita May 7, 2025
ffbc2f0
fix: css
gakshita May 8, 2025
cffbc88
fix: css
gakshita May 8, 2025
70cafff
feat: scroll
gakshita May 8, 2025
f41f21e
fix: refactor
gakshita May 13, 2025
8b75c33
Merge branch 'preview' of https://github.com/makeplane/plane into fea…
gakshita May 13, 2025
86de840
fix: bug fixes
gakshita May 14, 2025
9982889
fix: refactor
gakshita May 14, 2025
38762ba
fix: css
gakshita May 14, 2025
f412bf2
fix: routes
gakshita May 15, 2025
88b20aa
Merge branch 'preview' of https://github.com/makeplane/plane into fea…
gakshita May 19, 2025
5fa3229
fix: first day of the week
gakshita May 19, 2025
6a5848f
fix: scrolling
gakshita May 21, 2025
ba126fd
fix: refactoring
gakshita May 23, 2025
f713538
fix: project -> projects
gakshita May 23, 2025
3a36f99
fix: refactoring
gakshita May 23, 2025
58454be
fix: refactor
gakshita May 23, 2025
426ec3d
fix: no authorized view consistency
gakshita May 26, 2025
af8f010
fix: folder structure
gakshita May 26, 2025
aa2a8e1
Merge branch 'preview' into feat-settings-revamp
gakshita May 26, 2025
4a0b009
fix: revert
gakshita May 26, 2025
589d702
Merge branch 'feat-settings-revamp' of https://github.com/makeplane/p…
gakshita May 26, 2025
8932128
Merge branch 'preview' of https://github.com/makeplane/plane into fea…
gakshita May 26, 2025
42181fa
fix: handled redirections
gakshita May 26, 2025
b411d3c
Merge branch 'preview' of https://github.com/makeplane/plane into fea…
gakshita May 28, 2025
e6b4b14
fix: scroll
gakshita May 28, 2025
0d7cc34
fix: deleted old routes
gakshita May 28, 2025
d38312c
fix: empty states
gakshita May 28, 2025
8bbed0a
fix: headings
gakshita May 28, 2025
750a2ee
fix: settings description
gakshita May 28, 2025
13c8c24
fix: build
gakshita May 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apiserver/plane/app/serializers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,16 @@ def get_workspace(self, obj):
workspace_member__member=obj.id,
workspace_member__is_active=True,
).first()
logo_asset_url = workspace.logo_asset.asset_url if workspace.logo_asset is not None else ""
return {
"last_workspace_id": profile.last_workspace_id,
"last_workspace_slug": (
workspace.slug if workspace is not None else ""
),
"last_workspace_name": (
workspace.name if workspace is not None else ""
),
"last_workspace_logo": (logo_asset_url),
"fallback_workspace_id": profile.last_workspace_id,
"fallback_workspace_slug": (
workspace.slug if workspace is not None else ""
Expand Down
13 changes: 13 additions & 0 deletions apiserver/plane/app/views/workspace/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io
import os
from datetime import date
import uuid

from dateutil.relativedelta import relativedelta
from django.db import IntegrityError
Expand Down Expand Up @@ -35,6 +36,7 @@
Workspace,
WorkspaceMember,
WorkspaceTheme,
Profile
)
from plane.app.permissions import ROLE, allow_permission
from django.utils.decorators import method_decorator
Expand Down Expand Up @@ -150,8 +152,19 @@ def list(self, request, *args, **kwargs):
def partial_update(self, request, *args, **kwargs):
return super().partial_update(request, *args, **kwargs)


def remove_last_workspace_ids_from_user_settings(self, id: uuid.UUID) -> None:
"""
Remove the last workspace id from the user settings
"""
Profile.objects.filter(last_workspace_id=id).update(last_workspace_id=None)
return

@allow_permission([ROLE.ADMIN], level="WORKSPACE")
def destroy(self, request, *args, **kwargs):
# Get the workspace
workspace = self.get_object()
self.remove_last_workspace_ids_from_user_settings(workspace.id)
return super().destroy(request, *args, **kwargs)


Expand Down
1 change: 1 addition & 0 deletions packages/constants/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ export * from "./dashboard";
export * from "./page";
export * from "./emoji";
export * from "./subscription";
export * from "./settings";
export * from "./icon";
export * from "./analytics-v2";
77 changes: 54 additions & 23 deletions packages/constants/src/profile.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,53 @@
export const PROFILE_ACTION_LINKS: {
key: string;
i18n_label: string;
href: string;
highlight: (pathname: string) => boolean;
}[] = [
{
export const PROFILE_SETTINGS = {
profile: {
key: "profile",
i18n_label: "profile.actions.profile",
href: `/profile`,
highlight: (pathname: string) => pathname === "/profile/",
href: `/settings/account`,
highlight: (pathname: string) => pathname === "/settings/account/",
},
{
security: {
key: "security",
i18n_label: "profile.actions.security",
href: `/profile/security`,
highlight: (pathname: string) => pathname === "/profile/security/",
href: `/settings/account/security`,
highlight: (pathname: string) => pathname === "/settings/account/security/",
},
{
activity: {
key: "activity",
i18n_label: "profile.actions.activity",
href: `/profile/activity`,
highlight: (pathname: string) => pathname === "/profile/activity/",
href: `/settings/account/activity`,
highlight: (pathname: string) => pathname === "/settings/account/activity/",
},
{
key: "appearance",
i18n_label: "profile.actions.appearance",
href: `/profile/appearance`,
highlight: (pathname: string) => pathname.includes("/profile/appearance"),
preferences: {
key: "preferences",
i18n_label: "profile.actions.preferences",
href: `/settings/account/preferences`,
highlight: (pathname: string) => pathname === "/settings/account/preferences",
},
{
notifications: {
key: "notifications",
i18n_label: "profile.actions.notifications",
href: `/profile/notifications`,
highlight: (pathname: string) => pathname === "/profile/notifications/",
href: `/settings/account/notifications`,
highlight: (pathname: string) => pathname === "/settings/account/notifications/",
},
"api-tokens": {
key: "api-tokens",
i18n_label: "profile.actions.api-tokens",
href: `/settings/account/api-tokens`,
highlight: (pathname: string) => pathname === "/settings/account/api-tokens/",
},
};
export const PROFILE_ACTION_LINKS: {
key: string;
i18n_label: string;
href: string;
highlight: (pathname: string) => boolean;
}[] = [
PROFILE_SETTINGS["profile"],
PROFILE_SETTINGS["security"],
PROFILE_SETTINGS["activity"],
PROFILE_SETTINGS["preferences"],
PROFILE_SETTINGS["notifications"],
PROFILE_SETTINGS["api-tokens"],
];

export const PROFILE_VIEWER_TAB = [
Expand Down Expand Up @@ -72,6 +86,23 @@ export const PROFILE_ADMINS_TAB = [
},
];

export const PREFERENCE_OPTIONS: {
id: string;
title: string;
description: string;
}[] = [
{
id: "theme",
title: "theme",
description: "select_or_customize_your_interface_color_scheme",
},
{
id: "start_of_week",
title: "First day of the week",
description: "This will change how all calendars in your app look.",
},
];

/**
* @description The start of the week for the user
* @enum {number}
Expand Down
52 changes: 52 additions & 0 deletions packages/constants/src/settings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { PROFILE_SETTINGS } from ".";
import { WORKSPACE_SETTINGS } from "./workspace";

export enum WORKSPACE_SETTINGS_CATEGORY {
ADMINISTRATION = "administration",
FEATURES = "features",
DEVELOPER = "developer",
}

export enum PROFILE_SETTINGS_CATEGORY {
YOUR_PROFILE = "your profile",
DEVELOPER = "developer",
}

export enum PROJECT_SETTINGS_CATEGORY {
PROJECTS = "projects",
}

export const WORKSPACE_SETTINGS_CATEGORIES = [
WORKSPACE_SETTINGS_CATEGORY.ADMINISTRATION,
WORKSPACE_SETTINGS_CATEGORY.FEATURES,
WORKSPACE_SETTINGS_CATEGORY.DEVELOPER,
];

export const PROFILE_SETTINGS_CATEGORIES = [
PROFILE_SETTINGS_CATEGORY.YOUR_PROFILE,
PROFILE_SETTINGS_CATEGORY.DEVELOPER,
];

export const PROJECT_SETTINGS_CATEGORIES = [PROJECT_SETTINGS_CATEGORY.PROJECTS];

export const GROUPED_WORKSPACE_SETTINGS = {
[WORKSPACE_SETTINGS_CATEGORY.ADMINISTRATION]: [
WORKSPACE_SETTINGS["general"],
WORKSPACE_SETTINGS["members"],
WORKSPACE_SETTINGS["billing-and-plans"],
WORKSPACE_SETTINGS["export"],
],
[WORKSPACE_SETTINGS_CATEGORY.FEATURES]: [],
[WORKSPACE_SETTINGS_CATEGORY.DEVELOPER]: [WORKSPACE_SETTINGS["webhooks"]],
};

export const GROUPED_PROFILE_SETTINGS = {
[PROFILE_SETTINGS_CATEGORY.YOUR_PROFILE]: [
PROFILE_SETTINGS["profile"],
PROFILE_SETTINGS["preferences"],
PROFILE_SETTINGS["notifications"],
PROFILE_SETTINGS["security"],
PROFILE_SETTINGS["activity"],
],
[PROFILE_SETTINGS_CATEGORY.DEVELOPER]: [PROFILE_SETTINGS["api-tokens"]],
};
8 changes: 0 additions & 8 deletions packages/constants/src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ export const WORKSPACE_SETTINGS = {
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/webhooks/`,
},
"api-tokens": {
key: "api-tokens",
i18n_label: "workspace_settings.settings.api_tokens.title",
href: `/settings/api-tokens`,
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/api-tokens/`,
},
};

export const WORKSPACE_SETTINGS_ACCESS = Object.fromEntries(
Expand All @@ -139,7 +132,6 @@ export const WORKSPACE_SETTINGS_LINKS: {
WORKSPACE_SETTINGS["billing-and-plans"],
WORKSPACE_SETTINGS["export"],
WORKSPACE_SETTINGS["webhooks"],
WORKSPACE_SETTINGS["api-tokens"],
];

export const ROLE = {
Expand Down
Loading