Add missing `root_url` to settings UI
This commit is contained in:
parent
8c0804ba9f
commit
e4f233e2e5
|
@ -18,6 +18,12 @@
|
|||
<b-tabs type="is-boxed" :animated="false">
|
||||
<b-tab-item label="General" label-position="on-border">
|
||||
<div class="items">
|
||||
<b-field label="Root URL" label-position="on-border"
|
||||
message="Public URL of the installation (no trailing slash).">
|
||||
<b-input v-model="form['app.root_url']" name="app.root_url"
|
||||
placeholder='https://listmonk.yoursite.com' :maxlength="300" />
|
||||
</b-field>
|
||||
|
||||
<b-field label="Logo URL" label-position="on-border"
|
||||
message="(Optional) full URL to the static logo to be displayed on
|
||||
user facing view such as the unsubscription page.">
|
||||
|
|
4
init.go
4
init.go
|
@ -37,7 +37,7 @@ const (
|
|||
|
||||
// constants contains static, constant config values required by the app.
|
||||
type constants struct {
|
||||
RootURL string `koanf:"root"`
|
||||
RootURL string `koanf:"root_url"`
|
||||
LogoURL string `koanf:"logo_url"`
|
||||
FaviconURL string `koanf:"favicon_url"`
|
||||
FromEmail string `koanf:"from_email"`
|
||||
|
@ -347,7 +347,7 @@ func initMediaStore() media.Store {
|
|||
var o filesystem.Opts
|
||||
|
||||
ko.Unmarshal("upload.filesystem", &o)
|
||||
o.RootURL = ko.String("app.root")
|
||||
o.RootURL = ko.String("app.root_url")
|
||||
o.UploadPath = filepath.Clean(o.UploadPath)
|
||||
o.UploadURI = filepath.Clean(o.UploadURI)
|
||||
up, err := filesystem.NewDiskStore(o)
|
||||
|
|
|
@ -165,6 +165,7 @@ CREATE TABLE settings (
|
|||
);
|
||||
DROP INDEX IF EXISTS idx_settings_key; CREATE INDEX idx_settings_key ON settings(key);
|
||||
INSERT INTO settings (key, value) VALUES
|
||||
('app.root_url', '"https://localhost:9000"'),
|
||||
('app.favicon_url', '""'),
|
||||
('app.from_email', '"listmonk <noreply@listmonk.yoursite.com>"'),
|
||||
('app.logo_url', '"http://localhost:9000/public/static/logo.png"'),
|
||||
|
|
Loading…
Reference in New Issue