Descriptions and icons

This commit is contained in:
Daniel Dunn
2025-04-03 06:11:21 -06:00
parent 7386e670ba
commit 33a6efd0c4
4 changed files with 6 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ import type { GenericCalcType } from './types';
const ohmsLawCalc: GenericCalcType = { const ohmsLawCalc: GenericCalcType = {
title: "Ohm's Law", title: "Ohm's Law",
name: 'ohms-law', name: 'ohms-law',
description: 'Calculates voltage, current and resistance',
formula: 'V = I * R', formula: 'V = I * R',
selections: [], selections: [],
variables: [ variables: [

View File

@@ -2,6 +2,7 @@ export interface GenericCalcType {
title: string; title: string;
name: string; name: string;
formula: string; formula: string;
description?: string;
extraOutputs?: { extraOutputs?: {
title: string; title: string;

View File

@@ -3,6 +3,8 @@ const voltagedropinwire: GenericCalcType = {
title: 'Round trip voltage drop in cable', title: 'Round trip voltage drop in cable',
name: 'cable-voltage-drop', name: 'cable-voltage-drop',
formula: 'x = (((p * L) / (A/10**6) ) *2) * I', formula: 'x = (((p * L) / (A/10**6) ) *2) * I',
description:
'Calculates round trip voltage and power loss in a 2 conductor cable',
selections: [ selections: [
{ {
title: 'Material', title: 'Material',

View File

@@ -19,8 +19,8 @@ allGenericCalcs.forEach((x) => {
defineTool('number', { defineTool('number', {
name: x.title, name: x.title,
path: 'generic-calc/' + x.name, path: 'generic-calc/' + x.name,
icon: '', icon: 'lsicon:number-filled',
description: '', description: x.description || '',
shortDescription: '', shortDescription: '',
keywords: ['generic', 'calc'], keywords: ['generic', 'calc'],
longDescription: '', longDescription: '',