mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
[#2295] [WebUI] Increased lifespan of display settings
Display settings for the WebUI are persisted using cookies created by Ex.state.CookieProvider. When no expiration date is provided, a default value of (now + 7 days) is used. This causes display settings to be lost frequently. This fix adds an 'expires' parameter with a value of (now + 10 years). This change does not affect the lifespan of the session cookie, which is created by a separate system.
This commit is contained in:
parent
907109b8bc
commit
0c750084dc
1 changed files with 8 additions and 1 deletions
|
@ -31,7 +31,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Setup the state manager
|
// Setup the state manager
|
||||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
|
||||||
|
/**
|
||||||
|
* By default, cookies will expire after 7 days. Provide
|
||||||
|
* an expiry date 10 years in the future to approximate
|
||||||
|
* a cookie that does not expire.
|
||||||
|
*/
|
||||||
|
expires: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 365 * 10))
|
||||||
|
}));
|
||||||
|
|
||||||
// Add some additional functions to ext and setup some of the
|
// Add some additional functions to ext and setup some of the
|
||||||
// configurable parameters
|
// configurable parameters
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue