lint
This commit is contained in:
parent
6bd219a2e4
commit
7e6ef23bd2
|
@ -303,7 +303,6 @@ export const EditorComponent = (props: EditorComponentProps) => {
|
||||||
user: { name: profile.name, color: uniqolor(profile.slug).color }
|
user: { name: profile.name, color: uniqolor(profile.slug).color }
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error initializing collaboration:', error)
|
console.error('Error initializing collaboration:', error)
|
||||||
showSnackbar({ body: t('Failed to initialize collaboration') })
|
showSnackbar({ body: t('Failed to initialize collaboration') })
|
||||||
|
@ -334,13 +333,7 @@ export const EditorComponent = (props: EditorComponentProps) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// collab mode on/off
|
// collab mode on/off
|
||||||
createEffect(
|
createEffect(on(isCollabMode, (x) => !x && initializeCollaboration(), { defer: true }))
|
||||||
on(
|
|
||||||
isCollabMode,
|
|
||||||
(x) => !x && initializeCollaboration(),
|
|
||||||
{ defer: true }
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
onCleanup(() => {
|
onCleanup(() => {
|
||||||
editorElRef()?.removeEventListener('focus', handleFocus)
|
editorElRef()?.removeEventListener('focus', handleFocus)
|
||||||
|
|
|
@ -9,8 +9,8 @@ import { MicroBubbleMenu } from './MicroBubbleMenu'
|
||||||
import { ToolbarControl } from './ToolbarControl'
|
import { ToolbarControl } from './ToolbarControl'
|
||||||
|
|
||||||
import { Popover } from '~/components/_shared/Popover/Popover'
|
import { Popover } from '~/components/_shared/Popover/Popover'
|
||||||
import styles from './FullBubbleMenu.module.scss'
|
|
||||||
import { useEditorContext } from '~/context/editor'
|
import { useEditorContext } from '~/context/editor'
|
||||||
|
import styles from './FullBubbleMenu.module.scss'
|
||||||
|
|
||||||
type FullBubbleMenuProps = {
|
type FullBubbleMenuProps = {
|
||||||
editor: () => Editor | undefined
|
editor: () => Editor | undefined
|
||||||
|
@ -265,8 +265,11 @@ export const FullBubbleMenu = (props: FullBubbleMenuProps) => {
|
||||||
<div class={styles.dropDownHolder}>
|
<div class={styles.dropDownHolder}>
|
||||||
<Popover content={t('Collaborative mode')}>
|
<Popover content={t('Collaborative mode')}>
|
||||||
{(triggerRef: (el: HTMLButtonElement) => void) => (
|
{(triggerRef: (el: HTMLButtonElement) => void) => (
|
||||||
<button ref={triggerRef} type="button" class={styles.actionButton}
|
<button
|
||||||
onClick={() => setIsCollabMode(x => !x)}
|
ref={triggerRef}
|
||||||
|
type="button"
|
||||||
|
class={styles.actionButton}
|
||||||
|
onClick={() => setIsCollabMode((x) => !x)}
|
||||||
>
|
>
|
||||||
<Icon name={`comment${isCollabMode() ? '-hover' : ''}`} />
|
<Icon name={`comment${isCollabMode() ? '-hover' : ''}`} />
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user