Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/components/share/edit/open-directly.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import RunApp from "components/app/path";6import A from "components/misc/A";7import ConfigurePublicPath from "components/share/configure-public-path";8import editURL from "lib/share/edit-url";9import shareURL from "lib/share/share-url";10import { join } from "path";1112interface Props {13id: string;14project_id: string;15path: string;16relativePath: string;17}1819export default function OpenDirectly(props: Props) {20const { project_id, path, id, relativePath } = props;21const url = editURL({22type: "collaborator",23project_id,24path,25relativePath,26});27return (28<div>29You are signed in as a collaborator on{" "}30<A href={editURL({ type: "collaborator", project_id })} external>31the project32</A>{" "}33that contains{" "}34<A href={url} external>35this shared document,36</A>{" "}37so you can edit it below. Scroll further down to adjust the description38and license, choose a nice URL, or stop sharing this.39<RunApp40start41project_id={project_id}42path={join(path, relativePath)}43style={{44margin: "30px 0",45}}46/>47<hr />48<br />49{!relativePath ? (50<>51You can adjust how this is shared below, or turn off sharing by52selecting <em>Private</em>.53<ConfigurePublicPath id={id} project_id={project_id} path={path} />54</>55) : (56<>57<br />58Go to the{" "}59<A href={shareURL(id)}>containing directory that was shared</A> to60configure how this is shared or unshare it.61</>62)}63</div>64);65}666768