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/account/config/anonymous/index.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45/*6The config page for anonymous users. An anonymous user *is* signed in using a full account.7This page does belong in configuration -- it's about taking the steps to convert their8anonymous account into a full account so they won't lose their work. Most important9is an email address or SSO sign on link.1011Non-anonymous users get the layout page.12*/13import { Button, Popconfirm } from "antd";1415import { Icon } from "@cocalc/frontend/components/icon";16import { Paragraph, Title } from "components/misc";17import SiteName from "components/share/site-name";18import apiPost from "lib/api/post";19import { useRouter } from "next/router";20import Upgrade from "./upgrade";2122export default function Anonymous() {23const router = useRouter();24return (25<div26style={{27margin: "auto",28padding: "50px 30px",29maxWidth: "800px",30background: "white",31}}32>33<Popconfirm34title={35<div style={{ maxWidth: "50ex" }}>36Are you sure you want to sign out <b>losing everything</b> you just37did anonymously?38</div>39}40onConfirm={async () => {41await apiPost("/accounts/sign-out", { all: true });42router.push("/");43}}44okText={"Yes, discard everything"}45cancelText={"Cancel"}46>47<Button danger style={{ float: "right" }}>48<Icon name="sign-out-alt" /> Sign Out49</Button>50</Popconfirm>51<Title level={3}>52Thank you for trying <SiteName /> anonymously!53</Title>54<Paragraph>55Signing up for an account will prevent losing your work, and unlock56additional features.57</Paragraph>58<Upgrade style={{ margin: "15px 0px" }} />59</div>60);61}626364