remove windows related messages

self restarts now work, so no need.
This commit is contained in:
Harvey Tindall 2020-09-08 23:13:44 +01:00
parent bbb0568cc4
commit 831296a3e8
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
4 changed files with 1 additions and 26 deletions

View File

@ -269,15 +269,6 @@
<div class="modal-header">
<h5 class="modal-title">Warning</h5>
</div>
{{ if .windows }}
<div class="modal-body">
<p>A restart is needed to apply some settings. Self-restarts aren't possible on Windows, so you must restart manually.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-secondary" id="applyRestarts" data-dismiss="modal">Apply, Restart manually</button>
</div>
{{ else }}
<div class="modal-body">
<p>A restart is needed to apply some settings. Restart now, later, or cancel?</p>
</div>
@ -286,7 +277,6 @@
<button type="button" class="btn btn-secondary" id="applyRestarts" data-dismiss="modal">Apply, Restart later</button>
<button type="button" class="btn btn-primary" id="applyAndRestart" data-dismiss="modal">Apply &amp; Restart</button>
</div>
{{ end }}
</div>
</div>
</div>

View File

@ -359,11 +359,7 @@
<div class="card-body text-center">
<h5 class="card-title">Finished!</h5>
<p class="card-text">
{{ if .windows }}
Press the button below to submit your settings. Unfortunately you're running on Windows, so jfa-go <a href="https://github.com/golang/go/issues/30662">cannot restart itself.</a> You will manually have to restart.
{{ else }}
Press the button below to submit your settings. The program will restart. Once it's done, refresh this page.
{{ end }}
</p>
<button id="submitButton" class="btn btn-primary">Submit</button>
</div>

View File

@ -415,14 +415,8 @@ func start(asDaemon, firstCall bool) {
}
app.info.Printf("Starting router @ %s", address)
} else {
windows := false
if PLATFORM == "windows" {
windows = true
}
router.GET("/", func(gc *gin.Context) {
gc.HTML(200, "setup.html", gin.H{
"windows": windows,
})
gc.HTML(200, "setup.html", gin.H{})
})
router.POST("/testJF", app.TestJF)
router.POST("/modifyConfig", app.ModifyConfig)

View File

@ -11,10 +11,6 @@ func (app *appContext) AdminPage(gc *gin.Context) {
emailEnabled, _ := app.config.Section("invite_emails").Key("enabled").Bool()
notificationsEnabled, _ := app.config.Section("notifications").Key("enabled").Bool()
ombiEnabled := app.config.Section("ombi").Key("enabled").MustBool(false)
windows := false
if PLATFORM == "windows" {
windows = true
}
gc.HTML(http.StatusOK, "admin.html", gin.H{
"bs5": bs5,
"cssFile": app.cssFile,
@ -24,7 +20,6 @@ func (app *appContext) AdminPage(gc *gin.Context) {
"version": VERSION,
"commit": COMMIT,
"ombiEnabled": ombiEnabled,
"windows": windows,
})
}