Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 1242257

Browse files
authored
add last requests and cleanup (#56)
* add last requests and cleanup * fix editor bug * name fix * format
1 parent 27ea723 commit 1242257

File tree

12 files changed

+187
-189
lines changed

12 files changed

+187
-189
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
"chartjs-plugin-zoom": "^2.2.0",
1616
"date-picker-svelte": "^2.15.1",
1717
"idb": "^8.0.1",
18-
"svelte": "^5.18.0",
18+
"svelte": "^5.19.0",
1919
"xlsx": "^0.18.5"
2020
},
2121
"devDependencies": {
22-
"@rsbuild/core": "^1.1.13",
22+
"@rsbuild/core": "^1.1.14",
2323
"@rsbuild/plugin-svelte": "^1.0.7",
2424
"@tailwindcss/postcss": "4.0.0-beta.8",
2525
"prettier": "^3.4.2",
2626
"prettier-plugin-svelte": "^3.3.3",
27-
"prettier-plugin-tailwindcss": "^0.6.9",
27+
"prettier-plugin-tailwindcss": "^0.6.10",
2828
"svelte-check": "^4.1.4",
2929
"tailwindcss": "4.0.0-beta.8",
3030
"typescript": "^5.7.3"

pnpm-lock.yaml

Lines changed: 47 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/homepagelogo2.png

57.7 KB
Loading

src/App.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
} from "./state.svelte";
2525
2626
import HomepageLogo from "/public/homepagelogo.png";
27+
import HomepageLogo2 from "/public/homepagelogo2.png";
2728
import Favicon from "/public/favicon.png";
2829
2930
const dashboard = getDashboard();
@@ -76,7 +77,10 @@
7677

7778
{#snippet msg()}
7879
<div class="mx-auto max-w-2xl p-8">
79-
<img src={HomepageLogo} class="mx-auto w-75 rounded-lg" alt="LES Logo" />
80+
<div class="flex flex-col justify-center gap-8 lg:flex-row">
81+
<img src={HomepageLogo} class="mx-auto w-75 rounded-lg" alt="LES Logo" />
82+
<img src={HomepageLogo2} class="mx-auto w-75 rounded-lg bg-white" alt="LES Logo 2" />
83+
</div>
8084
<h1 class="pt-4 text-center text-4xl font-bold">Local Energy System Simulation</h1>
8185
<p class="py-4 text-center text-lg">
8286
Welcome to the LES Research application. You can determine the efficiency of algorithms and

src/Chain.svelte

Lines changed: 12 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,6 @@
9292
validatePositiveNumber
9393
);
9494
}
95-
const algo = chainIterations[currentChainIndex]?.algo;
96-
if (algo) {
97-
validateField(
98-
`algo-maxTemperature-${currentChainIndex}`,
99-
algo.maxTemperature,
100-
validatePositiveNumber
101-
);
102-
}
10395
const energyflow = chainIterations[currentChainIndex]?.energyflow;
10496
if (energyflow) {
10597
validateField(
@@ -428,48 +420,20 @@
428420
<fieldset class="rounded-lg border-2 border-gray-300 p-4">
429421
<legend class="mb-2 text-2xl font-bold text-gray-800">Algorithm</legend>
430422
<div class="mb-4">
431-
<label
432-
for="maxTemp-{currentChainIndex}"
433-
class="mb-1 block text-lg text-gray-700">
434-
Max Temperature
435-
</label>
436-
<input
437-
id="maxTemp-{currentChainIndex}"
438-
type="number"
439-
required
440-
step="any"
441-
min="0"
442-
class="text-les-highlight w-full rounded-lg border-2 border-gray-400 p-2"
443-
bind:value={chainIterations[currentChainIndex].algo.maxTemperature}
444-
oninput={(e) => {
445-
const value = +e.currentTarget.value;
446-
chainIterations[currentChainIndex].algo.maxTemperature = value;
447-
validateField(
448-
`algo-maxTemperature-${currentChainIndex}`,
449-
value,
450-
validatePositiveNumber
451-
);
452-
}} />
453-
454-
{#if errors[`algo-maxTemperature-${currentChainIndex}`]}
455-
<p class="text-sm text-red-500">
456-
{errors[`algo-maxTemperature-${currentChainIndex}`]}
457-
</p>
423+
{#if chainIterations[currentChainIndex].algo.name !== "Greedy Planning" && chainIterations[currentChainIndex].algo.name !== "Simulated Annealing"}
424+
<div>
425+
<label
426+
for="algoSource-{currentChainIndex}"
427+
class="mb-1 block text-lg text-gray-700">
428+
Algorithm
429+
</label>
430+
<div
431+
id="algorithm"
432+
class="text-les-highlight h-40 w-full rounded-lg border-2 border-gray-400 p-2">
433+
</div>
434+
</div>
458435
{/if}
459436
</div>
460-
{#if chainIterations[currentChainIndex].algo.name !== "Greedy Planning" && chainIterations[currentChainIndex].algo.algorithm !== "Simulated Annealing"}
461-
<div>
462-
<label
463-
for="algoSource-{currentChainIndex}"
464-
class="mb-1 block text-lg text-gray-700">
465-
Algorithm
466-
</label>
467-
<div
468-
id="algorithm"
469-
class="text-les-highlight h-40 w-full rounded-lg border-2 border-gray-400 p-2">
470-
</div>
471-
</div>
472-
{/if}
473437
</fieldset>
474438

475439
{#if chainIterations[currentChainIndex].energyflow}

0 commit comments

Comments
 (0)