Skip to content

Commit

Permalink
Merge pull request #911 from OpenSourceBrain/feature/748
Browse files Browse the repository at this point in the history
Feature/748 - Warn the user when a resource or file could be overwritten
  • Loading branch information
filippomc authored Mar 5, 2024
2 parents 3952906 + fab6b6a commit 59951a8
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions applications/osb-portal/src/pages/RepositoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import RepositoryService from "../service/RepositoryService";
import { Workspace } from "../types/workspace";
import WorkspaceService from "../service/WorkspaceService";
import { canEditRepository } from "../service/UserService";
import { Alert } from "@mui/material";

const GoBackButton = styled(Button)(({ theme }) => ({
padding: 0,
Expand Down Expand Up @@ -452,10 +453,18 @@ export const RepositoryPage = (props: any) => {
}
>
{checked.length > 0 && (
<OSBChipList
chipItems={checked}
onDeleteChip={(chipPath: string) => handleChipDelete(chipPath)}
/>
<div>
<OSBChipList
chipItems={checked}
onDeleteChip={(chipPath: string) => handleChipDelete(chipPath)}
/>
<Alert
severity="warning"
style={{ marginBottom: "1rem" }}
>
Please note that adding a file when a file with the same name already exists will overwrite the previous version of the file in the workspace.
</Alert>
</div>
)}
<ExistingWorkspaceSelector
setWorkspace={(ws: Workspace) => setWorkspace(ws)}
Expand Down

0 comments on commit 59951a8

Please sign in to comment.