feat: create workspace from loading existing exported file (#2122)

Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
Peng Xiao
2023-05-09 15:30:01 +08:00
committed by GitHub
parent 5432aae85c
commit 7c2574b1ca
93 changed files with 2999 additions and 1406 deletions

View File

@@ -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 () => {

View File

@@ -124,7 +124,7 @@ export const AppSidebar = forwardRef<HTMLElement, AppSidebarProps>(
{clientUpdateAvailable && (
<Button
onClick={() => {
window.apis?.onClientUpdateInstall();
window.apis?.updater.updateClient();
}}
noBorder
className={updaterButtonStyle}

View File

@@ -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

View File

@@ -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 ? (