diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-08-12 14:50:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-12 20:20:41 +0530 |
commit | 10e706230f11606a83a86837c820a6c338d29a4f (patch) | |
tree | 9862aaae7d6a3a0be97bfda68739d3036f0f7848 /src/models | |
parent | Update recipes for bringing in darkmode support for: (diff) | |
download | ferdium-app-10e706230f11606a83a86837c820a6c338d29a4f.tar.gz ferdium-app-10e706230f11606a83a86837c820a6c338d29a4f.tar.zst ferdium-app-10e706230f11606a83a86837c820a6c338d29a4f.zip |
Services now support aliases!!!! (#1774)
Users can now search for the services not only based on the name, but also the alias (partial match,
case-insensitive), when adding new services.
fixes #1614, #1615, #1291
Diffstat (limited to 'src/models')
-rw-r--r-- | src/models/Recipe.js | 3 | ||||
-rw-r--r-- | src/models/RecipePreview.js | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/models/Recipe.js b/src/models/Recipe.js index e616055d6..0d97d4472 100644 --- a/src/models/Recipe.js +++ b/src/models/Recipe.js | |||
@@ -12,6 +12,8 @@ export default class Recipe { | |||
12 | 12 | ||
13 | version = ''; | 13 | version = ''; |
14 | 14 | ||
15 | aliases = []; | ||
16 | |||
15 | path = ''; | 17 | path = ''; |
16 | 18 | ||
17 | serviceURL = ''; | 19 | serviceURL = ''; |
@@ -61,6 +63,7 @@ export default class Recipe { | |||
61 | this.id = data.id || this.id; | 63 | this.id = data.id || this.id; |
62 | this.name = data.name || this.name; | 64 | this.name = data.name || this.name; |
63 | this.version = data.version || this.version; | 65 | this.version = data.version || this.version; |
66 | this.aliases = data.aliases || this.aliases; | ||
64 | this.path = data.path; | 67 | this.path = data.path; |
65 | 68 | ||
66 | this.serviceURL = data.config.serviceURL || this.serviceURL; | 69 | this.serviceURL = data.config.serviceURL || this.serviceURL; |
diff --git a/src/models/RecipePreview.js b/src/models/RecipePreview.js index 7a37ccb56..6a9ce3080 100644 --- a/src/models/RecipePreview.js +++ b/src/models/RecipePreview.js | |||
@@ -9,6 +9,8 @@ export default class RecipePreview { | |||
9 | 9 | ||
10 | featured = false; | 10 | featured = false; |
11 | 11 | ||
12 | aliases = []; | ||
13 | |||
12 | constructor(data) { | 14 | constructor(data) { |
13 | if (!data.id) { | 15 | if (!data.id) { |
14 | throw Error('RecipePreview requires Id'); | 16 | throw Error('RecipePreview requires Id'); |