diff --git a/pkg/interface/package-lock.json b/pkg/interface/package-lock.json index f379ea40f2..399ad94e5a 100644 --- a/pkg/interface/package-lock.json +++ b/pkg/interface/package-lock.json @@ -1709,9 +1709,21 @@ "integrity": "sha512-3OPSdf9cejP/TSzWXuBaYbzLtAfBzQnc75SlPLkoPfwpxnv1Bvy9hiWngLY0WnKRR6lMOldnkYQCCuNWeDibYQ==" }, "@tlon/indigo-react": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/@tlon/indigo-react/-/indigo-react-1.1.15.tgz", - "integrity": "sha512-Ao+1hAJjN5y1gDyT7GIUgXORPXTIpZKVVtrS++ZGYBemYMSq3oJFMIZertsSZbDHuh/TsVPenJrMUZBpV60law==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@tlon/indigo-react/-/indigo-react-1.2.6.tgz", + "integrity": "sha512-Dng+OfQ6ViMrdJXtQvgsVrW9vglPGUmbv0ffi2MSwLfe6FhUdL1CHoOjGxm4pATLOou53Kqcrt4g1Svw7y9THw==", + "requires": { + "@reach/menu-button": "^0.10.5", + "react": "^16.13.1", + "tslib": "^2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + } + } }, "@types/anymatch": { "version": "1.3.1", @@ -6895,6 +6907,11 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, + "normalize-wheel": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", + "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", diff --git a/pkg/interface/package.json b/pkg/interface/package.json index 19e5448dfe..9be987122c 100644 --- a/pkg/interface/package.json +++ b/pkg/interface/package.json @@ -9,7 +9,7 @@ "@reach/menu-button": "^0.10.5", "@reach/tabs": "^0.10.5", "@tlon/indigo-light": "^1.0.3", - "@tlon/indigo-react": "^1.1.15", + "@tlon/indigo-react": "1.2.6", "aws-sdk": "^2.726.0", "classnames": "^2.2.6", "codemirror": "^5.55.0", diff --git a/pkg/interface/src/types/util.ts b/pkg/interface/src/types/util.ts new file mode 100644 index 0000000000..c2e281d81a --- /dev/null +++ b/pkg/interface/src/types/util.ts @@ -0,0 +1,2 @@ + +export type PropFunc any> = Parameters[0]; diff --git a/pkg/interface/src/views/apps/chat/components/join.js b/pkg/interface/src/views/apps/chat/components/join.js index 282a76cabb..41476777b4 100644 --- a/pkg/interface/src/views/apps/chat/components/join.js +++ b/pkg/interface/src/views/apps/chat/components/join.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import { Spinner } from '../../../components/Spinner'; import urbitOb from 'urbit-ob'; -import { Box, Text, Input, Button } from '@tlon/indigo-react'; +import { Box, Text, ManagedTextInputField as Input, Button } from '@tlon/indigo-react'; import { Formik, Form } from 'formik' import * as Yup from 'yup'; diff --git a/pkg/interface/src/views/apps/groups/components/lib/ContactCard.tsx b/pkg/interface/src/views/apps/groups/components/lib/ContactCard.tsx index f8438417de..e331b48298 100644 --- a/pkg/interface/src/views/apps/groups/components/lib/ContactCard.tsx +++ b/pkg/interface/src/views/apps/groups/components/lib/ContactCard.tsx @@ -1,13 +1,17 @@ -import React, { Component } from "react"; +import React from "react"; import { Sigil } from "~/logic/lib/sigil"; import * as Yup from "yup"; -import { Link } from "react-router-dom"; -import { EditElement } from "./edit-element"; -import { Spinner } from "~/views/components/Spinner"; import { uxToHex } from "~/logic/lib/util"; -import { Col, Input, Box, Text, Row } from "@tlon/indigo-react"; -import { Formik, Form, FormikHelpers } from "formik"; +import { + ManagedForm as Form, + Col, + ManagedTextInputField as Input, + Box, + Text, + Row, +} from "@tlon/indigo-react"; +import { Formik, FormikHelpers } from "formik"; import { Contact } from "~/types/contact-update"; import { AsyncButton } from "~/views/components/AsyncButton"; import { ColorInput } from "~/views/components/ColorInput"; @@ -93,30 +97,34 @@ export function ContactCard(props: ContactCardProps) { initialValues={contact} onSubmit={onSubmit} > -
- - - - - {us} - - - - - - - - - - - Save - - + + + + + {us} + + + + + + + + + + + Save + diff --git a/pkg/interface/src/views/apps/profile/components/lib/BackgroundPicker.tsx b/pkg/interface/src/views/apps/profile/components/lib/BackgroundPicker.tsx index 13f87610e8..df4e8d617a 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/BackgroundPicker.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/BackgroundPicker.tsx @@ -1,9 +1,16 @@ -import React from 'react'; -import { Box, InputLabel, Radio, Input } from '@tlon/indigo-react'; +import React from "react"; +import { + Box, + Row, + Label, + Col, + ManagedRadioButtonField as Radio, + ManagedTextInputField as Input, +} from "@tlon/indigo-react"; -import GlobalApi from '~/logic/api/global'; -import { S3State } from '~/types'; -import { ImageInput } from '~/views/components/ImageInput'; +import GlobalApi from "~/logic/api/global"; +import { S3State } from "~/types"; +import { ImageInput } from "~/views/components/ImageInput"; export type BgType = "none" | "url" | "color"; @@ -18,37 +25,33 @@ export function BackgroundPicker({ api: GlobalApi; s3: S3State; }) { + + const rowSpace = { my: 0, alignItems: 'center' }; + const radioProps = { my: 4, mr: 4, name: 'bgType' }; return ( - - Landscape Background - - - - {bgType === "url" && ( - - )} - - {bgType === "color" && ( - - )} - - - - + + + + + {bgType === "url" && ( + + )} + + + + {bgType === "color" && ( + + )} + + + ); } - - diff --git a/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx b/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx index a13764661d..cfe4725baf 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/BucketList.tsx @@ -1,7 +1,8 @@ import React, { useCallback } from "react"; import { - Input, + ManagedTextInputField as Input, + ManagedForm as Form, Box, Button, Col, @@ -11,9 +12,9 @@ import { MenuList, MenuItem, } from "@tlon/indigo-react"; -import { Formik, Form } from "formik"; +import { Formik } from "formik"; -import GlobalApi from "../../../../api/global"; +import GlobalApi from "~/logic/api/global"; export function BucketList({ buckets, @@ -53,49 +54,48 @@ export function BucketList({ return ( -
- - {_buckets.map((bucket) => ( - - {bucket} - {bucket === selected && ( - - Active - - )} - {bucket !== selected && ( - - Options - - Make Active - Delete - - - )} - - ))} - - - + + {_buckets.map((bucket) => ( + + {bucket} + {bucket === selected && ( + + Active + + )} + {bucket !== selected && ( + + + Options + + + Make Active + Delete + + + )} + + ))} + +
); diff --git a/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx b/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx index d69db35130..952f94ceb5 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/DisplayForm.tsx @@ -2,8 +2,8 @@ import React from "react"; import { Box, - InputLabel, - Checkbox, + Label, + ManagedCheckboxField as Checkbox, Button, } from "@tlon/indigo-react"; import { Formik, Form } from "formik"; @@ -14,7 +14,7 @@ import GlobalApi from "../../../../api/global"; import { LaunchState } from "../../../../types/launch-update"; import { DropLaunchTiles } from "./DropLaunch"; import { S3State, BackgroundConfig } from "../../../../types"; -import { BackgroundPicker, BgType } from './BackgroundPicker'; +import { BackgroundPicker, BgType } from "./BackgroundPicker"; const formSchema = Yup.object().shape({ tileOrdering: Yup.array().of(Yup.string()), @@ -47,14 +47,7 @@ interface DisplayFormProps { } export default function DisplayForm(props: DisplayFormProps) { - const { - api, - launch, - background, - hideAvatars, - hideNicknames, - s3 - } = props; + const { api, launch, background, hideAvatars, hideNicknames, s3 } = props; let bgColor, bgUrl; if (background?.type === "url") { @@ -99,17 +92,17 @@ export default function DisplayForm(props: DisplayFormProps) {
Display Preferences - + + - - - - + + + - )} diff --git a/pkg/interface/src/views/apps/profile/components/lib/DragTile.tsx b/pkg/interface/src/views/apps/profile/components/lib/DragTile.tsx index 1a08123a6d..c5f05e70a5 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/DragTile.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/DragTile.tsx @@ -4,11 +4,11 @@ import { usePreview } from "react-dnd-multi-backend"; import { capitalize } from "lodash"; import { TileTypeBasic, Tile } from "../../../../types/launch-update"; -import { Box, Img as _Img, Text } from "@tlon/indigo-react"; +import { Box, Image as _Image, Text } from "@tlon/indigo-react"; import styled from "styled-components"; // Need to change dojo image -const Img = styled(_Img)<{ invert?: boolean }>` +const Image = styled(_Image)<{ invert?: boolean }>` ${(p) => p.theme.colors.white !== "rgba(255,255,255,1)" ? `filter: invert(1);` : ``} @@ -83,7 +83,7 @@ function DragTileBasic(props: { } style={props.style} > - + { @@ -47,7 +51,7 @@ export default function RemoteContentForm(props: RemoteContentFormProps) { imageShown: values.imageShown, audioShown: values.audioShown, videoShown: values.videoShown, - oembedShown: values.oembedShown + oembedShown: values.oembedShown, }); api.local.dehydrate(); actions.setSubmitting(false); @@ -59,36 +63,26 @@ export default function RemoteContentForm(props: RemoteContentFormProps) { display="grid" gridTemplateColumns="1fr" gridTemplateRows="audio" - gridRowGap={3} + gridRowGap={5} > - + Remote Content - - - - - - + + + + + - )} ); -} \ No newline at end of file +} + diff --git a/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx b/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx index dc82edff23..1647bda19d 100644 --- a/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx +++ b/pkg/interface/src/views/apps/profile/components/lib/S3Form.tsx @@ -1,17 +1,18 @@ import React, { useCallback } from "react"; import { - Input, + ManagedTextInputField as Input, + ManagedForm as Form, Box, Button, Col, Text, - Menu + Menu, } from "@tlon/indigo-react"; -import { Formik, Form } from "formik"; +import { Formik } from "formik"; import GlobalApi from "../../../../api/global"; -import { BucketList } from './BucketList'; +import { BucketList } from "./BucketList"; import { S3State } from "../../../../types"; interface FormSchema { @@ -49,9 +50,6 @@ export default function S3Form(props: S3FormProps) { return ( <> - - S3 Credentials - -
- + + + S3 Credentials + + + - - +
diff --git a/pkg/interface/src/views/apps/profile/components/settings.tsx b/pkg/interface/src/views/apps/profile/components/settings.tsx index 72c6794cdf..6c9bf6866f 100644 --- a/pkg/interface/src/views/apps/profile/components/settings.tsx +++ b/pkg/interface/src/views/apps/profile/components/settings.tsx @@ -36,7 +36,6 @@ export default function Settings({ return ( { px={3} backgroundColor={selected ? "washedBlue" : "white"} > - + {children} diff --git a/pkg/interface/src/views/apps/publish/components/lib/CommentInput.tsx b/pkg/interface/src/views/apps/publish/components/lib/CommentInput.tsx index 4830f20679..1a4b4a82f3 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/CommentInput.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/CommentInput.tsx @@ -2,7 +2,7 @@ import React from "react"; import * as Yup from "yup"; import { Formik, FormikHelpers, Form, useFormikContext } from "formik"; import { AsyncButton } from "../../../../components/AsyncButton"; -import { TextArea } from "@tlon/indigo-react"; +import { ManagedTextAreaField as TextArea } from "@tlon/indigo-react"; interface FormSchema { comment: string; @@ -48,7 +48,7 @@ export default function CommentInput(props: CommentInputProps) { id="comment" placeholder={props.placeholder || ""} /> - + {label} diff --git a/pkg/interface/src/views/apps/publish/components/lib/EditPost.tsx b/pkg/interface/src/views/apps/publish/components/lib/EditPost.tsx index dde8d8d5a4..5e84be7c4d 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/EditPost.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/EditPost.tsx @@ -38,7 +38,7 @@ export function EditPost(props: EditPostProps & RouteComponentProps) { ); diff --git a/pkg/interface/src/views/apps/publish/components/lib/Join.tsx b/pkg/interface/src/views/apps/publish/components/lib/Join.tsx index c510df5977..f3f413a772 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/Join.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/Join.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useState, useRef, useEffect } from "react"; -import { Col, Text, ErrorMessage } from "@tlon/indigo-react"; +import { Col, Text, ErrorLabel } from "@tlon/indigo-react"; import { Spinner } from "~/views/components/Spinner"; import { Notebooks } from "~/types/publish-update"; import { useWaitForProps } from "~/logic/lib/useWaitForProps"; @@ -46,7 +46,7 @@ export function JoinScreen(props: JoinScreenProps & RouteComponentProps) { Joining Notebook - {error && Unable to join notebook} + {error && Unable to join notebook} ); } diff --git a/pkg/interface/src/views/apps/publish/components/lib/MarkdownEditor.tsx b/pkg/interface/src/views/apps/publish/components/lib/MarkdownEditor.tsx new file mode 100644 index 0000000000..a269fd7ced --- /dev/null +++ b/pkg/interface/src/views/apps/publish/components/lib/MarkdownEditor.tsx @@ -0,0 +1,73 @@ +import React, { useCallback } from "react"; + +import { UnControlled as CodeEditor } from "react-codemirror2"; +import { MOBILE_BROWSER_REGEX } from "~/logic/lib/util"; +import { PropFunc } from "~/types/util"; +import CodeMirror from "codemirror"; + +import "codemirror/mode/markdown/markdown"; +import "codemirror/addon/display/placeholder"; + +import "codemirror/lib/codemirror.css"; +import { Box } from "@tlon/indigo-react"; + +const MARKDOWN_CONFIG = { + name: "markdown", +}; + +interface MarkdownEditorProps { + placeholder?: string; + value: string; + onChange: (s: string) => void; + onBlur?: (e: any) => void; +} + +export function MarkdownEditor( + props: MarkdownEditorProps & PropFunc +) { + const { onBlur, placeholder, value, onChange, ...boxProps } = props; + + const options = { + mode: MARKDOWN_CONFIG, + theme: "tlon", + lineNumbers: false, + lineWrapping: true, + scrollbarStyle: "native", + // cursorHeight: 0.85, + placeholder: placeholder || "", + }; + + const handleChange = useCallback( + (_e, _d, v: string) => { + onChange(v); + }, + [onChange] + ); + + const handleBlur = useCallback( + (_i, e: any) => { + onBlur && onBlur(e); + }, + [onBlur] + ); + + return ( + + + + ); +} diff --git a/pkg/interface/src/views/apps/publish/components/lib/MarkdownField.tsx b/pkg/interface/src/views/apps/publish/components/lib/MarkdownField.tsx index cec0f6d5ef..67e15c4f31 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/MarkdownField.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/MarkdownField.tsx @@ -1,27 +1,43 @@ -import React from 'react'; -import styled from 'styled-components'; -import { MarkdownEditor as _MarkdownEditor, Box, ErrorMessage } from '@tlon/indigo-react'; -import { useField } from 'formik'; +import React, { useCallback } from "react"; +import _ from "lodash"; +import { Box, ErrorLabel } from "@tlon/indigo-react"; +import { useField } from "formik"; +import { MarkdownEditor } from "./MarkdownEditor"; -const MarkdownEditor = styled(_MarkdownEditor)` - border: 1px solid ${(p) => p.theme.colors.lightGray}; - border-radius: ${(p) => p.theme.radii[2]}px; -`; +export const MarkdownField = ({ + id, + ...rest +}: { id: string } & Parameters[0]) => { + const [{ value, onBlur }, { error, touched }, { setValue }] = useField(id); -export const MarkdownField = ({ id, ...rest }: { id: string; } & Parameters[0]) => { - const [{ value }, { error, touched }, { setValue, setTouched }] = useField(id); + const handleBlur = useCallback( + (e: any) => { + _.set(e, "target.id", id); + console.log(e); + onBlur && onBlur(e); + }, + [onBlur, id] + ); + + const hasError = !!(error && touched); return ( - + setTouched(true)} - onBlur={() => setTouched(false)} + borderColor={hasError ? "red" : "lightGray"} + onBlur={handleBlur} value={value} - onBeforeChange={(e, d, v) => setValue(v)} + onChange={setValue} /> - {touched && error} + + {error} + ); }; - - diff --git a/pkg/interface/src/views/apps/publish/components/lib/MetadataForm.tsx b/pkg/interface/src/views/apps/publish/components/lib/MetadataForm.tsx index 4209817ef4..05065ba2cb 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/MetadataForm.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/MetadataForm.tsx @@ -3,11 +3,9 @@ import { AsyncButton } from "../../../../components/AsyncButton"; import * as Yup from "yup"; import { Box, - Input, - Checkbox, + ManagedTextInputField as Input, + ManagedCheckboxField as Checkbox, Col, - InputLabel, - InputCaption, Button, Center, } from "@tlon/indigo-react"; diff --git a/pkg/interface/src/views/apps/publish/components/lib/NoteForm.tsx b/pkg/interface/src/views/apps/publish/components/lib/NoteForm.tsx index e4cc1f8ae6..efcc457fd2 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/NoteForm.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/NoteForm.tsx @@ -1,6 +1,11 @@ import React from "react"; import * as Yup from "yup"; -import { Box, Input } from "@tlon/indigo-react"; +import { + Box, + ManagedTextInputField as Input, + Row, + Col, +} from "@tlon/indigo-react"; import { AsyncButton } from "../../../../components/AsyncButton"; import { Formik, Form, FormikHelpers } from "formik"; import { MarkdownField } from "./MarkdownField"; @@ -29,32 +34,29 @@ export function PostForm(props: PostFormProps) { const { initial, onSubmit, submitLabel, loadingText } = props; return ( - +
- - - + + + {submitLabel} - - + +
-
+ ); } diff --git a/pkg/interface/src/views/apps/publish/components/lib/Notebook.tsx b/pkg/interface/src/views/apps/publish/components/lib/Notebook.tsx index 1df6cccd7a..dec39b9724 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/Notebook.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/Notebook.tsx @@ -3,35 +3,18 @@ import { Link, RouteComponentProps, Route, Switch } from "react-router-dom"; import { NotebookPosts } from "./NotebookPosts"; import { Subscribers } from "./Subscribers"; import { Settings } from "./Settings"; -import { Spinner } from '~/views/components/Spinner'; +import { Spinner } from "~/views/components/Spinner"; +import { Tabs, Tab } from "~/views/components/Tab"; import { roleForShip } from "~/logic/lib/group"; -import { - Box, - Button, - Text, - Tab as _Tab, - Tabs, - TabList as _TabList, - TabPanels, - TabPanel, - Row, -} from "@tlon/indigo-react"; +import { Box, Button, Text, Row } from "@tlon/indigo-react"; import { Notebook as INotebook } from "~/types/publish-update"; import { Groups } from "~/types/group-update"; import { Contacts, Rolodex } from "~/types/contact-update"; import GlobalApi from "~/logic/api/global"; import styled from "styled-components"; -import {Associations} from "~/types"; +import { Associations } from "~/types"; import { deSig } from "~/logic/lib/util"; -const TabList = styled(_TabList)` - margin-bottom: ${(p) => p.theme.space[4]}px; -`; - -const Tab = styled(_Tab)` - flex-grow: 1; -`; - interface NotebookProps { api: GlobalApi; ship: string; @@ -46,18 +29,39 @@ interface NotebookProps { interface NotebookState { isUnsubscribing: boolean; + tab: string; } -export class Notebook extends PureComponent { +export class Notebook extends PureComponent< + NotebookProps & RouteComponentProps, + NotebookState +> { constructor(props) { super(props); this.state = { - isUnsubscribing: false + isUnsubscribing: false, + tab: "all", }; + this.setTab = this.setTab.bind(this); + } + + setTab(tab: string) { + this.setState({ tab }); } render() { - const { api, ship, book, notebook, notebookContacts, groups, history, hideNicknames, associations } = this.props; + const { + api, + ship, + book, + notebook, + notebookContacts, + groups, + history, + hideNicknames, + associations, + } = this.props; + const { state } = this; const group = groups[notebook?.["writers-group-path"]]; if (!group) return null; // Waitin on groups to populate @@ -66,14 +70,14 @@ export class Notebook extends PureComponent {isWriter && ( - + )} - {!isOwn - ? this.state.isUnsubscribing - ? - : - : null - } + ) + ) : null} - - All Posts - About - {isAdmin && Subscribers} - {isOwn && Settings} - - - - + + {isAdmin && ( + <> + - - - {notebook?.about} - - - - - - - - + + )} + {state.tab === "all" && ( + + )} + {state.tab === "about" && ( + + {notebook?.about} + + )} + {state.tab === "subscribers" && ( + + )} + {state.tab === "settings" && ( + + )}
); diff --git a/pkg/interface/src/views/apps/publish/components/lib/NotebookPosts.tsx b/pkg/interface/src/views/apps/publish/components/lib/NotebookPosts.tsx index 26e388b06a..82835370c4 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/NotebookPosts.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/NotebookPosts.tsx @@ -15,7 +15,7 @@ interface NotebookPostsProps { export function NotebookPosts(props: NotebookPostsProps) { return ( - + {props.list.map((noteId: NoteId) => { const note = props.notes[noteId]; if (!note) { diff --git a/pkg/interface/src/views/apps/publish/components/lib/Settings.tsx b/pkg/interface/src/views/apps/publish/components/lib/Settings.tsx index 3bb3693c8d..5737f8e3ff 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/Settings.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/Settings.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { Box, Col, Button, InputLabel, InputCaption } from "@tlon/indigo-react"; +import { Box, Col, Button, Label } from "@tlon/indigo-react"; import GlobalApi from "~/logic/api/global"; import { Notebook } from "~/types/publish-update"; import { Contacts } from "~/types/contact-update"; @@ -20,7 +20,7 @@ interface SettingsProps { } const Divider = (props) => ( - + ); export function Settings(props: SettingsProps) { const history = useHistory(); @@ -36,10 +36,11 @@ export function Settings(props: SettingsProps) { {isUnmanaged && ( <> @@ -50,12 +51,12 @@ export function Settings(props: SettingsProps) { - Delete Notebook - + + - diff --git a/pkg/interface/src/views/apps/publish/components/lib/Sidebar.tsx b/pkg/interface/src/views/apps/publish/components/lib/Sidebar.tsx index 615b3122dd..9add01baa5 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/Sidebar.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/Sidebar.tsx @@ -106,7 +106,8 @@ export function Sidebar(props: any) { pt={[3, 0]} overflowY="auto" display={display} - maxWidth={["none", "250px"]} + flexShrink={0} + width={["auto", "250px"]} > diff --git a/pkg/interface/src/views/apps/publish/components/lib/Subscribers.tsx b/pkg/interface/src/views/apps/publish/components/lib/Subscribers.tsx index 069e851f33..db986541fa 100644 --- a/pkg/interface/src/views/apps/publish/components/lib/Subscribers.tsx +++ b/pkg/interface/src/views/apps/publish/components/lib/Subscribers.tsx @@ -80,7 +80,7 @@ export class Subscribers extends Component { const role = roleForShip(group, window.ship) return ( - + { role === 'admin' && (