Skip to content

Commit

Permalink
fix: The calendar height is not correspondingly increased in full-scr…
Browse files Browse the repository at this point in the history
…een mode
  • Loading branch information
haydenull committed Mar 27, 2022
1 parent d6a314f commit b2f8c1a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const App: React.FC<{ env: string }> = ({ env }) => {
}
const onClickFullScreen = () => {
setIsFullScreen(_isFullScreen => !_isFullScreen)
calendarRef.current?.render()
}
const onSettingChange = (values: ISettingsForm) => {
logseq.updateSettings({calendarList: 1, subscriptionList: 1})
Expand Down Expand Up @@ -363,23 +364,24 @@ const App: React.FC<{ env: string }> = ({ env }) => {

<div>
{ showExportWeekly && <Button className="mr-4" onClick={onClickExportWeekly}>Export Weekly</Button> }
<Button className="mr-4" onClick={setSchedules} type="primary" icon={<ReloadOutlined />}>Reload</Button>
<Button className="mr-4" onClick={() => setSettingModal(true)} shape="circle" icon={<SettingOutlined />}></Button>
<Button onClick={onClickFullScreen} shape="circle" icon={isFullScreen ? <FullscreenExitOutlined /> : <FullscreenOutlined />}></Button>
</div>
</div>
{/* ========= title bar end ========= */}

{/* ========= content start ========= */}
<div className="flex">
<div className="flex flex-1">
<div className={`transition-all overflow-hidden bg-gray-100 mr-2 ${isFold ? 'w-0 mr-0' : 'w-40'}`}>
<Sidebar
onShowCalendarChange={onShowCalendarChange}
calendarList={enabledCalendarList}
subscriptionList={enabledSubscriptionList}
/>
</div>
<div id="calendar" className="flex-1" style={{ height: '624px' }}></div>
<div className="flex-1">
<div id="calendar" style={{ height: isFullScreen ? '100%' : '624px' }}></div>
</div>
</div>
{/* ========= content end ========= */}

Expand Down

0 comments on commit b2f8c1a

Please sign in to comment.