Skip to content

Commit 3d6ae88

Browse files
committed
Merge branch 'dev'
2 parents c9d290f + 8cafc57 commit 3d6ae88

5 files changed

Lines changed: 25 additions & 7 deletions

File tree

src/main/events/ipcMain.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export const registerIpcMainHandlers = () => {
203203
const lastDir = storage.get().app.lastExportDir || storage.get().app.exportDir;
204204

205205
if (files.length === 1 && !files[0].name.includes(path.sep)) {
206-
const originalFileName = files[0].name;
206+
const originalFileName = files[0].name.replace(/\//g, "-");
207207
const savePath = await dialogs.showSaveDialog({
208208
defaultPath: `${lastDir}/${path.basename(originalFileName)}`,
209209
showsTagField: false,
@@ -239,7 +239,7 @@ export const registerIpcMainHandlers = () => {
239239
directoryPath = path.resolve(directoryPath);
240240
let filesToBeReplaced = 0;
241241
for (const file of files) {
242-
const outputPath = path.join(directoryPath, file.name);
242+
const outputPath = path.join(directoryPath, file.name.replace(/\//g, "-"));
243243
const validExtensions = [".fig", ".jpg", ".pdf", ".png", ".svg"];
244244
if (
245245
path.relative(directoryPath, outputPath).startsWith("..") ||
@@ -277,7 +277,7 @@ export const registerIpcMainHandlers = () => {
277277
}
278278
}
279279
for (const file of files) {
280-
const outputPath = path.join(directoryPath, file.name);
280+
const outputPath = path.join(directoryPath, file.name.replace(/\//g, "-"));
281281
mkPath(path.dirname(outputPath));
282282

283283
try {

src/main/window/WindowManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class WindowManager {
6868
width: 1200,
6969
height: 900,
7070
frame: false,
71+
resizable: true,
7172
webPreferences: {
7273
sandbox: false,
7374
zoomFactor: 1,

src/renderer/components/TopPanel/toppanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ const TopPanel: React.FunctionComponent<TopPanelProps> = props => {
2323
<div className="top-panel" style={{ zoom: props.scalePanel ? props.scalePanel : 1 }}>
2424
<div className="panelButtons">
2525
<Button
26-
className={`button_clear button_title button_main${!props.current ? " tab_active tab_main_active" : ""}`}
26+
className={`button_clear button_title button_main${!props.current ? " tab_active" : ""}`}
2727
onClick={props.onMainTab}
2828
>
29-
<Icon color="currentColor" type="Figma" size="17" />
29+
<Icon color="currentColor" type="Home" size="18" />
3030
</Button>
3131
{props.visibleNewProjectBtn ? (
3232
<Button className="button_clear button_title" onClick={props.onNewProject}>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as React from "react";
2+
3+
import { IconProps } from "..";
4+
import "../index.scss";
5+
6+
export const Home: React.FunctionComponent<IconProps> = props => {
7+
const size = props.size ? props.size : "16";
8+
const color = props.color ? props.color : "#000";
9+
10+
return (
11+
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
12+
<path d="M2 9.2L8 2L14 9.2V14H9.71429V10.4H6.28571V14H2V9.2Z" fill={color} />
13+
</svg>
14+
);
15+
};

src/renderer/elements/Icon/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { Sync } from "./icons/Sync";
2121
import { Figma } from "./icons/Figma";
2222
import { Restore } from "./icons/Restore";
2323
import { CloseTab } from "./icons/CloseTab";
24+
import { Home } from "./icons/Home";
2425
import "../../animations.scss";
2526
import "./index.scss";
2627

@@ -45,6 +46,7 @@ type Icons =
4546
| "Settings"
4647
| "Figma"
4748
| "Restore"
49+
| "Home"
4850
| "CloseTab";
4951

5052
export interface IconProps {
@@ -81,6 +83,7 @@ export class Icon extends React.Component<ContainerProps, unknown> {
8183
Figma,
8284
Restore,
8385
CloseTab,
86+
Home,
8487
};
8588

8689
constructor(props: ContainerProps) {
@@ -90,7 +93,6 @@ export class Icon extends React.Component<ContainerProps, unknown> {
9093
render(): JSX.Element {
9194
const classNames: string[] = ["icon"];
9295
const IconView = this.iconsMap[this.props.type];
93-
const size = this.props.size || "16";
9496

9597
if (this.props.className) {
9698
classNames.push(this.props.className);
@@ -101,7 +103,7 @@ export class Icon extends React.Component<ContainerProps, unknown> {
101103

102104
return (
103105
<div className={classNames.join(" ")}>
104-
<IconView color={this.props.color} size={size} />
106+
<IconView {...this.props} />
105107
</div>
106108
);
107109
}

0 commit comments

Comments
 (0)