mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-07 07:35:59 +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,
|
fullTextSearchEnabled: Boolean,
|
||||||
maxPageSize: Int,
|
maxPageSize: Int,
|
||||||
maxNoteLength: Int,
|
maxNoteLength: Int,
|
||||||
showClassificationSettings: Boolean
|
showClassificationSettings: Boolean,
|
||||||
|
uiVersion: Int
|
||||||
)
|
)
|
||||||
|
|
||||||
object Flags {
|
object Flags {
|
||||||
def apply(cfg: Config): Flags =
|
def apply(cfg: Config, uiVersion: Int): Flags =
|
||||||
Flags(
|
Flags(
|
||||||
cfg.appName,
|
cfg.appName,
|
||||||
getBaseUrl(cfg),
|
getBaseUrl(cfg),
|
||||||
@ -32,7 +33,8 @@ object Flags {
|
|||||||
cfg.fullTextSearch.enabled,
|
cfg.fullTextSearch.enabled,
|
||||||
cfg.maxItemPageSize,
|
cfg.maxItemPageSize,
|
||||||
cfg.maxNoteLength,
|
cfg.maxNoteLength,
|
||||||
cfg.showClassificationSettings
|
cfg.showClassificationSettings,
|
||||||
|
uiVersion
|
||||||
)
|
)
|
||||||
|
|
||||||
private def getBaseUrl(cfg: Config): String =
|
private def getBaseUrl(cfg: Config): String =
|
||||||
|
@ -133,10 +133,11 @@ object TemplateRoutes {
|
|||||||
)
|
)
|
||||||
|
|
||||||
object IndexData {
|
object IndexData {
|
||||||
|
private[this] val uiVersion = 2
|
||||||
|
|
||||||
def apply(cfg: Config): IndexData =
|
def apply(cfg: Config): IndexData =
|
||||||
IndexData(
|
IndexData(
|
||||||
Flags(cfg),
|
Flags(cfg, uiVersion),
|
||||||
chooseUi,
|
chooseUi,
|
||||||
Seq(
|
Seq(
|
||||||
"/app/assets" + Webjars.clipboardjs + "/clipboard.min.js",
|
"/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}/favicon",
|
||||||
s"/app/assets/docspell-webapp/${BuildInfo.version}/docspell.js",
|
s"/app/assets/docspell-webapp/${BuildInfo.version}/docspell.js",
|
||||||
Flags(cfg).asJson.spaces2
|
Flags(cfg, uiVersion).asJson.spaces2
|
||||||
)
|
)
|
||||||
|
|
||||||
private def chooseUi: Seq[String] =
|
private def chooseUi: Seq[String] =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user