@@ -11,16 +11,26 @@ import (
11
11
"strconv"
12
12
)
13
13
14
- func (s * Server ) settingsGeneralForm (c echo.Context ) error {
14
+ func (s * Server ) settings (c echo.Context ) error {
15
15
context := c .(* PlaytimeContext )
16
16
17
17
return c .Render (http .StatusOK , "settings" , pongo2.Context {
18
+ "_csrf_token" : c .Get ("csrf" ),
19
+ "user" : context .user ,
20
+ "settings" : context .settings ,
21
+ "platforms" : sortedPlatforms (),
22
+ })
23
+ }
24
+
25
+ func (s * Server ) settingsGeneralForm (c echo.Context ) error {
26
+ context := c .(* PlaytimeContext )
27
+
28
+ return c .Render (http .StatusOK , "settings_general" , pongo2.Context {
18
29
"_csrf_token" : c .Get ("csrf" ),
19
30
"user" : context .user ,
20
31
"settings" : context .settings ,
21
32
"done" : c .QueryParam ("done" ),
22
33
"languages" : storage .Languages ,
23
- "platforms" : sortedPlatforms (),
24
34
})
25
35
}
26
36
@@ -52,7 +62,7 @@ func (s *Server) settingsGeneralSubmit(c echo.Context) error {
52
62
return err
53
63
}
54
64
55
- return c .Redirect (http .StatusFound , "/settings?done=1" )
65
+ return c .Redirect (http .StatusFound , "/settings/general ?done=1" )
56
66
}
57
67
58
68
func (s * Server ) settingsByPlatformForm (c echo.Context ) error {
0 commit comments