From 915c5d8a97fffdaf565816dbd0c5d7056789592a Mon Sep 17 00:00:00 2001 From: Matt Beaudoin Date: Sat, 16 May 2026 18:14:39 -0700 Subject: [PATCH 1/2] make recipe form styles, clean up recipe cards, remove uneeded styles --- src/routes/Recipes/RecipeForm.scss | 100 +++++++++++++++++++++++++++++ src/routes/Recipes/RecipeForm.tsx | 53 +++++++++------ src/routes/Recipes/Recipes.scss | 9 +-- src/routes/Recipes/Recipes.tsx | 23 +------ 4 files changed, 138 insertions(+), 47 deletions(-) diff --git a/src/routes/Recipes/RecipeForm.scss b/src/routes/Recipes/RecipeForm.scss index e69de29..a22ea0a 100644 --- a/src/routes/Recipes/RecipeForm.scss +++ b/src/routes/Recipes/RecipeForm.scss @@ -0,0 +1,100 @@ +@use '../../assets/scss/variables' as *; +@use '../../assets/scss/mixins' as *; +@use '../../assets/scss/global' as *; + +.recipe-form { + @include card; + max-width: 680px; + margin: 0 auto; + display: flex; + flex-direction: column; + gap: $spacing-lg; + padding: $spacing-lg; + + h2 { + margin: 0; + font-size: $font-size-xl; + color: $text-primary; + } + + .field { + display: flex; + flex-direction: column; + gap: $spacing-xs; + + &.field-inline { + flex-direction: row; + align-items: center; + gap: $spacing-md; + } + + label { + color: $text-secondary; + font-size: $font-size-sm; + display: flex; + flex-direction: column; + gap: $spacing-xs; + + input[type="text"], + input[type="email"], + input:not([type]), + select { + padding: $spacing-sm $spacing-md; + border: 2px solid $border-color; + border-radius: $radius-md; + font-size: $font-size-base; + background: $bg-primary; + color: $text-primary; + transition: border-color $transition-base, box-shadow $transition-base; + } + + input:focus, + select:focus { + outline: none; + border-color: $primary; + box-shadow: 0 0 0 4px rgba($primary, 0.06); + } + } + + .checkbox-label { + display: inline-flex; + align-items: center; + gap: $spacing-sm; + font-size: $font-size-base; + color: $text-primary; + + input[type="checkbox"] { + width: 18px; + height: 18px; + } + } + } + + .form-actions { + display: flex; + gap: $spacing-sm; + justify-content: flex-end; + + .action-btn { + @include action-btn(2px, $radius-md, $spacing-sm $spacing-lg, $font-size-sm); + } + } +} + +.form-subtitle { + margin: 0; + color: $text-secondary; + font-size: $font-size-sm; +} + +.form-error { + background: rgba($error, 0.08); + color: $error; + padding: $spacing-sm $spacing-md; + border-radius: $radius-sm; +} + +.select-input { + width: 100%; +} + diff --git a/src/routes/Recipes/RecipeForm.tsx b/src/routes/Recipes/RecipeForm.tsx index dc3c7f9..0fa8f7e 100644 --- a/src/routes/Recipes/RecipeForm.tsx +++ b/src/routes/Recipes/RecipeForm.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from "react"; import { apiService } from '../../services/api'; import type { AbraServer } from '../../types'; +import './RecipeForm.scss'; @@ -50,14 +51,19 @@ function RecipeForm({ recipe, onClose }) { }; return ( -
+

{recipe.name}

- { loading ? (

Loading servers...

+

Configure and deploy this recipe.

+ {error &&
{error}
} + + { loading ? ( +

Loading servers...

) : ( -
- +
)} -
+ +
-
-