forked from oliverschwendener/ueli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a453ba
commit 2d04320
Showing
29 changed files
with
522 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ShortcutsOptions } from "./shortcuts-options"; | ||
|
||
export const defaultShortcutsOptions: ShortcutsOptions = { | ||
isEnabled: true, | ||
shortcuts: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Shortcut } from "../../main/plugins/shorcuts-plugin/shortcut"; | ||
|
||
export interface ShortcutsOptions { | ||
isEnabled: boolean; | ||
shortcuts: Shortcut[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { IconType } from "./icon-type"; | ||
|
||
export class IconTypeHelpers { | ||
public static isValidIconType(iconType: IconType): boolean { | ||
return Object.values(IconType).find((i) => i === iconType) !== undefined; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum IconType { | ||
URL = "URL", | ||
SVG = "SVG", | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export enum PluginType { | ||
ApplicationSearchPlugin = "application-search-plugin", | ||
UeliCommandSearchPlugin = "ueli-command-search-plugin", | ||
ShortcutsSearchPlugin = "shortcuts-search-plugin", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Shortcut } from "./shortcut"; | ||
import { ShortcutType } from "./shortcut-type"; | ||
import { IconTypeHelpers } from "../../../common/icon/icon-type-helpers"; | ||
|
||
export class ShortcutHelpers { | ||
public static isValidShortcut(shortcut: Shortcut): boolean { | ||
return shortcut.description !== undefined | ||
&& shortcut.description.length !== 0 | ||
&& shortcut.executionArgument !== undefined | ||
&& shortcut.executionArgument.length !== 0 | ||
&& shortcut.icon !== undefined | ||
&& shortcut.icon.parameter !== undefined | ||
&& IconTypeHelpers.isValidIconType(shortcut.icon.type) | ||
&& this.isValidShortcuType(shortcut.type); | ||
} | ||
|
||
public static isValidShortcuType(shortcutType: ShortcutType): boolean { | ||
return Object.values(ShortcutType).find((s) => s === shortcutType) !== undefined; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum ShortcutType { | ||
Url = "URL", | ||
FilePath = "File path", | ||
} |
Oops, something went wrong.