Merge branch 'preview' of github.com:makeplane/plane into release-0.15

This commit is contained in:
sriram veeraghanta 2023-12-20 19:23:24 +05:30
commit a04ad4c4e2
5 changed files with 31 additions and 6 deletions

View File

@ -3,10 +3,24 @@ require("dotenv").config({ path: ".env" });
const { withSentryConfig } = require("@sentry/nextjs"); const { withSentryConfig } = require("@sentry/nextjs");
const nextConfig = { const nextConfig = {
async headers() {
return [
{
source: "/",
headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }],
},
];
},
basePath: process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX === "1" ? "/spaces" : "", basePath: process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX === "1" ? "/spaces" : "",
reactStrictMode: false, reactStrictMode: false,
swcMinify: true, swcMinify: true,
images: { images: {
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
unoptimized: true, unoptimized: true,
}, },
output: "standalone", output: "standalone",

View File

@ -37,8 +37,7 @@ export const WorkspaceDashboardView = observer(() => {
workspaceSlug ? `USER_WORKSPACE_DASHBOARD_${workspaceSlug}_${month}` : null, workspaceSlug ? `USER_WORKSPACE_DASHBOARD_${workspaceSlug}_${month}` : null,
workspaceSlug ? () => userStore.fetchUserDashboardInfo(workspaceSlug.toString(), month) : null workspaceSlug ? () => userStore.fetchUserDashboardInfo(workspaceSlug.toString(), month) : null
); );
const isEditingAllowed = !!userStore.currentWorkspaceRole && userStore.currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;
const isEditingAllowed = !!userStore.currentProjectRole && userStore.currentProjectRole >= EUserWorkspaceRoles.MEMBER;
const handleTourCompleted = () => { const handleTourCompleted = () => {
userStore userStore

View File

@ -23,12 +23,11 @@ export const ProjectCardList: FC<IProjectCardList> = observer((props) => {
project: projectStore, project: projectStore,
commandPalette: commandPaletteStore, commandPalette: commandPaletteStore,
trackEvent: { setTrackElement }, trackEvent: { setTrackElement },
user: { currentProjectRole }, user: { currentWorkspaceRole },
} = useMobxStore(); } = useMobxStore();
const projects = workspaceSlug ? projectStore.projects[workspaceSlug.toString()] : null; const projects = workspaceSlug ? projectStore.projects[workspaceSlug.toString()] : null;
const isEditingAllowed = !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;
const isEditingAllowed = !!currentProjectRole && currentProjectRole >= EUserWorkspaceRoles.MEMBER;
if (!projects) { if (!projects) {
return ( return (

View File

@ -2,6 +2,14 @@ require("dotenv").config({ path: ".env" });
const { withSentryConfig } = require("@sentry/nextjs"); const { withSentryConfig } = require("@sentry/nextjs");
const nextConfig = { const nextConfig = {
async headers() {
return [
{
source: "/(.*)?",
headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }],
},
];
},
reactStrictMode: false, reactStrictMode: false,
swcMinify: true, swcMinify: true,
images: { images: {

View File

@ -246,6 +246,11 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
// ================ Page Menu Actions ================== // ================ Page Menu Actions ==================
const duplicate_page = async () => { const duplicate_page = async () => {
const currentPageValues = getValues(); const currentPageValues = getValues();
if (!currentPageValues?.description_html) {
currentPageValues.description_html = pageDetails?.description_html as string;
}
const formData: Partial<IPage> = { const formData: Partial<IPage> = {
name: "Copy of " + pageDetails?.name, name: "Copy of " + pageDetails?.name,
description_html: currentPageValues.description_html, description_html: currentPageValues.description_html,
@ -336,7 +341,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
debounce(async () => { debounce(async () => {
handleSubmit(updatePage)().finally(() => setIsSubmitting("submitted")); handleSubmit(updatePage)().finally(() => setIsSubmitting("submitted"));
}, 1500), }, 1500),
[handleSubmit] [handleSubmit, pageDetails]
); );
if (error) if (error)