Skip to content

Commit b9655d1

Browse files
committed
Discard cloud feature intro
1 parent db224a6 commit b9655d1

File tree

4 files changed

+2
-140
lines changed

4 files changed

+2
-140
lines changed

src/components/organisms/NoteContextView.tsx

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ import {
88
mdiFilePdfOutline,
99
mdiLabelMultipleOutline,
1010
mdiRestore,
11-
mdiPlusBoxMultipleOutline,
12-
mdiLinkPlus,
13-
mdiAccountMultiple,
14-
mdiHistory,
1511
mdiArchive,
1612
} from '@mdi/js'
1713
import { isTagNameValid } from '../../lib/db/utils'
@@ -27,7 +23,6 @@ import {
2723
} from '../../lib/exports'
2824
import { usePreferences } from '../../lib/preferences'
2925
import { usePreviewStyle } from '../../lib/preview'
30-
import { useCloudIntroModal } from '../../lib/cloudIntroModal'
3126
import styled from '../../shared/lib/styled'
3227
import Icon from '../../shared/components/atoms/Icon'
3328
import { useToast } from '../../shared/lib/stores/toast'
@@ -56,7 +51,6 @@ const NoteContextView = ({ storage, note }: NoteContextViewProps) => {
5651
const { previewStyle } = usePreviewStyle()
5752

5853
const includeFrontMatter = preferences['markdown.includeFrontMatter']
59-
const { toggleShowingCloudIntroModal } = useCloudIntroModal()
6054

6155
const appendTagByName = useCallback(
6256
async (tagName: string) => {
@@ -258,57 +252,6 @@ const NoteContextView = ({ storage, note }: NoteContextViewProps) => {
258252
</ControlItem>
259253

260254
<Separator />
261-
262-
<ControlItem>
263-
<CloudIntroItemLabel>
264-
<LabelIcon path={mdiAccountMultiple} />
265-
Guests
266-
</CloudIntroItemLabel>
267-
<CloudIntroItemContent>
268-
<TryCloudButton onClick={toggleShowingCloudIntroModal}>
269-
Try Cloud
270-
</TryCloudButton>
271-
</CloudIntroItemContent>
272-
</ControlItem>
273-
<ControlItem>
274-
<CloudIntroItemLabel>
275-
<LabelIcon path={mdiLinkPlus} />
276-
Public Sharing
277-
</CloudIntroItemLabel>
278-
<CloudIntroItemContent>
279-
<TryCloudButton onClick={toggleShowingCloudIntroModal}>
280-
Try Cloud
281-
</TryCloudButton>
282-
</CloudIntroItemContent>
283-
</ControlItem>
284-
285-
<Separator />
286-
287-
<ControlItem>
288-
<CloudIntroItemLabel>
289-
<LabelIcon path={mdiHistory} />
290-
Revisions
291-
</CloudIntroItemLabel>
292-
<CloudIntroItemContent>
293-
<TryCloudButton onClick={toggleShowingCloudIntroModal}>
294-
Try Cloud
295-
</TryCloudButton>
296-
</CloudIntroItemContent>
297-
</ControlItem>
298-
299-
<Separator />
300-
301-
<ControlItem>
302-
<CloudIntroItemLabel>
303-
<LabelIcon path={mdiPlusBoxMultipleOutline} />
304-
Save As Template
305-
</CloudIntroItemLabel>
306-
<CloudIntroItemContent>
307-
<TryCloudButton onClick={toggleShowingCloudIntroModal}>
308-
Try Cloud
309-
</TryCloudButton>
310-
</CloudIntroItemContent>
311-
</ControlItem>
312255
{note.trashed ? (
313256
<>
314257
<ButtonItem title={t('note.restore')} onClick={untrash}>
@@ -415,44 +358,6 @@ const ControlItemContent = styled.div`
415358
margin-right: 10px;
416359
`
417360

418-
const CloudIntroItemLabel = styled.div`
419-
height: 40px;
420-
display: flex;
421-
align-items: center;
422-
margin-left: 10px;
423-
flex-shrink: 0;
424-
flex-grow: 1;
425-
`
426-
const CloudIntroItemContent = styled.div`
427-
display: flex;
428-
align-items: center;
429-
flex-wrap: wrap;
430-
margin-right: 10px;
431-
`
432-
433-
const TryCloudButton = styled.button`
434-
background-color: ${({ theme }) => theme.colors.variants.primary.base};
435-
color: ${({ theme }) => theme.colors.variants.primary.text};
436-
font-size: 12px;
437-
border: none;
438-
439-
&:hover,
440-
&:active,
441-
&.active {
442-
cursor: pointer;
443-
}
444-
&:focus {
445-
box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.background.tertiary};
446-
}
447-
&:disabled,
448-
&.disabled {
449-
opacity: 0.5;
450-
cursor: default;
451-
}
452-
padding: 5px 10px;
453-
border-radius: 4px;
454-
`
455-
456361
const ButtonItem = styled.button`
457362
height: 40px;
458363
width: 100%;

src/components/organisms/SidebarContainer.tsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
StorageTagsRouteParams,
1717
useRouteParams,
1818
} from '../../lib/routeParams'
19-
import { mdiCloudOffOutline, mdiCog, mdiMagnify } from '@mdi/js'
19+
import { mdiCog, mdiMagnify } from '@mdi/js'
2020
import { noteDetailFocusTitleInputEventEmitter } from '../../lib/events'
2121
import { useTranslation } from 'react-i18next'
2222
import { useSearchModal } from '../../lib/searchModal'
@@ -30,7 +30,6 @@ import { useLocalDB } from '../../lib/v2/hooks/local/useLocalDB'
3030
import { useLocalDnd } from '../../lib/v2/hooks/local/useLocalDnd'
3131
import { CollapsableType } from '../../lib/v2/stores/sidebarCollapse'
3232
import { useSidebarCollapse } from '../../lib/v2/stores/sidebarCollapse'
33-
import { useCloudIntroModal } from '../../lib/cloudIntroModal'
3433
import { mapLocalSpace } from '../../lib/v2/mappers/local/sidebarSpaces'
3534
import { SidebarSpace } from '../../shared/components/organisms/Sidebar/molecules/SidebarSpaces'
3635
import NewDocButton from '../molecules/NewDocButton'
@@ -75,10 +74,6 @@ const SidebarContainer = ({
7574
const { draggedResource, dropInDocOrFolder } = useLocalDnd()
7675
const { generalStatus, setGeneralStatus } = useGeneralStatus()
7776
const [showSpaces, setShowSpaces] = useState(false)
78-
const {
79-
toggleShowingCloudIntroModal,
80-
showingCloudIntroModal,
81-
} = useCloudIntroModal()
8277
const [initialLoadDone] = useState(true)
8378
const {
8479
sideBarOpenedLinksIdsSet,
@@ -476,23 +471,6 @@ const SidebarContainer = ({
476471
workspace,
477472
])
478473

479-
const sidebarFooter = useMemo(() => {
480-
return (
481-
<SidebarButtonList
482-
rows={[
483-
{
484-
label: 'Cloud Intro',
485-
active: showingCloudIntroModal,
486-
icon: mdiCloudOffOutline,
487-
variant: 'subtle',
488-
labelClick: () => toggleShowingCloudIntroModal(),
489-
id: 'sidebar__button__cloud',
490-
},
491-
]}
492-
/>
493-
)
494-
}, [showingCloudIntroModal, toggleShowingCloudIntroModal])
495-
496474
return (
497475
<NavigatorContainer onContextMenu={openStorageContextMenu}>
498476
<Sidebar
@@ -504,7 +482,6 @@ const SidebarContainer = ({
504482
tree={tree}
505483
sidebarResize={sidebarResize}
506484
header={sidebarHeader}
507-
treeBottomRows={sidebarFooter}
508485
/>
509486
</NavigatorContainer>
510487
)

src/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { PreviewStyleProvider } from './lib/preview'
1616
import { StorageRouterProvider } from './lib/storageRouter'
1717
import { SearchModalProvider } from './lib/searchModal'
1818
import { CheckedFeaturesProvider } from './lib/checkedFeatures'
19-
import { CloudIntroModalProvider } from './lib/cloudIntroModal'
2019
import { DialogProvider } from './lib/dialog'
2120

2221
const V2CombinedProvider = combineProviders(
@@ -38,8 +37,7 @@ const CombinedProvider = combineProviders(
3837
PreferencesProvider,
3938
StorageRouterProvider,
4039
RouterProvider,
41-
CheckedFeaturesProvider,
42-
CloudIntroModalProvider
40+
CheckedFeaturesProvider
4341
)
4442

4543
function render(Component: typeof App) {

src/lib/cloudIntroModal.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)