mirror of
https://github.com/Luzifer/ots.git
synced 2025-04-19 06:55:51 -04:00
Clarify name
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
1641e38856
commit
03f88fc637
@ -48,7 +48,7 @@ disableAppTitle: false
|
||||
|
||||
# Disable the dropdown and the API functionality to override the
|
||||
# secret expiry
|
||||
disableExpiry: false
|
||||
disableExpiryOverride: false
|
||||
|
||||
# Disable the footer linking back to the project. If you disable it
|
||||
# please consider a donation to support the project.
|
||||
|
6
api.go
6
api.go
@ -47,8 +47,10 @@ func (a apiServer) handleCreate(res http.ResponseWriter, r *http.Request) {
|
||||
secret string
|
||||
)
|
||||
|
||||
if ev, err := strconv.ParseInt(r.URL.Query().Get("expire"), 10, 64); err == nil && (ev < expiry || cfg.SecretExpiry == 0) && !cust.DisableExpiry {
|
||||
expiry = ev
|
||||
if !cust.DisableExpiryOverride {
|
||||
if ev, err := strconv.ParseInt(r.URL.Query().Get("expire"), 10, 64); err == nil && (ev < expiry || cfg.SecretExpiry == 0) {
|
||||
expiry = ev
|
||||
}
|
||||
}
|
||||
|
||||
if strings.HasPrefix(r.Header.Get("Content-Type"), "application/json") {
|
||||
|
18
customize.go
18
customize.go
@ -12,15 +12,15 @@ import (
|
||||
|
||||
type (
|
||||
customize struct {
|
||||
AppIcon string `json:"appIcon,omitempty" yaml:"appIcon"`
|
||||
AppTitle string `json:"appTitle,omitempty" yaml:"appTitle"`
|
||||
DisableAppTitle bool `json:"disableAppTitle,omitempty" yaml:"disableAppTitle"`
|
||||
DisableExpiry bool `json:"disableExpiry,omitempty" yaml:"disableExpiry"`
|
||||
DisablePoweredBy bool `json:"disablePoweredBy,omitempty" yaml:"disablePoweredBy"`
|
||||
DisableQRSupport bool `json:"disableQRSupport,omitempty" yaml:"disableQRSupport"`
|
||||
DisableThemeSwitcher bool `json:"disableThemeSwitcher,omitempty" yaml:"disableThemeSwitcher"`
|
||||
ExpiryChoices []int64 `json:"expiryChoices,omitempty" yaml:"expiryChoices"`
|
||||
OverlayFSPath string `json:"-" yaml:"overlayFSPath"`
|
||||
AppIcon string `json:"appIcon,omitempty" yaml:"appIcon"`
|
||||
AppTitle string `json:"appTitle,omitempty" yaml:"appTitle"`
|
||||
DisableAppTitle bool `json:"disableAppTitle,omitempty" yaml:"disableAppTitle"`
|
||||
DisableExpiryOverride bool `json:"disableExpiryOverride,omitempty" yaml:"disableExpiryOverride"`
|
||||
DisablePoweredBy bool `json:"disablePoweredBy,omitempty" yaml:"disablePoweredBy"`
|
||||
DisableQRSupport bool `json:"disableQRSupport,omitempty" yaml:"disableQRSupport"`
|
||||
DisableThemeSwitcher bool `json:"disableThemeSwitcher,omitempty" yaml:"disableThemeSwitcher"`
|
||||
ExpiryChoices []int64 `json:"expiryChoices,omitempty" yaml:"expiryChoices"`
|
||||
OverlayFSPath string `json:"-" yaml:"overlayFSPath"`
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -117,7 +117,7 @@
|
||||
</b-button>
|
||||
</b-col>
|
||||
<b-col
|
||||
v-if="!customize.disableExpiry"
|
||||
v-if="!customize.disableExpiryOverride"
|
||||
cols="12"
|
||||
md="6"
|
||||
order="1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user