Skip to content

Commit

Permalink
Merge branch 'ricochet1k-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChugunovRoman committed Dec 29, 2020
2 parents 0bfba39 + 3f5a8c4 commit 63f9d86
Show file tree
Hide file tree
Showing 14 changed files with 12,504 additions and 15,601 deletions.
120 changes: 60 additions & 60 deletions @types/Common/menu.d.ts
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
declare namespace Menu {
/**
* Import Electron types
*/
type _MenuItemConstructorOptions = import('electron').MenuItemConstructorOptions;
type _MenuItem = import('electron').MenuItem;
type _BrowserWindow = import('electron').BrowserWindow;
/**
* Import Electron types
*/
type _MenuItemConstructorOptions = import("electron").MenuItemConstructorOptions;
type _MenuItem = import("electron").MenuItem;
type _BrowserWindow = import("electron").BrowserWindow;

/**
* Public types
*/
type NativeClick = (item: _MenuItem, window: _BrowserWindow, event: Event) => void;
type CutsomClick = (item: _MenuItemConstructorOptions, window: _BrowserWindow, event: Event) => void;
/**
* Public types
*/
type NativeClick = (item: _MenuItem, window: _BrowserWindow, event: Event) => void;
type CutsomClick = (item: _MenuItemConstructorOptions, window: _BrowserWindow, event: Event) => void;

type Params = ParamsId | ParamsAction | ParamsCommand;
type MenuItem = Items.MenuName & Items.PluginItem & Items.Separator & Items.Submenu & Items.Menu & Items.StringKey;
type Params = ParamsId | ParamsAction | ParamsCommand;
type MenuItem = Items.MenuName & (Items.PluginItem | Items.Separator | Items.Submenu | Items.Menu | Items.StringKey);

type MenuAction = {
type: string;
};
type MenuAction = {
type: string;
};

type PluginMenuItem = PluginMenuItemOptions & _MenuItemConstructorOptions;
type PluginMenuItem = PluginMenuItemOptions & _MenuItemConstructorOptions;

namespace Items {
interface MenuName {
type: string;
key: string;
string: string;
plugin: string;
}

interface Separator {
type: 'separator';
}
interface Submenu {
type: 'submenu'
name: string;
submenu: [MenuName & Separator & Submenu & Menu & PluginItem & StringKey];
}
interface Menu {
disabled?: boolean;
type: 'run-menu-action';
menuAction: MenuAction;
name: MenuName
}
interface PluginItem {
type: 'plugin-name';
plugin: string;
}
interface StringKey {
type: 'string-key';
string: string;
}
namespace Items {
interface MenuName {
type: string;
key: string;
string: string;
plugin: string;
}

interface PluginMenuItemOptions {
pluginMenuAction?: MenuAction;
interface Separator {
type: "separator";
}

interface ParamsId {
id: string;
click?: NativeClick | CutsomClick
interface Submenu {
type: "submenu";
name: string;
submenu: [MenuName & Separator & Submenu & Menu & PluginItem & StringKey];
}
interface Menu {
disabled?: boolean;
type: "run-menu-action";
menuAction: MenuAction;
name: MenuName;
}
interface ParamsAction {
action: string;
click?: NativeClick | CutsomClick
interface PluginItem {
type: "plugin-name";
plugin: string;
}
interface ParamsCommand {
command: string;
click?: NativeClick | CutsomClick
interface StringKey {
type: "string-key";
string: string;
}
}
}

interface PluginMenuItemOptions {
pluginMenuAction?: MenuAction;
}

interface ParamsId {
id: string;
click?: NativeClick | CutsomClick;
}
interface ParamsAction {
action: string;
click?: NativeClick | CutsomClick;
}
interface ParamsCommand {
command: string;
click?: NativeClick | CutsomClick;
}
}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You can install Figma-linux from Snap [here.](https://snapcraft.io/figma-linux)

Alternatively, type
```bash
sudo snap install figma-linux
sudo snap install figma-linux
```
in your terminal.

Expand All @@ -54,7 +54,7 @@ sudo ln -s $HOME/.local/share/fonts $HOME/snap/figma-linux/current/.local/share/
There is also an AppImage available.
Get it on our [Releases](https://github.com/Figma-Linux/figma-linux/releases) page, then make it executable and install using these terminal commands:
```bash
chmod +x figma-linux-*.AppImage
chmod +x figma-linux-*.AppImage
sudo ./figma-linux-*.AppImage -i
```
This is not a portable AppImage - it will install figma-linux on your system, after which you can run it from terminal or from your app list.
Expand Down Expand Up @@ -114,7 +114,7 @@ cd linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
3. Install prerequisites from npm:
```bash
```bash
npm i
```
To run Figma-linux from npm in dev mode execute this:
Expand All @@ -125,14 +125,14 @@ Aside from that, you can also run:

- ```npm run build``` to built the app for production
- ```npm run start``` to run the built version
- ```npm run builder``` to package the app for distribution.
- ```npm run builder``` to package the app for distribution.
- * The build targets are listed in ```./config/builder.json```. You can remove the ones you don't need or don't have dependencies for.
- ```npm run pack``` to remove old packages from the installer directory, then pack the app.
- * This depends on [AppImageTool](https://appimage.github.io/appimagetool/) being installed.


Please note - when making changes in the middleware, you need to rebuild the app for them to take effect.

ATTENTION:
When you do changes in middleware component, You need to rebuild (`npm run build`) and restart the app each time, because the middleware execute only on run the app, Hot Reload won't work.



Expand Down
22 changes: 12 additions & 10 deletions config/webpack.config.main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ const main = {
devtool: 'source-map',

plugins: [
new CopyWebpackPlugin([
{
from: path.join(rootFolder, 'src/package.json'),
to: path.join(rootFolder, 'dist/')
},
{
from: path.join(rootFolder, 'resources'),
to: path.join(rootFolder, 'dist/resources/')
}
])
new CopyWebpackPlugin({
patterns: [
{
from: path.join(rootFolder, 'src/package.json'),
to: path.join(rootFolder, 'dist/')
},
{
from: path.join(rootFolder, 'resources'),
to: path.join(rootFolder, 'dist/resources/')
}
]
})
]
};

Expand Down
Loading

0 comments on commit 63f9d86

Please sign in to comment.