From 341eda7855dd71460755526405351f729ca87ae3 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Fri, 20 Oct 2023 19:29:21 -0600 Subject: [PATCH 01/20] egg(rust): change ordering of mod frameworks --- database/Seeders/eggs/rust/egg-rust.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/Seeders/eggs/rust/egg-rust.json b/database/Seeders/eggs/rust/egg-rust.json index 74cc27c32..35f543c75 100644 --- a/database/Seeders/eggs/rust/egg-rust.json +++ b/database/Seeders/eggs/rust/egg-rust.json @@ -47,7 +47,7 @@ "default_value": "vanilla", "user_viewable": true, "user_editable": true, - "rules": "required|in:carbon,oxide,vanilla", + "rules": "required|in:vanilla,oxide,carbon", "field_type": "text" }, { From 8abf2d810666c360320cc25808167d08963bb9be Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Fri, 20 Oct 2023 19:30:25 -0600 Subject: [PATCH 02/20] ui(server): fix defaultValue not being used with VariableBox select --- resources/scripts/api/server/types.d.ts | 2 +- .../components/server/startup/VariableBox.tsx | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/resources/scripts/api/server/types.d.ts b/resources/scripts/api/server/types.d.ts index 0816d7e81..c4a01e921 100644 --- a/resources/scripts/api/server/types.d.ts +++ b/resources/scripts/api/server/types.d.ts @@ -23,7 +23,7 @@ export interface ServerEggVariable { description: string; envVariable: string; defaultValue: string; - serverValue: string; + serverValue: string | null; isEditable: boolean; rules: string[]; } diff --git a/resources/scripts/components/server/startup/VariableBox.tsx b/resources/scripts/components/server/startup/VariableBox.tsx index ad73615c6..ba3a4fe47 100644 --- a/resources/scripts/components/server/startup/VariableBox.tsx +++ b/resources/scripts/components/server/startup/VariableBox.tsx @@ -5,7 +5,6 @@ import { usePermissions } from '@/plugins/usePermissions'; import InputSpinner from '@/components/elements/InputSpinner'; import Input from '@/components/elements/Input'; import Switch from '@/components/elements/Switch'; -import tw from 'twin.macro'; import { debounce } from 'debounce'; import updateStartupVariable from '@/api/server/updateStartupVariable'; import useFlash from '@/plugins/useFlash'; @@ -61,15 +60,15 @@ const VariableBox = ({ variable }: Props) => { return ( +

{!variable.isEditable && ( - Read Only + Read Only )} {variable.name}

} > - + {useSwitch ? ( <> @@ -97,7 +96,7 @@ const VariableBox = ({ variable }: Props) => { \ -

' + item.description + '
\ - Access in Startup: {{' + item.env_variable + '}}
\ - Validation Rules: ' + item.rules + '

\ + \ + \ +

' + escapeHtml(item.description) + '
\ + Access in Startup: {{' + escapeHtml(item.env_variable) + '}}
\ + Validation Rules: ' + escapeHtml(item.rules) + '

\ \ '; $('#appendVariablesTo').append(dataAppend); diff --git a/resources/views/admin/nodes/view/index.blade.php b/resources/views/admin/nodes/view/index.blade.php index 2d0bb3287..defa0d366 100644 --- a/resources/views/admin/nodes/view/index.blade.php +++ b/resources/views/admin/nodes/view/index.blade.php @@ -145,14 +145,20 @@ @section('footer-scripts') @parent