Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
176 changes: 0 additions & 176 deletions packages/app/src/app/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5580,32 +5580,6 @@ export type SidebarCollectionFragment = {
path: string;
};

export type SandboxFragment = {
__typename?: 'Sandbox';
id: string;
alias: string | null;
title: string | null;
description: string | null;
insertedAt: string;
updatedAt: string;
removedAt: string | null;
privacy: number;
screenshotUrl: string | null;
teamId: any | null;
source: { __typename?: 'Source'; template: string | null };
customTemplate: { __typename?: 'Template'; id: any | null } | null;
forkedTemplate: {
__typename?: 'Template';
id: any | null;
color: string | null;
} | null;
collection: {
__typename?: 'Collection';
path: string;
teamId: any | null;
} | null;
};

export type TeamFragment = {
__typename?: 'Team';
id: any;
Expand Down Expand Up @@ -5736,156 +5710,6 @@ export type RenameSandboxMutation = {
renameSandbox: { __typename?: 'Sandbox'; id: string };
};

export type PermanentlyDeleteSandboxesMutationVariables = Exact<{
sandboxIds: Array<Scalars['ID']> | Scalars['ID'];
}>;

export type PermanentlyDeleteSandboxesMutation = {
__typename?: 'RootMutationType';
permanentlyDeleteSandboxes: Array<{ __typename?: 'Sandbox'; id: string }>;
};

export type PathedSandboxesQueryVariables = Exact<{
path: Scalars['String'];
teamId: InputMaybe<Scalars['ID']>;
}>;

export type PathedSandboxesQuery = {
__typename?: 'RootQueryType';
me: {
__typename?: 'CurrentUser';
id: any;
collections: Array<{
__typename?: 'Collection';
id: any | null;
path: string;
}>;
collection: {
__typename?: 'Collection';
id: any | null;
path: string;
sandboxes: Array<{
__typename?: 'Sandbox';
id: string;
alias: string | null;
title: string | null;
description: string | null;
insertedAt: string;
updatedAt: string;
removedAt: string | null;
privacy: number;
screenshotUrl: string | null;
teamId: any | null;
source: { __typename?: 'Source'; template: string | null };
customTemplate: { __typename?: 'Template'; id: any | null } | null;
forkedTemplate: {
__typename?: 'Template';
id: any | null;
color: string | null;
} | null;
collection: {
__typename?: 'Collection';
path: string;
teamId: any | null;
} | null;
}>;
} | null;
} | null;
};

export type RecentSandboxFragment = {
__typename?: 'Sandbox';
id: string;
alias: string | null;
title: string | null;
lastAccessedAt: any;
screenshotUrl: string | null;
privacy: number;
teamId: any | null;
source: { __typename?: 'Source'; template: string | null };
customTemplate: { __typename?: 'Template'; id: any | null } | null;
forkedTemplate: {
__typename?: 'Template';
id: any | null;
color: string | null;
} | null;
collection: {
__typename?: 'Collection';
path: string;
teamId: any | null;
} | null;
};

export type RecentSandboxesQueryVariables = Exact<{
orderField: Scalars['String'];
orderDirection: Direction;
}>;

export type RecentSandboxesQuery = {
__typename?: 'RootQueryType';
me: {
__typename?: 'CurrentUser';
id: any;
sandboxes: Array<{
__typename?: 'Sandbox';
id: string;
alias: string | null;
title: string | null;
lastAccessedAt: any;
screenshotUrl: string | null;
privacy: number;
teamId: any | null;
source: { __typename?: 'Source'; template: string | null };
customTemplate: { __typename?: 'Template'; id: any | null } | null;
forkedTemplate: {
__typename?: 'Template';
id: any | null;
color: string | null;
} | null;
collection: {
__typename?: 'Collection';
path: string;
teamId: any | null;
} | null;
}>;
} | null;
};

export type DeletedSandboxesQueryVariables = Exact<{ [key: string]: never }>;

export type DeletedSandboxesQuery = {
__typename?: 'RootQueryType';
me: {
__typename?: 'CurrentUser';
id: any;
sandboxes: Array<{
__typename?: 'Sandbox';
id: string;
alias: string | null;
title: string | null;
description: string | null;
insertedAt: string;
updatedAt: string;
removedAt: string | null;
privacy: number;
screenshotUrl: string | null;
teamId: any | null;
source: { __typename?: 'Source'; template: string | null };
customTemplate: { __typename?: 'Template'; id: any | null } | null;
forkedTemplate: {
__typename?: 'Template';
id: any | null;
color: string | null;
} | null;
collection: {
__typename?: 'Collection';
path: string;
teamId: any | null;
} | null;
}>;
} | null;
};

export type TeamQueryVariables = Exact<{
id: Scalars['UUID4'];
}>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export const SandboxMenu: React.FC<SandboxMenuProps> = ({

const hasWriteAccess = isInActiveTeam && hasEditorAccess;

if (location.pathname.includes('deleted') && hasWriteAccess) {
// For deleted page, we can trust that sandboxes belong to the active team
// since they're already filtered by team in the query, so we only need hasEditorAccess
if (location.pathname.includes('deleted') && hasEditorAccess) {
return (
<Menu.ContextMenu
visible={visible}
Expand Down
Loading
Loading