Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChugunovRoman committed Mar 19, 2022
2 parents 3a8b4a6 + 2a4bfc0 commit c253c68
Show file tree
Hide file tree
Showing 85 changed files with 7,106 additions and 33,749 deletions.
2 changes: 1 addition & 1 deletion config/webpack.config.renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");

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

module.exports = config => {
Expand Down
Binary file removed lib/libstdc++.so.6
Binary file not shown.
38,601 changes: 6,026 additions & 32,575 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@
"@types/node": "^12.12.13",
"@types/react": "^16.14.2",
"@types/react-dom": "^16.0.10",
"@types/react-redux": "^5.0.15",
"@types/react-router-dom": "^4.3.1",
"@types/redux": "^3.6.0",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@typescript-eslint/parser": "^4.1.1",
Expand All @@ -69,7 +67,7 @@
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^6.1.0",
"css-loader": "^4.3.0",
"electron": "^13.6.3",
"electron": "^13.6.9",
"electron-builder": "^22.10.4",
"electron-rebuild": "^2.3.4",
"electron-webpack": "^2.8.2",
Expand All @@ -81,9 +79,7 @@
"lint-staged": "^10.5.3",
"native-ext-loader": "^2.3.0",
"node-loader": "^1.0.2",
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"sass-loader": "^10.0.2",
"style-loader": "^1.2.1",
"ts-loader": "^8.0.3",
"typescript": "^3.7.5",
Expand Down
15 changes: 14 additions & 1 deletion src/main/window/WindowManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class WindowManager {
figmaUiScale: number;
panelScale: number;
closedTabsHistory: Array<string> = [];
tabsWereRestored: boolean;
themes: Themes.Theme[] = [];
currentTheme: Themes.Theme;
creatorTheme: Themes.Theme;
Expand All @@ -64,6 +65,7 @@ class WindowManager {
this.figmaUiScale = storage.get().ui.scaleFigmaUI;
this.panelScale = storage.get().ui.scalePanel;
this.figmaUserIDs = storage.get().authedUserIDs;
this.tabsWereRestored = false;

const options: E.BrowserWindowConstructorOptions = {
width: 1200,
Expand Down Expand Up @@ -151,12 +153,17 @@ class WindowManager {
tabs.forEach((tab, i) => {
setTimeout(() => {
this.addTab("loadContent.js", tab.url, tab.title);
if (i === tabs.length - 1) {
this.tabsWereRestored = true;
}
}, 500 * i);
});

storage.clearLastOpenedTabs();

MenuState.updateInFileBrowserActionState();
} else {
this.tabsWereRestored = true;
}
};

Expand Down Expand Up @@ -670,12 +677,18 @@ class WindowManager {
MenuState.updateActionState(Const.ACTIONTABSTATE);

this.mainWindow.addBrowserView(tab.view);
this.mainWindow.setTopBrowserView(this.mainTab);
if (this.lastFocusedTab && this.tabsWereRestored && this.lastFocusedTab.id !== tab.view.webContents.id) {
this.focusTab(tab.view.webContents.id);
} else {
this.focusMainTab();
}
this.mainWindow.webContents.send("didTabAdd", {
id: tab.view.webContents.id,
url,
showBackBtn: true,
title,
focused:
this.lastFocusedTab && this.tabsWereRestored ? this.lastFocusedTab.id === tab.view.webContents.id : false,
});

tab.view.webContents.session.setPermissionRequestHandler((webContents, permission, cb) => {
Expand Down
File renamed without changes.
20 changes: 20 additions & 0 deletions src/renderer/colors.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root {
--white_1: #fff;

--black_1: #050505;
--black_2: #333333;
--black_3: #222222;

--llgray_1: #F2F2F2;
--lgray_1: #D1D1D1;
--lgray_2: #828282;
--gray_1: #2c2c2c;
--gray_2: #444444;

--blue_1: #30C2FF;
--blue_2: #d8f3ffff;

--red_1: #e81123;

--second_text_color: #B3B3B3;
}
21 changes: 0 additions & 21 deletions src/renderer/colors.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/renderer/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";

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

import "./style.scss";
import "./style.css";

interface HeaderProps {
text: string;
Expand Down
22 changes: 22 additions & 0 deletions src/renderer/components/Header/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.header {
display: grid;
grid-template-columns: 1fr 50px 20px;
justify-content: space-between;
background-color: var(--bg-header);
padding: 10px 14px 10px 30px;
align-items: center;
height: 30px;
}
.header__text {
padding: 0;
margin: 0;
color: var(--fg-header);
fill: var(--fg-header);
}
.header__additional {
display: flex;
}
.header__close {
color: var(--fg-header-control);
fill: var(--fg-header-control);
}
23 changes: 0 additions & 23 deletions src/renderer/components/Header/style.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/renderer/components/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as E from "electron";
import * as React from "react";
import { observer, inject } from "mobx-react";

import "./style.scss";
import "./style.css";
import { Text, Button, Icon } from "Elements";
import Header from "../Header";
import General from "./views/General";
Expand Down
54 changes: 54 additions & 0 deletions src/renderer/components/Settings/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.settings {
padding: 5% 0px;
width: 70%;
margin: auto;
height: -webkit-fill-available;
}
.settings__header {
border-top: 1px solid var(--borders);
border-left: 1px solid var(--borders);
border-right: 1px solid var(--borders);
}

.settings__panel {
display: flex;
justify-content: left;
align-items: center;
background: var(--bg-toolbar);
color: var(--bg-panel);
padding: 14px 10px 14px 30px;
border-left: 1px solid var(--borders);
border-right: 1px solid var(--borders);
}

.settings__body {
overflow: scroll;
overflow-x: hidden;
overflow-y: overlay;
background: var(--bg-panel);
padding: 20px 30px;
height: 80%;
border-bottom: 1px solid var(--borders);
border-left: 1px solid var(--borders);
border-right: 1px solid var(--borders);

}
.settings__body::-webkit-scrollbar {
width: 0px;
background: transparent;
}
.settings__body::-webkit-scrollbar-thumb {
width: 0;
background: transparent;
}

.settings__tab {
padding: 10px 0px;
margin-right: 36px;
background: var(--bg-toolbar);
border: 0;
}
.settings__tab:hover {
cursor: pointer;
background: var(--bg-toolbar);
}
56 changes: 0 additions & 56 deletions src/renderer/components/Settings/style.scss

This file was deleted.

12 changes: 12 additions & 0 deletions src/renderer/components/Settings/views/General/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.general {
padding-bottom: 20px;
}
.general .add {
align-self: center;
}
.general .add:hover {
cursor: pointer;
}
.general .button:hover {
cursor: pointer;
}
17 changes: 0 additions & 17 deletions src/renderer/components/Settings/views/General/index.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/renderer/components/Settings/views/General/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import { observer, inject } from "mobx-react";

import "./index.scss";
import "./index.css";
import { Input, List, CheckBox, Text, Button, Icon } from "Elements";
import { Settings } from "Store/Settings";
import ListItems from "./listItems";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";

import "./index.scss";
import "./index.css";
import { Icon } from "Elements";

interface GeneralBodyProps {
Expand Down

0 comments on commit c253c68

Please sign in to comment.