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/frontend/compute/cloud-filesystem/card-title.tsx
Views: 687
import MountButton from "./mount-button";1import Title from "../title";2import Menu from "./menu";3import { trunc_middle } from "@cocalc/util/misc";45interface Props {6cloudFilesystem;7setError;8refresh?;9show?;10}1112export default function CloudFilesystemCardTitle({13cloudFilesystem,14setError,15show,16}: Props) {17return (18<div19style={{20display: "flex",21color: "#666",22borderBottom: `1px solid ${cloudFilesystem.color}`,23paddingBottom: "5px",24}}25>26<div style={{ flex: 1 }}>27<MountButton28cloudFilesystem={cloudFilesystem}29setShowMount={show?.setShowMount}30/>31</div>32<div33style={{34flex: 1,35textOverflow: "ellipsis",36overflow: "hidden",37padding: "5px 5px 0 5px",38fontWeight: 400,39}}40>41<code42onClick={43cloudFilesystem.mount44? undefined45: () => show?.setShowEditMountpoint(true)46}47style={cloudFilesystem.mount ? {} : { cursor: "pointer" }}48>49{trunc_middle(`~/${cloudFilesystem.mountpoint}`, 40)}50</code>51</div>52<div53style={{ flex: 1, cursor: "pointer", overflow: "hidden" }}54onClick={() => show?.setShowEditTitleAndColor(true)}55>56<Title57title={cloudFilesystem.title}58editable={false}59style={{60textOverflow: "ellipsis",61overflow: "hidden",62padding: "5px 5px 0 5px",63}}64/>65</div>66<Menu cloudFilesystem={cloudFilesystem} setError={setError} show={show} />67</div>68);69}707172