Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.scalajs.linker.interface.ModuleSplitStyle

import scala.sys.process.*

lazy val projectVersion = "2.1.9"
lazy val projectVersion = "2.1.11"
lazy val organizationName = "ru.trett"
lazy val scala3Version = "3.7.2"
lazy val circeVersion = "0.14.14"
Expand Down
1 change: 1 addition & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/src/main/scala/client/Home.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object Home:
feedVar.updater[FeedItemList]((xs1, xs2) => (xs1 ++: xs2).distinctBy(_.link))

def render: Element = div(
cls := "cards",
cls := "cards main-content",
div(
onMountBind(ctx =>
refreshFeedsBus --> { page =>
Expand Down
19 changes: 11 additions & 8 deletions client/src/main/scala/client/Router.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ object Router:
def settings: Element = SettingsPage.render
def summary: Element = SummaryPage.render

private val root = div(child <-- currentPageVar.signal.map {
case LoginRoute => login
case HomeRoute => div(navbar, notifications, home)
case SettingsRoute => div(navbar, notifications, settings)
case SummaryRoute => div(navbar, notifications, summary)
case ErrorRoute => div(Text("An error occured"))
case NotFoundRoute => div(Text("Not Found"))
})
private val root = div(
child <-- currentPageVar.signal.map {
case LoginRoute => login
case HomeRoute => div(navbar, notifications, home)
case SettingsRoute => div(navbar, notifications, settings)
case SummaryRoute => div(navbar, notifications, summary)
case ErrorRoute => div(Text("An error occured"))
case NotFoundRoute => div(Text("Not Found"))
},
className := "app-container"
)

def appElement(): Element = div(root)
19 changes: 11 additions & 8 deletions client/src/main/scala/client/SummaryPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ object SummaryPage {
FetchStream.get(req)
}
val isLoading = response.map(_.isPending)
Panel(
_.headerText := "Summary",
BusyIndicator(
_.active <-- isLoading,
UList(
child <-- response
.splitStatus((resolved, _) => resolved.output, (pending, _) => "")
.map(unsafeParseToHtmlFragment(_))
div(
cls := "main-content",
Panel(
_.headerText := "Summary",
BusyIndicator(
_.active <-- isLoading,
UList(
child <-- response
.splitStatus((resolved, _) => resolved.output, (pending, _) => "")
.map(unsafeParseToHtmlFragment(_))
)
)
)
)
Expand Down
11 changes: 11 additions & 0 deletions client/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@
.signup-button {
background-color: #6c757d !important; /* A dark grey color */
}

@media (min-width: 768px) {
.app-container {
background-color: #e1e1e1;
min-height: 100vh;
}
.main-content {
margin: 0 auto;
max-width: 50%;
}
}
4 changes: 2 additions & 2 deletions scripts/local-docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- host.docker.internal:host-gateway

server:
image: server:2.1.9
image: server:2.1.11
container_name: rss_server
restart: always
depends_on:
Expand All @@ -42,7 +42,7 @@ services:
GOOGLE_API_KEY: ${GOOGLE_API_KEY}

client:
image: client:2.1.9
image: client:2.1.11
container_name: rss_client
restart: always
depends_on:
Expand Down