diff --git a/client/src/components/Settings/OtherSettings/OtherSettings.tsx b/client/src/components/Settings/OtherSettings/OtherSettings.tsx
index ebfe642..7ab2770 100644
--- a/client/src/components/Settings/OtherSettings/OtherSettings.tsx
+++ b/client/src/components/Settings/OtherSettings/OtherSettings.tsx
@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import { createNotification, updateConfig, sortApps, sortCategories } from '../../../store/actions';
// Typescript
-import { GlobalState, NewNotification, SettingsForm } from '../../../interfaces';
+import { GlobalState, NewNotification, Query, SettingsForm } from '../../../interfaces';
// UI
import InputGroup from '../../UI/Forms/InputGroup/InputGroup';
@@ -16,6 +16,7 @@ import classes from './OtherSettings.module.css';
// Utils
import { searchConfig } from '../../../utility';
+import { queries } from '../../../utility/searchQueries.json';
interface ComponentProps {
createNotification: (notification: NewNotification) => void;
@@ -180,6 +181,7 @@ const OtherSettings = (props: ComponentProps): JSX.Element => {
+
{/* MODULES OPTIONS */}
Modules
@@ -202,14 +204,7 @@ const OtherSettings = (props: ComponentProps): JSX.Element => {
value={formData.defaultSearchProvider}
onChange={(e) => inputChangeHandler(e)}
>
-
-
-
-
-
-
-
-
+ {queries.map((query: Query) => ())}
@@ -266,4 +261,4 @@ const actions = {
sortCategories
}
-export default connect(mapStateToProps, actions)(OtherSettings);
+export default connect(mapStateToProps, actions)(OtherSettings);
\ No newline at end of file
diff --git a/client/src/utility/searchParser.ts b/client/src/utility/searchParser.ts
index 21c35f6..e8bb859 100644
--- a/client/src/utility/searchParser.ts
+++ b/client/src/utility/searchParser.ts
@@ -10,7 +10,6 @@ export const searchParser = (searchQuery: string): boolean => {
const query = queries.find((q: Query) => q.prefix === prefix);
- console.log("QUERY IS " + query);
if (query) {
const sameTab = searchConfig('searchSameTab', false);
@@ -24,4 +23,4 @@ export const searchParser = (searchQuery: string): boolean => {
}
return false;
-}
+}
\ No newline at end of file
diff --git a/client/src/utility/urlParser.ts b/client/src/utility/urlParser.ts
index c74224a..87edb63 100644
--- a/client/src/utility/urlParser.ts
+++ b/client/src/utility/urlParser.ts
@@ -2,8 +2,8 @@ export const urlParser = (url: string): string[] => {
let parsedUrl: string;
let displayUrl: string;
- if (/https?:\/\//.test(url)) {
- // Url starts with http[s]:// -> leave it as it is
+ if (/(https?|steam):\/\//.test(url)) {
+ // Url starts with http[s]:// or steam:// -> leave it as it is
parsedUrl = url;
} else {
// No protocol -> apply http:// prefix
@@ -11,10 +11,14 @@ export const urlParser = (url: string): string[] => {
}
// Create simplified url to display as text
- displayUrl = url
+ if (/steam:\/\//.test(url)) {
+ displayUrl = 'Run Steam App';
+ } else {
+ displayUrl = url
.replace(/https?:\/\//, '')
.replace('www.', '')
.replace(/\/$/, '');
-
+ }
+
return [displayUrl, parsedUrl]
}
\ No newline at end of file