mirror of
https://github.com/outline/outline.git
synced 2026-11-28 16:19:46 +03:00
Language and UI tweaks
This commit is contained in:
1 parent
a2ee7457ab
commit
0b568128cf
3 files changed
+43
-59
No files matched your search
@@ -46,7 +46,7 @@ const Contents = styled.div<{ $shrink?: boolean; $width?: number }>`
|
||||
border-radius: 6px;
|
||||
padding: ${(props) => (props.$shrink ? "6px 0" : "12px 24px")};
|
||||
max-height: 50vh;
|
||||
overflow-y: scroll;
|
||||
overflow-y: auto;
|
||||
box-shadow: ${(props) => props.theme.menuShadow};
|
||||
width: ${(props) => props.$width}px;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import Share from "~/models/Share";
|
||||
import Button from "~/components/Button";
|
||||
import CopyToClipboard from "~/components/CopyToClipboard";
|
||||
import Flex from "~/components/Flex";
|
||||
import Input from "~/components/Input";
|
||||
import Notice from "~/components/Notice";
|
||||
import Switch from "~/components/Switch";
|
||||
import Text from "~/components/Text";
|
||||
@@ -135,8 +134,8 @@ function SharePopover({
|
||||
<GlobeIcon size={28} color="currentColor" />
|
||||
) : (
|
||||
<PadlockIcon size={28} color="currentColor" />
|
||||
)}{" "}
|
||||
{t("Share this document")}
|
||||
)}
|
||||
<span>{t("Share this document")}</span>
|
||||
</Heading>
|
||||
|
||||
{sharedParent && !document.isDraft && (
|
||||
@@ -204,33 +203,13 @@ function SharePopover({
|
||||
{share.includeChildDocuments
|
||||
? t("Nested documents are publicly available")
|
||||
: t("Nested documents are not shared")}
|
||||
.
|
||||
</SwitchText>
|
||||
</SwitchLabel>
|
||||
</SwitchWrapper>
|
||||
)}
|
||||
|
||||
<Flex>
|
||||
<InputLink
|
||||
type="text"
|
||||
label={t("Link")}
|
||||
placeholder={`${t("Loading")}…`}
|
||||
value={shareUrl}
|
||||
labelHidden
|
||||
readOnly
|
||||
/>
|
||||
<CopyToClipboard text={shareUrl} onCopy={handleCopied}>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={isCopied || (!share && team.sharing)}
|
||||
ref={buttonRef}
|
||||
primary
|
||||
>
|
||||
{t("Copy link")}
|
||||
</Button>
|
||||
</CopyToClipboard>
|
||||
</Flex>
|
||||
|
||||
{expandedOptions ? (
|
||||
{expandedOptions && (
|
||||
<>
|
||||
<Separator />
|
||||
<SwitchWrapper>
|
||||
@@ -247,26 +226,40 @@ function SharePopover({
|
||||
<SwitchText>
|
||||
{isEditMode
|
||||
? t(
|
||||
"Users with enough permissions will be redirected to the editor"
|
||||
"Users with edit permission will be redirected to the main app"
|
||||
)
|
||||
: `${t("Shared view mode")}: ${t(
|
||||
"page has Edit button that redirects to the editor"
|
||||
)}`}
|
||||
: t("All users see the same publicly shared view")}
|
||||
.
|
||||
</SwitchText>
|
||||
</SwitchLabel>
|
||||
</SwitchWrapper>
|
||||
</>
|
||||
) : (
|
||||
<Flex justify="center">
|
||||
<MoreOptionsButton
|
||||
onClick={() => setExpandedOptions(true)}
|
||||
title={t("More Options")}
|
||||
aria-label={t("More Options")}
|
||||
>
|
||||
<ExpandedIcon size={36} />
|
||||
</MoreOptionsButton>
|
||||
</Flex>
|
||||
)}
|
||||
|
||||
<Flex justify="space-between" style={{ marginBottom: 8 }}>
|
||||
{expandedOptions ? (
|
||||
<span />
|
||||
) : (
|
||||
<MoreOptionsButton
|
||||
icon={<ExpandedIcon />}
|
||||
onClick={() => setExpandedOptions(true)}
|
||||
neutral
|
||||
borderOnHover
|
||||
>
|
||||
{t("More options")}
|
||||
</MoreOptionsButton>
|
||||
)}
|
||||
<CopyToClipboard text={shareUrl} onCopy={handleCopied}>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={isCopied || (!share && team.sharing)}
|
||||
ref={buttonRef}
|
||||
primary
|
||||
>
|
||||
{t("Copy link")}
|
||||
</Button>
|
||||
</CopyToClipboard>
|
||||
</Flex>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -275,6 +268,9 @@ const Heading = styled.h2`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 12px;
|
||||
gap: 8px;
|
||||
|
||||
/* accounts for icon padding */
|
||||
margin-left: -4px;
|
||||
`;
|
||||
|
||||
@@ -282,17 +278,11 @@ const SwitchWrapper = styled.div`
|
||||
margin: 20px 0;
|
||||
`;
|
||||
|
||||
export const MoreOptionsButton = styled.button`
|
||||
const MoreOptionsButton = styled(Button)`
|
||||
background: none;
|
||||
border: 0;
|
||||
transition: opacity 100ms ease-in-out;
|
||||
opacity: 0.5;
|
||||
color: ${(props) => props.theme.divider};
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
font-size: 14px;
|
||||
color: ${(props) => props.theme.textSecondary};
|
||||
margin-left: -8px;
|
||||
`;
|
||||
|
||||
const Separator = styled.div`
|
||||
@@ -301,11 +291,6 @@ const Separator = styled.div`
|
||||
background-color: ${(props) => props.theme.divider};
|
||||
`;
|
||||
|
||||
const InputLink = styled(Input)`
|
||||
flex-grow: 1;
|
||||
margin-right: 8px;
|
||||
`;
|
||||
|
||||
const SwitchLabel = styled(Flex)`
|
||||
svg {
|
||||
flex-shrink: 0;
|
||||
|
||||
@@ -431,10 +431,9 @@
|
||||
"Nested documents are publicly available": "Nested documents are publicly available",
|
||||
"Nested documents are not shared": "Nested documents are not shared",
|
||||
"Automatically redirect to the editor": "Automatically redirect to the editor",
|
||||
"Users with enough permissions will be redirected to the editor": "Users with enough permissions will be redirected to the editor",
|
||||
"Shared view mode": "Shared view mode",
|
||||
"page has Edit button that redirects to the editor": "page has Edit button that redirects to the editor",
|
||||
"More Options": "More Options",
|
||||
"Users with edit permission will be redirected to the main app": "Users with edit permission will be redirected to the main app",
|
||||
"All users see the same publicly shared view": "All users see the same publicly shared view",
|
||||
"More options": "More options",
|
||||
"{{ teamName }} is using Outline to share documents, please login to continue.": "{{ teamName }} is using Outline to share documents, please login to continue.",
|
||||
"Are you sure you want to delete the <em>{{ documentTitle }}</em> template?": "Are you sure you want to delete the <em>{{ documentTitle }}</em> template?",
|
||||
"Are you sure about that? Deleting the <em>{{ documentTitle }}</em> document will delete all of its history</em>.": "Are you sure about that? Deleting the <em>{{ documentTitle }}</em> document will delete all of its history</em>.",
|
||||
|
||||
Reference in new issue
Block a user