mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-04 18:39:33 +00:00
Re-add ui-version to keep browser resource cache in service-worker
This commit is contained in:
parent
a4a84abae5
commit
1a188afbd7
@ -18,11 +18,12 @@ case class Flags(
|
||||
fullTextSearchEnabled: Boolean,
|
||||
maxPageSize: Int,
|
||||
maxNoteLength: Int,
|
||||
showClassificationSettings: Boolean
|
||||
showClassificationSettings: Boolean,
|
||||
uiVersion: Int
|
||||
)
|
||||
|
||||
object Flags {
|
||||
def apply(cfg: Config): Flags =
|
||||
def apply(cfg: Config, uiVersion: Int): Flags =
|
||||
Flags(
|
||||
cfg.appName,
|
||||
getBaseUrl(cfg),
|
||||
@ -32,7 +33,8 @@ object Flags {
|
||||
cfg.fullTextSearch.enabled,
|
||||
cfg.maxItemPageSize,
|
||||
cfg.maxNoteLength,
|
||||
cfg.showClassificationSettings
|
||||
cfg.showClassificationSettings,
|
||||
uiVersion
|
||||
)
|
||||
|
||||
private def getBaseUrl(cfg: Config): String =
|
||||
|
@ -133,10 +133,11 @@ object TemplateRoutes {
|
||||
)
|
||||
|
||||
object IndexData {
|
||||
private[this] val uiVersion = 2
|
||||
|
||||
def apply(cfg: Config): IndexData =
|
||||
IndexData(
|
||||
Flags(cfg),
|
||||
Flags(cfg, uiVersion),
|
||||
chooseUi,
|
||||
Seq(
|
||||
"/app/assets" + Webjars.clipboardjs + "/clipboard.min.js",
|
||||
@ -145,7 +146,7 @@ object TemplateRoutes {
|
||||
),
|
||||
s"/app/assets/docspell-webapp/${BuildInfo.version}/favicon",
|
||||
s"/app/assets/docspell-webapp/${BuildInfo.version}/docspell.js",
|
||||
Flags(cfg).asJson.spaces2
|
||||
Flags(cfg, uiVersion).asJson.spaces2
|
||||
)
|
||||
|
||||
private def chooseUi: Seq[String] =
|
||||
|
Loading…
x
Reference in New Issue
Block a user