Seperate electron and web target building

This commit is contained in:
Farkas József
2017-01-20 02:03:27 +01:00
committed by József Farkas
parent 517aed1b1c
commit 983eb72892
276 changed files with 2154 additions and 95 deletions

View File

@@ -0,0 +1,85 @@
import { Action } from '@ngrx/store';
import { KeyAction } from '../../config-serializer/config-items/key-action';
import { Keymap } from '../../config-serializer/config-items/Keymap';
import { Macro } from '../../config-serializer/config-items/Macro';
export namespace KeymapActions {
export const PREFIX = '[Keymap] ';
export const ADD = KeymapActions.PREFIX + 'Add keymap';
export const DUPLICATE = KeymapActions.PREFIX + 'Duplicate keymap';
export const EDIT_ABBR = KeymapActions.PREFIX + 'Edit keymap abbreviation';
export const EDIT_NAME = KeymapActions.PREFIX + 'Edit keymap title';
export const SAVE_KEY = KeymapActions.PREFIX + 'Save key action';
export const SET_DEFAULT = KeymapActions.PREFIX + 'Set default option';
export const REMOVE = KeymapActions.PREFIX + 'Remove keymap';
export const CHECK_MACRO = KeymapActions.PREFIX + 'Check deleted macro';
export function addKeymap(item: Keymap): Action {
return {
type: KeymapActions.ADD,
payload: item
};
}
export function setDefault(abbr: string): Action {
return {
type: KeymapActions.SET_DEFAULT,
payload: abbr
};
}
export function removeKeymap(abbr: string): Action {
return {
type: KeymapActions.REMOVE,
payload: abbr
};
}
export function duplicateKeymap(keymap: Keymap): Action {
return {
type: KeymapActions.DUPLICATE,
payload: keymap
};
}
export function editKeymapName(abbr: string, name: string): Action {
return {
type: KeymapActions.EDIT_NAME,
payload: {
abbr: abbr,
name: name
}
};
}
export function editKeymapAbbr(abbr: string, newAbbr: string): Action {
return {
type: KeymapActions.EDIT_ABBR,
payload: {
abbr: abbr,
newAbbr: newAbbr
}
};
}
export function saveKey(keymap: Keymap, layer: number, module: number, key: number, keyAction: KeyAction): Action {
return {
type: KeymapActions.SAVE_KEY,
payload: {
keymap,
layer,
module,
key,
keyAction
}
};
}
export function checkMacro(macro: Macro): Action {
return {
type: KeymapActions.CHECK_MACRO,
payload: macro
};
}
}