code refactoring
fixed bad escape in i18n.yaml
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yt-dlp-webui",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.2",
|
||||
"description": "Frontend compontent of yt-dlp-webui",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -627,7 +627,7 @@ languages:
|
||||
playlistCheckbox: Ladda ner spellista (detta kommer ta did, efter start så kan du stänga detta fönster)
|
||||
restartAppMessage: En sidomladdning behövs innan förändringen får effekt
|
||||
servedFromReverseProxyCheckbox: Servern befinner sig bakom en omvänd proxy
|
||||
urlBase: URL-bas, måste anges när en omvänd proxy används. Standardinställning: lämna blank
|
||||
urlBase: "URL-bas, måste anges när en omvänd proxy används. Standardinställning: lämna blank"
|
||||
newDownloadButton: Ny nedladdning
|
||||
homeButtonLabel: Hem
|
||||
archiveButtonLabel: Arkiv
|
||||
|
||||
@@ -35,7 +35,7 @@ const Footer: React.FC = () => {
|
||||
display: 'flex', gap: 1, justifyContent: 'space-between'
|
||||
}}>
|
||||
<div style={{ display: 'flex', gap: 4, alignItems: 'center' }}>
|
||||
<Chip label="RPC v3.1.0" variant="outlined" size="small" />
|
||||
<Chip label="RPC v3.1.2" variant="outlined" size="small" />
|
||||
<VersionIndicator />
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 4, 'alignItems': 'center' }}>
|
||||
|
||||
@@ -18,6 +18,8 @@ type OAuth2SuccessResponse struct {
|
||||
IDTokenClaims *json.RawMessage
|
||||
}
|
||||
|
||||
// var cookieMaxAge = int(time.Hour * 24 * 30) XXX: overflows on 32 bit architectures.
|
||||
|
||||
func Login(w http.ResponseWriter, r *http.Request) {
|
||||
state := uuid.NewString()
|
||||
|
||||
@@ -32,7 +34,8 @@ func Login(w http.ResponseWriter, r *http.Request) {
|
||||
HttpOnly: true,
|
||||
Path: "/",
|
||||
Secure: r.TLS != nil,
|
||||
MaxAge: int(time.Hour * 24 * 30),
|
||||
// MaxAge: cookieMaxAge,
|
||||
Expires: time.Now().Add(time.Hour * 24 * 30), // XXX: change to MaxAge
|
||||
})
|
||||
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
@@ -41,7 +44,8 @@ func Login(w http.ResponseWriter, r *http.Request) {
|
||||
HttpOnly: true,
|
||||
Path: "/",
|
||||
Secure: r.TLS != nil,
|
||||
MaxAge: int(time.Hour * 24 * 30),
|
||||
// MaxAge: cookieMaxAge,
|
||||
Expires: time.Now().Add(time.Hour * 24 * 30), // XXX: change to MaxAge
|
||||
})
|
||||
|
||||
http.Redirect(w, r, oauth2Config.AuthCodeURL(state, oidc.Nonce(nonce)), http.StatusFound)
|
||||
@@ -108,7 +112,7 @@ func SingIn(w http.ResponseWriter, r *http.Request) {
|
||||
HttpOnly: true,
|
||||
Path: "/",
|
||||
Secure: r.TLS != nil,
|
||||
MaxAge: int(time.Hour * 24 * 30),
|
||||
// MaxAge: int(time.Hour * 24 * 30), XXX: overflows on 32 bit architectures.
|
||||
})
|
||||
})
|
||||
if err != nil {
|
||||
@@ -116,11 +120,6 @@ func SingIn(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// if err := json.NewEncoder(w).Encode(res); err != nil {
|
||||
// http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
// return
|
||||
// }
|
||||
|
||||
w.Write([]byte("Login succesfully, you may now close this window and refresh yt-dlp-webui."))
|
||||
}
|
||||
|
||||
@@ -141,7 +140,7 @@ func Refresh(w http.ResponseWriter, r *http.Request) {
|
||||
HttpOnly: true,
|
||||
Path: "/",
|
||||
Secure: r.TLS != nil,
|
||||
MaxAge: int(time.Hour * 24 * 30),
|
||||
// MaxAge: int(time.Hour * 24 * 30), XXX: overflows on 32 bit architectures.
|
||||
})
|
||||
|
||||
token.AccessToken = "*redacted*"
|
||||
|
||||
Reference in New Issue
Block a user