Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into renovate/cesium-1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Oct 18, 2021
2 parents 84241c4 + 2017aa3 commit d2acc8f
Show file tree
Hide file tree
Showing 14 changed files with 232 additions and 145 deletions.
78 changes: 40 additions & 38 deletions src/components/atoms/TextBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,44 +103,46 @@ const TextBox: React.FC<Props> = ({
}, [innerValue, onChange, throttle, throttleTimeout]);

return (
<FormWrapper className={className} align="center">
{prefix && (
<FloatedText floatedTextColor={floatedTextColor} color={color}>
{prefix}
</FloatedText>
)}
{multiline ? (
<StyledTextarea
ref={textAreaRef}
value={innerValue ?? ""}
onChange={handleChangeTextArea}
onBlur={handleBlur}
color={color}
backgroundColor={backgroundColor}
disabled={disabled}
placeholder={placeholder}
rows={rows}
/>
) : (
<StyledInput
value={innerValue ?? ""}
onChange={handleChange}
onKeyPress={handleKeyPress}
onBlur={handleBlur}
color={color}
type={type}
backgroundColor={backgroundColor}
disabled={disabled}
placeholder={placeholder}
borderColor={borderColor}
/>
)}
{suffix && (
<FloatedText floatedTextColor={floatedTextColor} color={color}>
{suffix}
</FloatedText>
)}
</FormWrapper>
<div className={className}>
<FormWrapper align="center">
{prefix && (
<FloatedText floatedTextColor={floatedTextColor} color={color}>
{prefix}
</FloatedText>
)}
{multiline ? (
<StyledTextarea
ref={textAreaRef}
value={innerValue ?? ""}
onChange={handleChangeTextArea}
onBlur={handleBlur}
color={color}
backgroundColor={backgroundColor}
disabled={disabled}
placeholder={placeholder}
rows={rows}
/>
) : (
<StyledInput
value={innerValue ?? ""}
onChange={handleChange}
onKeyPress={handleKeyPress}
onBlur={handleBlur}
color={color}
type={type}
backgroundColor={backgroundColor}
disabled={disabled}
placeholder={placeholder}
borderColor={borderColor}
/>
)}
{suffix && (
<FloatedText floatedTextColor={floatedTextColor} color={color}>
{suffix}
</FloatedText>
)}
</FormWrapper>
</div>
);
};

Expand Down
15 changes: 1 addition & 14 deletions src/components/molecules/Common/ProjectMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ const ProjectMenu: React.FC<Props> = ({ currentProject, teamId }) => {
text={intl.formatMessage({ defaultMessage: "Datasets" })}
/>
</MenuListItem>
{/* <MenuListItem>
<MenuListItemLabel
linkTo={`/settings/project/${currentProject.id}/plugins`}
text={intl.formatMessage({ defaultMessage: "Plugins" })}
/>
</MenuListItem> */}
<Spacer />
<MenuListItem>
<MenuListItemLabel
Expand All @@ -60,17 +54,10 @@ const ProjectMenu: React.FC<Props> = ({ currentProject, teamId }) => {
/>
</MenuListItem>
<Spacer />
<MenuListItem>
<MenuListItemLabel
icon="dashboard"
linkTo={`/dashboard/${teamId}`}
text={intl.formatMessage({ defaultMessage: "Top page" })}
/>
</MenuListItem>
<MenuListItem>
<MenuListItemLabel
icon="help"
linkTo="/projects"
onClick={() => window.open("http://docs.reearth.io", "_blank", "noopener")}
text={intl.formatMessage({ defaultMessage: "Help" })}
/>
</MenuListItem>
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/Dashboard/QuickStart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const QuickStart: React.FC<Props> = ({
<LongBannerButton
align="center"
justify="center"
onClick={() => window.location.assign("http://docs.reearth.io")}>
onClick={() => window.open("http://docs.reearth.io")}>
<MapIcon icon="map" />
<Text size="m" weight="bold" customColor>
{intl.formatMessage({ defaultMessage: "User guide" })}
Expand Down
1 change: 1 addition & 0 deletions src/components/molecules/Dashboard/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const StyledLink = styled(Link)`
padding: ${metricsSizes["2xs"]}px;
border-radius: ${metricsSizes.xs}px;
align-self: flex-end;
display: flex;
&:hover {
text-decoration: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { useIntl } from "react-intl";
import Flex from "@reearth/components/atoms/Flex";
import Icon from "@reearth/components/atoms/Icon";
import Text from "@reearth/components/atoms/Text";
import PasswordModal from "@reearth/components/molecules/Settings/Account/PasswordModal";
import PasswordModal, {
PasswordPolicy,
} from "@reearth/components/molecules/Settings/Account/PasswordModal";
import Field from "@reearth/components/molecules/Settings/Field";
import EditableItem from "@reearth/components/molecules/Settings/Project/EditableItem";
import Section from "@reearth/components/molecules/Settings/Section";
Expand All @@ -18,6 +20,7 @@ export type Props = {
appTheme?: string;
lang?: string;
hasPassword: boolean;
passwordPolicy?: PasswordPolicy;
updatePassword?: (password: string, passwordConfirmation: string) => void;
updateLanguage?: (lang: string) => void;
updateTheme?: (theme: string) => void;
Expand All @@ -28,6 +31,7 @@ const ProfileSection: React.FC<Props> = ({
email,
appTheme,
hasPassword,
passwordPolicy,
updatePassword,
updateLanguage,
updateTheme,
Expand Down Expand Up @@ -111,6 +115,7 @@ const ProfileSection: React.FC<Props> = ({
</Section>
<PasswordModal
hasPassword={hasPassword}
passwordPolicy={passwordPolicy}
updatePassword={handleUpdatePassword}
isVisible={isOpen}
onClose={() => setIsOpen(false)}
Expand Down
Loading

0 comments on commit d2acc8f

Please sign in to comment.