diff --git a/Sources/ViewController/Views/Home.swift b/Sources/ViewController/Views/Home.swift
index 7442eb9..7acd898 100644
--- a/Sources/ViewController/Views/Home.swift
+++ b/Sources/ViewController/Views/Home.swift
@@ -4,6 +4,16 @@ import ElementaryHTMX
struct HomeView: HTML, Sendable {
var body: some HTML {
+ div(.class("flex justify-end me-4")) {
+ button(
+ .class("btn btn-ghost btn-secondary text-lg"),
+ .hx.get(route: .login(.index())),
+ .hx.target("body"),
+ .hx.swap(.outerHTML)
+ ) {
+ "Login"
+ }
+ }
div(.class("hero min-h-screen")) {
div(
.class(
diff --git a/TODO.md b/TODO.md
index 319e29a..8c53de0 100644
--- a/TODO.md
+++ b/TODO.md
@@ -3,16 +3,17 @@
- [x] Fix theme not working when selected upon signup.
- [x] Pdf generation
- [x] Add postgres / mysql support
-- [ ] Opensource / license ??
+- [x] Opensource / license ??
- [ ] Figure out domain to host (currently thinking ductcalc.pro)
- [ ] Logo / navbar name may have to change if it's not duct-calc.
- [ ] MainPage meta items will have to change also
-- [ ] Add ability for either sensible or total load while specifying a room load.
+- [x] Add ability for either sensible or total load while specifying a room load.
- CoolCalc current version specifies the sensible cooling for a room break down,
and currently we require the total load and calculate sensible based on project
shr.
-- [ ] Add ability to associate room load / airflow with another room.
+- [x] Add ability to associate room load / airflow with another room.
- [ ] Trunk size form, room / register selection is wonky when labels are long.
- They will overlap each other making it difficult to read / decipher which checkbox belongs
to which label.
- [ ] Add select all rooms for trunks, useful for sizing main supply or return trunks.
+- [ ] Add way to sponsor the project.
diff --git a/Tests/ViewControllerTests/ViewControllerTests.swift b/Tests/ViewControllerTests/ViewControllerTests.swift
index 2eab389..c9afb05 100644
--- a/Tests/ViewControllerTests/ViewControllerTests.swift
+++ b/Tests/ViewControllerTests/ViewControllerTests.swift
@@ -14,6 +14,19 @@ import ViewController
@Suite(.snapshots(record: .failed))
struct ViewControllerTests {
+ @Test
+ func home() async throws {
+ try await withDependencies {
+ $0.viewController = .liveValue
+ $0.auth = .failing
+ } operation: {
+ @Dependency(\.viewController) var viewController
+
+ let home = try await viewController.view(.test(.home))
+ assertSnapshot(of: home, as: .html)
+ }
+ }
+
@Test
func login() async throws {
try await withDependencies {
diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/home.1.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/home.1.html
new file mode 100644
index 0000000..28155e6
--- /dev/null
+++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/home.1.html
@@ -0,0 +1,73 @@
+
+
+