Skip to content

Commit c253c68

Browse files
committed
Merge branch 'dev'
2 parents 3a8b4a6 + 2a4bfc0 commit c253c68

85 files changed

Lines changed: 7106 additions & 33749 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/webpack.config.renderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
33
const path = require("path");
44

55
const rootFolder = process.cwd();
6-
const resolveExtensions = [".ts", ".tsx", ".js", ".jsx", ".json", ".scss"];
6+
const resolveExtensions = [".ts", ".tsx", ".js", ".jsx", ".json", ".css"];
77
const resolveModules = ["node_modules", "react"];
88

99
module.exports = config => {

lib/libstdc++.so.6

-1.86 MB
Binary file not shown.

package-lock.json

Lines changed: 6026 additions & 32575 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@
5757
"@types/node": "^12.12.13",
5858
"@types/react": "^16.14.2",
5959
"@types/react-dom": "^16.0.10",
60-
"@types/react-redux": "^5.0.15",
6160
"@types/react-router-dom": "^4.3.1",
62-
"@types/redux": "^3.6.0",
6361
"@types/uuid": "^8.3.0",
6462
"@typescript-eslint/eslint-plugin": "^4.1.1",
6563
"@typescript-eslint/parser": "^4.1.1",
@@ -69,7 +67,7 @@
6967
"clean-webpack-plugin": "^3.0.0",
7068
"copy-webpack-plugin": "^6.1.0",
7169
"css-loader": "^4.3.0",
72-
"electron": "^13.6.3",
70+
"electron": "^13.6.9",
7371
"electron-builder": "^22.10.4",
7472
"electron-rebuild": "^2.3.4",
7573
"electron-webpack": "^2.8.2",
@@ -81,9 +79,7 @@
8179
"lint-staged": "^10.5.3",
8280
"native-ext-loader": "^2.3.0",
8381
"node-loader": "^1.0.2",
84-
"node-sass": "^4.14.1",
8582
"prettier": "^1.19.1",
86-
"sass-loader": "^10.0.2",
8783
"style-loader": "^1.2.1",
8884
"ts-loader": "^8.0.3",
8985
"typescript": "^3.7.5",

src/main/window/WindowManager.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class WindowManager {
4848
figmaUiScale: number;
4949
panelScale: number;
5050
closedTabsHistory: Array<string> = [];
51+
tabsWereRestored: boolean;
5152
themes: Themes.Theme[] = [];
5253
currentTheme: Themes.Theme;
5354
creatorTheme: Themes.Theme;
@@ -64,6 +65,7 @@ class WindowManager {
6465
this.figmaUiScale = storage.get().ui.scaleFigmaUI;
6566
this.panelScale = storage.get().ui.scalePanel;
6667
this.figmaUserIDs = storage.get().authedUserIDs;
68+
this.tabsWereRestored = false;
6769

6870
const options: E.BrowserWindowConstructorOptions = {
6971
width: 1200,
@@ -151,12 +153,17 @@ class WindowManager {
151153
tabs.forEach((tab, i) => {
152154
setTimeout(() => {
153155
this.addTab("loadContent.js", tab.url, tab.title);
156+
if (i === tabs.length - 1) {
157+
this.tabsWereRestored = true;
158+
}
154159
}, 500 * i);
155160
});
156161

157162
storage.clearLastOpenedTabs();
158163

159164
MenuState.updateInFileBrowserActionState();
165+
} else {
166+
this.tabsWereRestored = true;
160167
}
161168
};
162169

@@ -670,12 +677,18 @@ class WindowManager {
670677
MenuState.updateActionState(Const.ACTIONTABSTATE);
671678

672679
this.mainWindow.addBrowserView(tab.view);
673-
this.mainWindow.setTopBrowserView(this.mainTab);
680+
if (this.lastFocusedTab && this.tabsWereRestored && this.lastFocusedTab.id !== tab.view.webContents.id) {
681+
this.focusTab(tab.view.webContents.id);
682+
} else {
683+
this.focusMainTab();
684+
}
674685
this.mainWindow.webContents.send("didTabAdd", {
675686
id: tab.view.webContents.id,
676687
url,
677688
showBackBtn: true,
678689
title,
690+
focused:
691+
this.lastFocusedTab && this.tabsWereRestored ? this.lastFocusedTab.id === tab.view.webContents.id : false,
679692
});
680693

681694
tab.view.webContents.session.setPermissionRequestHandler((webContents, permission, cb) => {

src/renderer/colors.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
root {
2+
--white_1: #fff;
3+
4+
--black_1: #050505;
5+
--black_2: #333333;
6+
--black_3: #222222;
7+
8+
--llgray_1: #F2F2F2;
9+
--lgray_1: #D1D1D1;
10+
--lgray_2: #828282;
11+
--gray_1: #2c2c2c;
12+
--gray_2: #444444;
13+
14+
--blue_1: #30C2FF;
15+
--blue_2: #d8f3ffff;
16+
17+
--red_1: #e81123;
18+
19+
--second_text_color: #B3B3B3;
20+
}

src/renderer/colors.scss

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

src/renderer/components/Header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from "react";
22

33
import { Text, Button, Icon } from "Elements";
44

5-
import "./style.scss";
5+
import "./style.css";
66

77
interface HeaderProps {
88
text: string;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.header {
2+
display: grid;
3+
grid-template-columns: 1fr 50px 20px;
4+
justify-content: space-between;
5+
background-color: var(--bg-header);
6+
padding: 10px 14px 10px 30px;
7+
align-items: center;
8+
height: 30px;
9+
}
10+
.header__text {
11+
padding: 0;
12+
margin: 0;
13+
color: var(--fg-header);
14+
fill: var(--fg-header);
15+
}
16+
.header__additional {
17+
display: flex;
18+
}
19+
.header__close {
20+
color: var(--fg-header-control);
21+
fill: var(--fg-header-control);
22+
}

0 commit comments

Comments
 (0)