diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index 3d0e38f78..000000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,64 +0,0 @@
-module.exports = {
- "env": {
- "browser": true,
- "es2021": true
- },
- "extends": [
- "eslint:recommended",
- "plugin:@typescript-eslint/strict-type-checked",
- "plugin:@typescript-eslint/stylistic-type-checked"
- ],
- "overrides": [
- {
- "env": {
- "node": true
- },
- "files": [
- ".eslintrc.{js,cjs}"
- ],
- "parserOptions": {
- "sourceType": "script"
- }
- }
- ],
- "parser": "@typescript-eslint/parser",
- "parserOptions": {
- "ecmaVersion": "latest",
- "sourceType": "module",
- "project": [
- "./client-tauri/tsconfig.json",
- "./server-node/tsconfig.json",
- "./shared-operations/tsconfig.json"
- ]
- },
- "plugins": [
- "@typescript-eslint"
- ],
- "ignorePatterns": [
- "node_modules/",
- "**/*.js",
- "**/*.jsx"
- ],
- "rules": {
- "indent": [
- "error",
- 4
- ],
- "linebreak-style": [
- "error",
- "unix"
- ],
- "quotes": [
- "error",
- "double"
- ],
- "semi": [
- "error",
- "always",
- {
- "omitLastInOneLineBlock": true,
- "omitLastInOneLineClassBody": true
- }
- ]
- }
-};
diff --git a/client-tauri/src/components/fields/GenericField.tsx b/client-tauri/src/components/fields/GenericField.tsx
index 24c861c0d..58f815002 100644
--- a/client-tauri/src/components/fields/GenericField.tsx
+++ b/client-tauri/src/components/fields/GenericField.tsx
@@ -2,18 +2,25 @@ import Joi from "@stirling-tools/joi";
import { Fragment } from "react";
interface GenericFieldProps {
- fieldName: string
- joiDefinition: Joi.Description;
+ fieldName: string,
+ joiDefinition: Joi.Description
+}
+
+interface Flags {
+ label: string,
+ description: string,
}
export function GenericField({ fieldName, joiDefinition }: GenericFieldProps) {
+ const flags = joiDefinition.flags as Flags;
+
switch (joiDefinition.type) {
case "number":
var validValues = joiDefinition.allow;
- if(validValues) { // Restrained text input
+ if(validValues) { // Restrained number input
return (
-
+
);
}
- else {
- // TODO: Implement unrestrained text input
- return (
{JSON.stringify(joiDefinition, null, 2)}
)
+ else { // Unrestrained number input
+ // TODO: Check if integer or not.
+ return (
+
+
+
+
+
+ );
}
break;
case "string":
- var validValues = joiDefinition.allow;
- if(validValues) { // Restrained text input
+ if(joiDefinition.allow) { // Restrained text input
return (
-
+