Skip to content

Commit

Permalink
Add favicon to web ui
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed May 28, 2023
1 parent 55c6c26 commit a257c3d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ compose.desktop {
packageVersion = project.version.toString()

windows {
iconFile.set(file("logo.ico"))
iconFile.set(rootProject.file("icons/logo.ico"))
menuGroup = "Tonbrett"
upgradeUuid = "c8bce0ed-113c-4d78-879b-78ed5c7d9f7f"
}

macOS {
iconFile.set(file("logo.icns"))
iconFile.set(rootProject.file("icons/logo.icns"))
bundleID = "dev.schlaubi.tonbrett.app.mac"
entitlementsFile.set(file("entitlements.entitlements"))
appStore = false
Expand Down
16 changes: 15 additions & 1 deletion app/web/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ kotlin {
binaries.executable()
compilations.all {
compilerOptions.options.freeCompilerArgs.addAll(
"-Xir-per-module", "-Xir-property-lazy-initialization")
"-Xir-per-module", "-Xir-property-lazy-initialization"
)
}
}

Expand All @@ -38,6 +39,19 @@ kotlin {
}
}

tasks {
val copyIcon by creating(Copy::class) {
dependsOn("jsBrowserProductionExecutableDistributeResources")
from(rootProject.file("icons/logo.ico"))
into(buildDir.resolve("distribuions"))
rename { "favicon.ico" }
}

named("jsMainClasses") {
dependsOn(copyIcon)
}
}

compose.experimental {
web.application {}
}
Expand Down
1 change: 1 addition & 0 deletions app/web/src/jsMain/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/png" href="/soundboard/ui/favicon.ico"/>
<title>Tonbrett</title>
<script src="/soundboard/ui/skiko.js"> </script>
</head>
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit a257c3d

Please sign in to comment.