From 6ed1c99b539d2d0d7f07e55ce586609df79af8e3 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 8 Dec 2015 09:58:06 +0800 Subject: [PATCH] #205 --- conf/user.go | 13 +++++++------ static/js/session.js | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/conf/user.go b/conf/user.go index 2717f8c..0a68717 100644 --- a/conf/user.go +++ b/conf/user.go @@ -28,9 +28,10 @@ import ( "github.com/b3log/wide/util" ) -// Layout represents the layot of a window. +// Layout represents the layot of a panel. type Layout struct { - State string // min/max/normal + State string // panel state, "min"/"max"/"normal" + Size uint16 // panel size } // LatestSessionContent represents the latest session content. @@ -39,10 +40,10 @@ type LatestSessionContent struct { Files []string // paths of files of opening editor tabs CurrentFile string // path of file of the current focused editor tab - FileTreeLayout *Layout // TODO: https://github.com/b3log/wide/issues/205 - EditorLayout *Layout // TODO: https://github.com/b3log/wide/issues/205 - OutlineLayout *Layout // TODO: https://github.com/b3log/wide/issues/205 - BottomLayout *Layout // TODO: https://github.com/b3log/wide/issues/205 + SideLayout *Layout // Left side panel layout + EditorLayout *Layout // Editor panel layout + SideRightLayout *Layout // Right side panel layout + BottomLayout *Layout // Bottom panel layout } // User configuration. diff --git a/static/js/session.js b/static/js/session.js index 998f488..4f34066 100644 --- a/static/js/session.js +++ b/static/js/session.js @@ -18,7 +18,7 @@ var session = { init: function () { this._initWS(); - // save session content per 30 seconds + // save session content every 30 seconds setInterval(function () { var request = newWideRequest(), filse = [],