Merge branch 'next/major' of github.com:Start9Labs/start-os into feature/start-tunnel

This commit is contained in:
Aiden McClelland
2025-10-31 15:42:05 -06:00
7 changed files with 26 additions and 4 deletions

View File

@@ -283,6 +283,8 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
warning: null, warning: null,
minLength: null, minLength: null,
maxLength: null, maxLength: null,
minRows: 3
maxRows: 6
immutable: false, immutable: false,
}), }),
* ``` * ```
@@ -296,6 +298,10 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
required: Required required: Required
minLength?: number | null minLength?: number | null
maxLength?: number | null maxLength?: number | null
/** Defaults to 3 */
minRows?: number
/** Maximum number of rows before scroll appears. Defaults to 6 */
maxRows?: number
placeholder?: string | null placeholder?: string | null
/** /**
* @description Once set, the value can never be changed. * @description Once set, the value can never be changed.
@@ -310,6 +316,8 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
warning: null, warning: null,
minLength: null, minLength: null,
maxLength: null, maxLength: null,
minRows: 3,
maxRows: 6,
placeholder: null, placeholder: null,
type: "textarea" as const, type: "textarea" as const,
disabled: false, disabled: false,
@@ -328,6 +336,8 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
required: Required required: Required
minLength?: number | null minLength?: number | null
maxLength?: number | null maxLength?: number | null
minRows?: number
maxRows?: number
placeholder?: string | null placeholder?: string | null
disabled?: false | string disabled?: false | string
}>, }>,
@@ -341,6 +351,8 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
warning: null, warning: null,
minLength: null, minLength: null,
maxLength: null, maxLength: null,
minRows: 3,
maxRows: 6,
placeholder: null, placeholder: null,
type: "textarea" as const, type: "textarea" as const,
disabled: false, disabled: false,

View File

@@ -61,6 +61,8 @@ export type ValueSpecTextarea = {
placeholder: string | null placeholder: string | null
minLength: number | null minLength: number | null
maxLength: number | null maxLength: number | null
minRows: number
maxRows: number
required: boolean required: boolean
disabled: false | string disabled: false | string
immutable: boolean immutable: boolean

View File

@@ -140,6 +140,8 @@ describe("values", () => {
warning: null, warning: null,
minLength: null, minLength: null,
maxLength: null, maxLength: null,
minRows: 3,
maxRows: 6,
placeholder: null, placeholder: null,
}).build({} as any) }).build({} as any)
const validator = value.validator const validator = value.validator
@@ -452,6 +454,8 @@ describe("values", () => {
warning: null, warning: null,
minLength: null, minLength: null,
maxLength: null, maxLength: null,
minRows: 3,
maxRows: 6,
placeholder: null, placeholder: null,
})).build({} as any) })).build({} as any)
const validator = value.validator const validator = value.validator

View File

@@ -81,8 +81,10 @@ const {InputSpec, List, Value, Variants} = sdk
required: !(value.nullable || false), required: !(value.nullable || false),
default: value.default, default: value.default,
placeholder: value.placeholder || null, placeholder: value.placeholder || null,
maxLength: null,
minLength: null, minLength: null,
maxLength: null,
minRows: 3,
maxRows: 6,
}, },
null, null,
2, 2,

View File

@@ -22,8 +22,8 @@ import { HintPipe } from '../pipes/hint.pipe'
<textarea <textarea
placeholder="Placeholder" placeholder="Placeholder"
tuiTextarea tuiTextarea
[max]="6" [min]="spec.minRows"
[min]="3" [max]="spec.maxRows"
[attr.maxLength]="spec.maxLength" [attr.maxLength]="spec.maxLength"
[disabled]="!!spec.disabled" [disabled]="!!spec.disabled"
[readOnly]="readOnly" [readOnly]="readOnly"

View File

@@ -90,7 +90,7 @@ export class CpuComponent {
readonly transform = computed( readonly transform = computed(
(value = this.value()?.percentageUsed?.value || '0') => (value = this.value()?.percentageUsed?.value || '0') =>
`rotate(${60 + (300 * Number.parseFloat(value)) / 100}deg)`, `rotate(${60 + (240 * Number.parseFloat(value)) / 100}deg)`,
) )
readonly labels = LABELS readonly labels = LABELS

View File

@@ -96,6 +96,8 @@ export default class GatewaysComponent {
name: this.i18n.transform('File Contents'), name: this.i18n.transform('File Contents'),
default: null, default: null,
required: true, required: true,
minRows: 16,
maxRows: 16,
}), }),
}), }),
}, },