Открыть боковую панель
Teknokomo
universo-react
Коммиты
f4a422c0
Не подтверждена
Коммит
f4a422c0
создал
Май 09, 2024
по автору
JimmFly
Просмотр файлов
fix(core): keep the delete button from being blocked (#6836)
close #6718
владелец
d8b3a0b6
Изменения
2
Скрыть пробелы
Построчно
Рядом
packages/frontend/core/src/components/workspace/index.css.ts
Просмотр файла @
f4a422c0
...
@@ -93,6 +93,11 @@ export const toolStyle = style({
...
@@ -93,6 +93,11 @@ export const toolStyle = style({
display
:
'
flex
'
,
display
:
'
flex
'
,
flexDirection
:
'
column
'
,
flexDirection
:
'
column
'
,
gap
:
'
12px
'
,
gap
:
'
12px
'
,
selectors
:
{
'
&.trash
'
:
{
bottom
:
'
78px
'
,
},
},
'
@media
'
:
{
'
@media
'
:
{
'
screen and (max-width: 960px)
'
:
{
'
screen and (max-width: 960px)
'
:
{
right
:
'
calc((100vw - 640px) * 3 / 19 + 14px)
'
,
right
:
'
calc((100vw - 640px) * 3 / 19 + 14px)
'
,
...
...
packages/frontend/core/src/components/workspace/index.tsx
Просмотр файла @
f4a422c0
import
{
DocsService
,
GlobalContextService
,
useLiveData
,
useService
,
}
from
'
@toeverything/infra
'
;
import
{
clsx
}
from
'
clsx
'
;
import
{
clsx
}
from
'
clsx
'
;
import
{
useAtomValue
}
from
'
jotai
'
;
import
{
useAtomValue
}
from
'
jotai
'
;
import
type
{
HTMLAttributes
,
PropsWithChildren
,
ReactElement
}
from
'
react
'
;
import
type
{
HTMLAttributes
,
PropsWithChildren
,
ReactElement
}
from
'
react
'
;
...
@@ -63,7 +69,21 @@ export const MainContainer = forwardRef<
...
@@ -63,7 +69,21 @@ export const MainContainer = forwardRef<
MainContainer
.
displayName
=
'
MainContainer
'
;
MainContainer
.
displayName
=
'
MainContainer
'
;
export
const
ToolContainer
=
(
props
:
PropsWithChildren
):
ReactElement
=>
{
export
const
ToolContainer
=
(
props
:
PropsWithChildren
):
ReactElement
=>
{
return
<
div
className
=
{
toolStyle
}
>
{
props
.
children
}
</
div
>;
const
docId
=
useLiveData
(
useService
(
GlobalContextService
).
globalContext
.
docId
.
$
);
const
docRecordList
=
useService
(
DocsService
).
list
;
const
doc
=
useLiveData
(
docId
?
docRecordList
.
doc$
(
docId
)
:
undefined
);
const
inTrash
=
useLiveData
(
doc
?.
meta$
)?.
trash
;
return
(
<
div
className
=
{
clsx
(
toolStyle
,
{
trash
:
inTrash
,
})
}
>
{
props
.
children
}
</
div
>
);
};
};
export
const
WorkspaceFallback
=
():
ReactElement
=>
{
export
const
WorkspaceFallback
=
():
ReactElement
=>
{
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать