mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ddccc195a |
@@ -16,6 +16,7 @@ import { fadeAndScaleIn, fadeIn } from "~/styles/animations";
|
||||
import Desktop from "~/utils/Desktop";
|
||||
import ErrorBoundary from "./ErrorBoundary";
|
||||
import * as VisuallyHidden from "@radix-ui/react-visually-hidden";
|
||||
import Tooltip from "./Tooltip";
|
||||
|
||||
type Props = {
|
||||
children?: React.ReactNode;
|
||||
@@ -93,9 +94,11 @@ const Modal: React.FC<Props> = ({
|
||||
</DesktopContent>
|
||||
<Header>
|
||||
{title && <Text size="large">{title}</Text>}
|
||||
<NudeButton onClick={onRequestClose}>
|
||||
<CloseIcon />
|
||||
</NudeButton>
|
||||
<Tooltip content={t("Close")} shortcut="Esc">
|
||||
<NudeButton onClick={onRequestClose}>
|
||||
<CloseIcon />
|
||||
</NudeButton>
|
||||
</Tooltip>
|
||||
</Header>
|
||||
</Centered>
|
||||
</Wrapper>
|
||||
|
||||
@@ -15,6 +15,7 @@ import EditableTitle from "~/components/EditableTitle";
|
||||
import Fade from "~/components/Fade";
|
||||
import CollectionIcon from "~/components/Icons/CollectionIcon";
|
||||
import NudeButton from "~/components/NudeButton";
|
||||
import Tooltip from "~/components/Tooltip";
|
||||
import useBoolean from "~/hooks/useBoolean";
|
||||
import useCurrentUser from "~/hooks/useCurrentUser";
|
||||
import usePolicy from "~/hooks/usePolicy";
|
||||
@@ -166,17 +167,18 @@ const CollectionLink: React.FC<Props> = ({
|
||||
!isDraggingAnyCollection && (
|
||||
<Fade>
|
||||
{can.createDocument && (
|
||||
<NudeButton
|
||||
tooltip={{ content: t("New doc"), delay: 500 }}
|
||||
aria-label={t("New nested document")}
|
||||
onClick={(ev) => {
|
||||
ev.preventDefault();
|
||||
setIsAddingNewChild();
|
||||
handleExpand();
|
||||
}}
|
||||
>
|
||||
<PlusIcon />
|
||||
</NudeButton>
|
||||
<Tooltip content={t("New doc")} delay={500}>
|
||||
<NudeButton
|
||||
aria-label={t("New nested document")}
|
||||
onClick={(ev) => {
|
||||
ev.preventDefault();
|
||||
setIsAddingNewChild();
|
||||
handleExpand();
|
||||
}}
|
||||
>
|
||||
<PlusIcon />
|
||||
</NudeButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
<CollectionMenu
|
||||
collection={collection}
|
||||
|
||||
@@ -67,8 +67,6 @@ function DocumentHeader({
|
||||
revision,
|
||||
isEditing,
|
||||
isDraft,
|
||||
isPublishing,
|
||||
isSaving,
|
||||
savingIsDisabled,
|
||||
publishingIsDisabled,
|
||||
onSelectTemplate,
|
||||
@@ -256,10 +254,6 @@ function DocumentHeader({
|
||||
actions={({ isCompact }) => (
|
||||
<>
|
||||
<ObservingBanner />
|
||||
|
||||
{!isPublishing && isSaving && user?.separateEditMode && (
|
||||
<Status>{t("Saving")}…</Status>
|
||||
)}
|
||||
{!isDeleted && !isRevision && can.listViews && (
|
||||
<Collaborators
|
||||
document={document}
|
||||
@@ -286,7 +280,7 @@ function DocumentHeader({
|
||||
{(isEditing || isTemplateEditable) && (
|
||||
<Action>
|
||||
<Tooltip
|
||||
content={t("Save")}
|
||||
content={isDraft ? t("Save draft") : t("Done editing")}
|
||||
shortcut={`${metaDisplay}+enter`}
|
||||
placement="bottom"
|
||||
>
|
||||
@@ -376,10 +370,4 @@ const StyledHeader = styled(Header)<{ $hidden: boolean }>`
|
||||
${(props) => props.$hidden && "opacity: 0;"}
|
||||
`;
|
||||
|
||||
const Status = styled(Action)`
|
||||
padding-left: 0;
|
||||
padding-right: 4px;
|
||||
color: ${(props) => props.theme.slate};
|
||||
`;
|
||||
|
||||
export default observer(DocumentHeader);
|
||||
|
||||
@@ -117,14 +117,6 @@ function KeyboardShortcuts({ defaultQuery = "" }: Props) {
|
||||
),
|
||||
label: t("Publish document and exit"),
|
||||
},
|
||||
{
|
||||
shortcut: (
|
||||
<>
|
||||
<Key symbol>{metaDisplay}</Key> + <Key>s</Key>
|
||||
</>
|
||||
),
|
||||
label: t("Save document"),
|
||||
},
|
||||
{
|
||||
shortcut: (
|
||||
<>
|
||||
|
||||
@@ -885,7 +885,6 @@
|
||||
"Open this guide": "Open this guide",
|
||||
"Enter": "Enter",
|
||||
"Publish document and exit": "Publish document and exit",
|
||||
"Save document": "Save document",
|
||||
"Cancel editing": "Cancel editing",
|
||||
"Collaboration": "Collaboration",
|
||||
"Formatting": "Formatting",
|
||||
|
||||
Reference in New Issue
Block a user