diff --git a/app/client/src/pages/Editor/Explorer/Entity/EntityProperty.tsx b/app/client/src/pages/Editor/Explorer/Entity/EntityProperty.tsx index 9b7e462b64..93111c8ab8 100644 --- a/app/client/src/pages/Editor/Explorer/Entity/EntityProperty.tsx +++ b/app/client/src/pages/Editor/Explorer/Entity/EntityProperty.tsx @@ -3,7 +3,12 @@ import styled from "styled-components"; import HighlightedCode, { SYNTAX_HIGHLIGHTING_SUPPORTED_LANGUAGES, } from "components/editorComponents/HighlightedCode"; -import { Popover, PopoverInteractionKind, Classes } from "@blueprintjs/core"; +import { + Popover, + PopoverInteractionKind, + Classes, + Icon, +} from "@blueprintjs/core"; import { CurrentValueViewer } from "components/editorComponents/CodeEditor/EvaluatedValuePopup"; import { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig"; import useClipboard from "utils/hooks/useClipboard"; @@ -61,9 +66,15 @@ const Wrapper = styled.div<{ step: number }>` padding-top: 4px; padding-bottom: 4px; cursor: pointer; + & ~ span.${Classes.ICON} { + position: absolute; + right: 4px; + top: 10px; + opacity: 0; + } &:hover { &:before { - content: "Copy"; + content: ""; background: ${Colors.TUNDORA}; opacity: 0.5; position: absolute; @@ -71,14 +82,11 @@ const Wrapper = styled.div<{ step: number }>` height: 100%; top: 0; width: 100%; - font-size: 12px; - color: white; - display: flex; - justify-content: flex-end; - align-items: center; - text-align: right; z-index: 1; } + & ~ span.${Classes.ICON} { + opacity: 1; + } } } @@ -92,6 +100,7 @@ const Wrapper = styled.div<{ step: number }>` text-shadow: none; padding-left: ${props => props.step * props.theme.spaces[2] + props.theme.spaces[3]}px; + padding-right: 20px; & span.token.property { overflow: hidden; white-space: nowrap; @@ -214,6 +223,7 @@ export const EntityProperty = memo((props: EntityPropertyProps) => { codeText={codeText} language={SYNTAX_HIGHLIGHTING_SUPPORTED_LANGUAGES.APPSMITH} /> + {propertyValue} ); diff --git a/app/client/src/pages/Editor/Explorer/Pages/PageEntity.tsx b/app/client/src/pages/Editor/Explorer/Pages/PageEntity.tsx index 7f39281efa..a428304c16 100644 --- a/app/client/src/pages/Editor/Explorer/Pages/PageEntity.tsx +++ b/app/client/src/pages/Editor/Explorer/Pages/PageEntity.tsx @@ -27,7 +27,7 @@ export const ExplorerPageEntity = memo((props: ExplorerPageEntityProps) => { if (!!params.applicationId) { history.push(BUILDER_PAGE_URL(params.applicationId, props.page.pageId)); } - }, [props.isCurrentPage, props.page.pageId, params.applicationId]); + }, [props.page.pageId, params.applicationId]); const contextMenu = ( { - const errors: CreatePasswordFormValues = {}; - if (!values.password || isEmptyString(values.password)) { - errors.password = FORM_VALIDATION_EMPTY_PASSWORD; - } else if (!isStrongPassword(values.password)) { - errors.password = FORM_VALIDATION_INVALID_PASSWORD; - } - return errors; -}; - -type CreatePasswordProps = InjectedFormProps< - CreatePasswordFormValues, - { - verifyToken: (token: string, email: string) => void; - isTokenValid: boolean; - validatingToken: boolean; - } -> & { - verifyToken: (token: string, email: string) => void; - isTokenValid: boolean; - validatingToken: boolean; -} & RouteComponentProps<{ email: string; token: string }>; - -export const CreatePassword = (props: CreatePasswordProps) => { - const { - error, - handleSubmit, - pristine, - submitting, - submitSucceeded, - submitFailed, - initialValues, - isTokenValid, - validatingToken, - verifyToken, - valid, - } = props; - - useLayoutEffect(() => { - if (initialValues.token && initialValues.email) - verifyToken(initialValues.token, initialValues.email); - }, [initialValues.token, initialValues.email, verifyToken]); - - const showInvalidMessage = !initialValues.token || !initialValues.email; - const showExpiredMessage = !isTokenValid && !validatingToken; - const showSuccessMessage = submitSucceeded && !pristine; - const showFailureMessage = submitFailed && !!error; - - let message = ""; - let messageActions: MessageAction[] | undefined = undefined; - - if (showExpiredMessage) { - message = CREATE_PASSWORD_EXPIRED_TOKEN; - } - if (showInvalidMessage) { - message = CREATE_PASSWORD_INVALID_TOKEN; - } - - if (showSuccessMessage) { - message = CREATE_PASSWORD_RESET_SUCCESS; - messageActions = [ - { - url: AUTH_LOGIN_URL, - text: CREATE_PASSWORD_RESET_SUCCESS_LOGIN_LINK, - intent: "primary", - }, - ]; - } - if (showFailureMessage) { - message = error; - } - - const messageTagProps: FormMessageProps = { - intent: - showInvalidMessage || showExpiredMessage || showFailureMessage - ? "danger" - : "primary", - message, - actions: messageActions, - }; - - if (showInvalidMessage || showExpiredMessage) { - return ; - } - - if (!isTokenValid && validatingToken) { - return ; - } - return ( - - {(showSuccessMessage || showFailureMessage) && ( - - )} - -

{CREATE_PASSWORD_PAGE_TITLE}

-
{CREATE_PASSWORD_PAGE_SUBTITLE}
-
- - - - - - - - -