mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat: create workspace from loading existing exported file (#2122)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
@@ -18,7 +18,7 @@ export const updateAvailableAtom = atomWithObservable<boolean>(() => {
|
||||
if (typeof window !== 'undefined') {
|
||||
const isMacosDesktop = environment.isDesktop && environment.isMacOs;
|
||||
if (isMacosDesktop) {
|
||||
const dispose = window.apis?.onClientUpdateAvailable(() => {
|
||||
const dispose = window.events?.updater.onClientUpdateReady(() => {
|
||||
subscriber.next(true);
|
||||
});
|
||||
return () => {
|
||||
|
||||
@@ -124,7 +124,7 @@ export const AppSidebar = forwardRef<HTMLElement, AppSidebarProps>(
|
||||
{clientUpdateAvailable && (
|
||||
<Button
|
||||
onClick={() => {
|
||||
window.apis?.onClientUpdateInstall();
|
||||
window.apis?.updater.updateClient();
|
||||
}}
|
||||
noBorder
|
||||
className={updaterButtonStyle}
|
||||
|
||||
@@ -186,6 +186,7 @@ export const StyledButton = styled('button', {
|
||||
border: noBorder ? 'none' : '1px solid',
|
||||
WebkitAppRegion: 'no-drag',
|
||||
...displayInlineFlex('center', 'center'),
|
||||
gap: '10px',
|
||||
position: 'relative',
|
||||
// TODO: disabled color is not decided
|
||||
...(disabled
|
||||
|
||||
@@ -7,7 +7,7 @@ import { StyledMenuWrapper } from './styles';
|
||||
export type MenuProps = {
|
||||
width?: CSSProperties['width'];
|
||||
} & PopperProps &
|
||||
Omit<TooltipProps, 'title' | 'content'>;
|
||||
Omit<TooltipProps, 'title' | 'content' | 'placement'>;
|
||||
export const Menu = (props: MenuProps) => {
|
||||
const { width, content, placement = 'bottom-start', children } = props;
|
||||
return content ? (
|
||||
|
||||
Reference in New Issue
Block a user