feat: feature/mvp-sprint-1 Made settings menu hide type selection when on readonly mode
This commit is contained in:
parent
9f6d270464
commit
180608a8b8
@ -67,6 +67,7 @@ export const SettingsMenu = (props) => {
|
|||||||
cursor="pointer"
|
cursor="pointer"
|
||||||
paddingY={basePadding}
|
paddingY={basePadding}
|
||||||
>
|
>
|
||||||
|
{!props?.readonly && (
|
||||||
<Flex
|
<Flex
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
flexDirection="row"
|
flexDirection="row"
|
||||||
@ -81,13 +82,15 @@ export const SettingsMenu = (props) => {
|
|||||||
Types
|
Types
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
)}
|
||||||
<Flex
|
<Flex
|
||||||
flexDirection="column"
|
flexDirection="column"
|
||||||
// rowGap={basePadding}
|
// rowGap={basePadding}
|
||||||
background="greys.lightt"
|
background="greys.lightt"
|
||||||
cursor="pointer"
|
cursor="pointer"
|
||||||
>
|
>
|
||||||
{types.map((type, idx) => {
|
{!props?.readonly &&
|
||||||
|
types.map((type, idx) => {
|
||||||
const ret = (
|
const ret = (
|
||||||
<Flex
|
<Flex
|
||||||
key={props?.uuid + props?.fullPath + "-type-menu-" + idx}
|
key={props?.uuid + props?.fullPath + "-type-menu-" + idx}
|
||||||
|
@ -564,17 +564,21 @@ export const Thingtime = (props) => {
|
|||||||
const pathDom = React.useMemo(() => {
|
const pathDom = React.useMemo(() => {
|
||||||
if (renderedPath) {
|
if (renderedPath) {
|
||||||
return (
|
return (
|
||||||
<Flex
|
<>
|
||||||
maxWidth="100%"
|
<MagicInput
|
||||||
paddingLeft={props?.pathPl || pl}
|
value={renderedPath}
|
||||||
fontSize="12px"
|
readonly={!props?.edit}
|
||||||
wordBreak="break-all"
|
chakras={{
|
||||||
>
|
maxWidth: "100%",
|
||||||
{renderedPath}
|
paddingLeft: props?.pathPl || pl,
|
||||||
</Flex>
|
fontSize: "12px",
|
||||||
|
wordBreak: "break-all",
|
||||||
|
}}
|
||||||
|
></MagicInput>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}, [renderedPath, pl, props?.pathPl])
|
}, [renderedPath, pl, props?.edit, props?.pathPl])
|
||||||
|
|
||||||
const handleMouseEvent = React.useCallback(
|
const handleMouseEvent = React.useCallback(
|
||||||
(e) => {
|
(e) => {
|
||||||
@ -674,6 +678,7 @@ export const Thingtime = (props) => {
|
|||||||
opacity={showContextIcon ? 1 : 0}
|
opacity={showContextIcon ? 1 : 0}
|
||||||
uuid={uuid}
|
uuid={uuid}
|
||||||
fullPath={fullPath}
|
fullPath={fullPath}
|
||||||
|
readonly={!props?.edit}
|
||||||
onChangeType={onChangeType}
|
onChangeType={onChangeType}
|
||||||
></SettingsMenu>
|
></SettingsMenu>
|
||||||
<Flex
|
<Flex
|
||||||
|
Loading…
Reference in New Issue
Block a user