mirror of
https://github.com/gotson/komga.git
synced 2025-12-24 01:14:03 +01:00
handle parallel webui
This commit is contained in:
parent
573eb58d72
commit
38d21643c4
4 changed files with 20 additions and 1 deletions
|
|
@ -219,9 +219,18 @@ tasks {
|
|||
}
|
||||
}
|
||||
|
||||
register<Copy>("copyWebDistNext") {
|
||||
group = "web"
|
||||
from("$nextui/dist/")
|
||||
into("$projectDir/src/main/resources/public/")
|
||||
excludes.add("index.html") //will be copied by 'prepareThymeLeafNext'
|
||||
mustRunAfter(getByName("copyWebDist"))
|
||||
}
|
||||
|
||||
// modifies index.html to inject ThymeLeaf th: tags
|
||||
register<Copy>("prepareThymeLeafNext") {
|
||||
group = "web"
|
||||
dependsOn("copyWebDistNext")
|
||||
from("$nextui/dist/index.html")
|
||||
into("$projectDir/src/main/resources/public/")
|
||||
filter { line ->
|
||||
|
|
@ -229,13 +238,14 @@ tasks {
|
|||
it.groups[0]?.value + " th:" + it.groups[1]?.value + "@{" + it.groups[2]?.value?.prefixIfNot("/") + "}" + it.groups[3]?.value
|
||||
}
|
||||
}
|
||||
rename("index.html", "index-next.html")
|
||||
}
|
||||
|
||||
withType<ProcessResources> {
|
||||
filesMatching("application*.yml") {
|
||||
expand(project.properties)
|
||||
}
|
||||
mustRunAfter(getByName("prepareThymeLeaf"))
|
||||
mustRunAfter(getByName("prepareThymeLeaf"), getByName("prepareThymeLeafNext"))
|
||||
}
|
||||
|
||||
register<Test>("benchmark") {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class WebMvcConfiguration : WebMvcConfigurer {
|
|||
registry
|
||||
.addResourceHandler(
|
||||
"/index.html",
|
||||
"/index-next.html",
|
||||
"/favicon.ico",
|
||||
"/favicon-16x16.png",
|
||||
"/favicon-32x32.png",
|
||||
|
|
|
|||
|
|
@ -16,4 +16,10 @@ class IndexController(
|
|||
model.addAttribute("baseUrl", baseUrl)
|
||||
return "index"
|
||||
}
|
||||
|
||||
@GetMapping("/next")
|
||||
fun indexNext(model: Model): String {
|
||||
model.addAttribute("baseUrl", baseUrl)
|
||||
return "index-next"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
import { useCurrentUser } from '@/colada/users'
|
||||
import { useClaimStatus } from '@/colada/claim'
|
||||
|
||||
definePage({ alias: '/next' })
|
||||
|
||||
async function checkAuthenticated() {
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
|
|
|||
Loading…
Reference in a new issue