You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/11/21 16:59:55 UTC
[incubator-ponymail-foal] branch master updated (31b95ab -> c3ca282)
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.
from 31b95ab refactoruser prefs area for admin.html as well
new f600cd3 nix unused variable, add a compact listmode bool
new 6e6ec8d fix width and position of user prefs for narrow devices
new 2363d21 save/load all display prefs
new a977063 add compact email listview element
new 0fee78e add in compact mode get/set
new 5fd28c8 use compact mode if set
new a9c2820 add compact mode checkbox, lint
new c3ca282 regen JS
The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
webui/css/scaffolding.css | 32 ++++++++++++++++++++++
webui/js/ponymail.js | 52 +++++++++++++++++++++++++-----------
webui/js/source/aavariables.js | 2 +-
webui/js/source/listview-flat.js | 15 ++++++-----
webui/js/source/listview-threaded.js | 12 +++++----
webui/js/source/preferences.js | 21 +++++++++++++--
webui/list.html | 7 ++---
7 files changed, 107 insertions(+), 34 deletions(-)
[incubator-ponymail-foal] 06/08: use compact mode if set
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 5fd28c82e4fba238f98a3217d63ec7e928719c70
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Nov 21 17:59:10 2021 +0100
use compact mode if set
---
webui/js/source/listview-flat.js | 15 ++++++++-------
webui/js/source/listview-threaded.js | 12 +++++++-----
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/webui/js/source/listview-flat.js b/webui/js/source/listview-flat.js
index ad42154..ad02e34 100644
--- a/webui/js/source/listview-flat.js
+++ b/webui/js/source/listview-flat.js
@@ -23,7 +23,7 @@ function calc_per_page() {
html.clientHeight, html.scrollHeight);
let width = Math.max(body.scrollWidth,
html.clientWidth, html.scrollWidth);
- let email_h = 40;
+ let email_h = G_current_listmode_compact ? 24 : 40;
if (width < 600) {
console.log("Using narrow view, halving emails per page...");
email_h = 80;
@@ -68,7 +68,7 @@ function listview_flat_element(eml, idx) {
});
let element = new HTML('div', {
- class: "listview_email_flat"
+ class: G_current_listmode_compact ? "listview_email_compact" : "listview_email_flat"
}, " ");
let date = new Date(eml.epoch * 1000.0);
let now = new Date();
@@ -101,11 +101,12 @@ function listview_flat_element(eml, idx) {
class: 'listview_email_subject email_unread'
}, suba);
as.inject(subject);
-
- let body = new HTML('div', {
- class: 'listview_email_body'
- }, eml.body);
- as.inject(body);
+ if (!G_current_listmode_compact) { // No body in compact mode
+ let body = new HTML('div', {
+ class: 'listview_email_body'
+ }, eml.body);
+ as.inject(body);
+ }
element.inject(as);
diff --git a/webui/js/source/listview-threaded.js b/webui/js/source/listview-threaded.js
index 19363a1..26c6464 100644
--- a/webui/js/source/listview-threaded.js
+++ b/webui/js/source/listview-threaded.js
@@ -111,7 +111,7 @@ function listview_threaded_element(thread, idx) {
});
let element = new HTML('div', {
- class: "listview_email_flat"
+ class: G_current_listmode_compact ? "listview_email_compact" : "listview_email_flat"
}, " ");
let date = new Date(eml.epoch * 1000.0);
let now = new Date();
@@ -162,10 +162,12 @@ function listview_threaded_element(thread, idx) {
}, suba);
as.inject(subject);
- let body = new HTML('div', {
- class: 'listview_email_body'
- }, eml.body);
- as.inject(body);
+ if (!G_current_listmode_compact) { // No body teaser in compact mode
+ let body = new HTML('div', {
+ class: 'listview_email_body'
+ }, eml.body);
+ as.inject(body);
+ }
element.inject(as);
[incubator-ponymail-foal] 07/08: add compact mode checkbox, lint
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit a9c28201d599d609422ba7a0442d3e8e51076f9e
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Nov 21 17:59:25 2021 +0100
add compact mode checkbox, lint
---
webui/list.html | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/webui/list.html b/webui/list.html
index f6bbc21..5ea9d9f 100644
--- a/webui/list.html
+++ b/webui/list.html
@@ -96,9 +96,10 @@ the License. -->
<div class="dropdown-menu" id="display_options_dropdown">
<div style="width: 45%; display: inline-block; float: left; border-radius: 5px; border: 0.75px solid #3339; margin: 1%; padding: 1%;">
<b>List display mode:</b><hr/>
- <input type="radio" id="display_mode_threaded" name="ui_threading" value="threaded" onchange="set_theme('threaded');"><label for="display_mode_threaded">Threaded view</label><br/>
- <input type="radio" id="display_mode_flat" name="ui_threading" value="threaded" onchange="set_theme('flat');"><label for="display_mode_flat">Flat view</label><br/>
- <input type="radio" id="display_mode_treeview" name="ui_threading" value="threaded" onchange="set_theme('treeview');"><label for="display_mode_treeview">Treeview</label><br/>
+ <input type="radio" id="display_mode_threaded" name="ui_threading" value="threaded" onchange="set_theme('threaded');"> <label for="display_mode_threaded">Threaded view</label><br/>
+ <input type="radio" id="display_mode_flat" name="ui_threading" value="threaded" onchange="set_theme('flat');"> <label for="display_mode_flat">Flat view</label><br/>
+ <input type="radio" id="display_mode_treeview" name="ui_threading" value="threaded" onchange="set_theme('treeview');"> <label for="display_mode_treeview">Treeview</label><br/><br/>
+ <input type="checkbox" id="display_mode_compact" name="ui_compact_list" value="compact" onchange="set_theme(G_current_listmode, this.checked);"> <label for="display_mode_compact">Compact layout</label><br/>
</div>
<div style="width: 45%; display: inline-block; float: right; border-radius: 5px; border: 1px solid #3339; margin: 1%; padding: 1%;">
[incubator-ponymail-foal] 01/08: nix unused variable, add a compact listmode bool
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit f600cd3a56e7a223e0b6e72412491affb5174474
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Nov 21 17:45:17 2021 +0100
nix unused variable, add a compact listmode bool
---
webui/js/source/aavariables.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webui/js/source/aavariables.js b/webui/js/source/aavariables.js
index 29b6d52..9ab33e5 100644
--- a/webui/js/source/aavariables.js
+++ b/webui/js/source/aavariables.js
@@ -29,7 +29,6 @@ let G_current_list = '';
let G_current_domain = '';
let G_current_year = 0;
let G_current_month = 0;
-let G_current_quick_search = '';
let G_current_query = '';
let G_current_open_email = null;
let G_select_primed = false;
@@ -37,6 +36,7 @@ let G_ponymail_preferences = {};
let G_ponymail_search_list = 'this';
let G_current_listmode = 'threaded';
+let G_current_listmode_compact = false;
const PONYMAIL_MAX_NESTING = 10; // max nesting level before unthreading to save space
// thread state
[incubator-ponymail-foal] 03/08: save/load all display prefs
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 2363d21383ec117bbcc853c94bc329c4dbce20e6
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Nov 21 17:45:47 2021 +0100
save/load all display prefs
---
webui/js/source/preferences.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/webui/js/source/preferences.js b/webui/js/source/preferences.js
index a309b0c..5ac8ef8 100644
--- a/webui/js/source/preferences.js
+++ b/webui/js/source/preferences.js
@@ -31,6 +31,12 @@ function init_preferences(state, json) {
if (ljson.G_chatty_layout !== undefined) {
G_chatty_layout = ljson.G_chatty_layout;
}
+ if (ljson.G_current_listmode !== undefined) {
+ G_current_listmode = ljson.G_current_listmode;
+ }
+ if (ljson.G_current_listmode_compact !== undefined) {
+ G_current_listmode_compact = ljson.G_current_listmode_compact;
+ }
}
}
@@ -120,7 +126,9 @@ function init_preferences(state, json) {
function save_preferences() {
if (G_can_store) {
let ljson = {
- G_chatty_layout: G_chatty_layout
+ G_chatty_layout: G_chatty_layout,
+ G_current_listmode: G_current_listmode,
+ G_current_listmode_compact: G_current_listmode_compact
};
let lstring = JSON.stringify(ljson);
window.localStorage.setItem('G_ponymail_preferences', lstring);
[incubator-ponymail-foal] 04/08: add compact email listview element
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit a977063e24f76be8777495deba32f87837a3c003
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Nov 21 17:58:33 2021 +0100
add compact email listview element
---
webui/css/scaffolding.css | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/webui/css/scaffolding.css b/webui/css/scaffolding.css
index 6bda268..251bf78 100644
--- a/webui/css/scaffolding.css
+++ b/webui/css/scaffolding.css
@@ -549,6 +549,31 @@ a.dropdown-toggle {
font-weight: bold;
}
+
+/* Compacted email item */
+.listview_email_compact {
+ background: #FFF;
+ border: 1.25px solid #CCC9;
+ border-left: 3px solid #AAA;
+ border-top: none;
+ height: 24px;
+ line-height: 24px;
+ padding-top: 2px;
+ font-size: 1.25rem;
+ float: left;
+ width: 100%;
+}
+
+.listview_email_compact .listview_email_author {
+ height: 24px;
+ line-height: 24px;
+}
+
+.listview_email_compact .gravatar {
+ height: 20px;
+ width: 20px;
+}
+
/* Hide labels, expand subject when mobile */
@media only screen and (max-width: 600px) {
#portrait_notice {
@@ -923,6 +948,8 @@ a .listview_email_threaded {
}
+
+
.email_quote {
font-size: 1.25rem;
background: #3333;
[incubator-ponymail-foal] 05/08: add in compact mode get/set
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 0fee78e1b9517683627da3c5582b21474825db2f
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Nov 21 17:58:53 2021 +0100
add in compact mode get/set
---
webui/js/source/preferences.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/webui/js/source/preferences.js b/webui/js/source/preferences.js
index 5ac8ef8..0789b44 100644
--- a/webui/js/source/preferences.js
+++ b/webui/js/source/preferences.js
@@ -68,6 +68,12 @@ function init_preferences(state, json) {
dmtr.checked = (G_current_listmode == 'treeview');
}
+ // Compact list view
+ let dmc = document.getElementById('display_mode_compact');
+ if (dmc) {
+ dmc.checked = G_current_listmode_compact;
+ }
+
if (G_ponymail_preferences.login && G_ponymail_preferences.login.credentials) {
@@ -137,8 +143,11 @@ function save_preferences() {
}
-function set_theme(theme) {
+function set_theme(theme, compact_mode) {
G_current_listmode = theme;
+ if (compact_mode !== undefined) {
+ G_current_listmode_compact = compact_mode;
+ }
renderListView(G_current_state, G_current_json);
save_preferences();
}
[incubator-ponymail-foal] 08/08: regen JS
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit c3ca2824dc35efeb1cee333bc9f2650f29e4750a
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Nov 21 17:59:39 2021 +0100
regen JS
---
webui/js/ponymail.js | 52 ++++++++++++++++++++++++++++++++++++----------------
1 file changed, 36 insertions(+), 16 deletions(-)
diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index 108d337..15f365c 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -16,7 +16,7 @@
*/
// THIS IS AN AUTOMATICALLY COMBINED FILE. PLEASE EDIT source/*.js!!
-const PONYMAIL_REVISION = "44efe36";
+const PONYMAIL_REVISION = "a9c2820";
@@ -38,7 +38,6 @@ let G_current_list = '';
let G_current_domain = '';
let G_current_year = 0;
let G_current_month = 0;
-let G_current_quick_search = '';
let G_current_query = '';
let G_current_open_email = null;
let G_select_primed = false;
@@ -46,6 +45,7 @@ let G_ponymail_preferences = {};
let G_ponymail_search_list = 'this';
let G_current_listmode = 'threaded';
+let G_current_listmode_compact = false;
const PONYMAIL_MAX_NESTING = 10; // max nesting level before unthreading to save space
// thread state
@@ -2088,7 +2088,7 @@ function calc_per_page() {
html.clientHeight, html.scrollHeight);
let width = Math.max(body.scrollWidth,
html.clientWidth, html.scrollWidth);
- let email_h = 40;
+ let email_h = G_current_listmode_compact ? 24 : 40;
if (width < 600) {
console.log("Using narrow view, halving emails per page...");
email_h = 80;
@@ -2133,7 +2133,7 @@ function listview_flat_element(eml, idx) {
});
let element = new HTML('div', {
- class: "listview_email_flat"
+ class: G_current_listmode_compact ? "listview_email_compact" : "listview_email_flat"
}, " ");
let date = new Date(eml.epoch * 1000.0);
let now = new Date();
@@ -2166,11 +2166,12 @@ function listview_flat_element(eml, idx) {
class: 'listview_email_subject email_unread'
}, suba);
as.inject(subject);
-
- let body = new HTML('div', {
- class: 'listview_email_body'
- }, eml.body);
- as.inject(body);
+ if (!G_current_listmode_compact) { // No body in compact mode
+ let body = new HTML('div', {
+ class: 'listview_email_body'
+ }, eml.body);
+ as.inject(body);
+ }
element.inject(as);
@@ -2631,7 +2632,7 @@ function listview_threaded_element(thread, idx) {
});
let element = new HTML('div', {
- class: "listview_email_flat"
+ class: G_current_listmode_compact ? "listview_email_compact" : "listview_email_flat"
}, " ");
let date = new Date(eml.epoch * 1000.0);
let now = new Date();
@@ -2682,10 +2683,12 @@ function listview_threaded_element(thread, idx) {
}, suba);
as.inject(subject);
- let body = new HTML('div', {
- class: 'listview_email_body'
- }, eml.body);
- as.inject(body);
+ if (!G_current_listmode_compact) { // No body teaser in compact mode
+ let body = new HTML('div', {
+ class: 'listview_email_body'
+ }, eml.body);
+ as.inject(body);
+ }
element.inject(as);
@@ -3188,6 +3191,12 @@ function init_preferences(state, json) {
if (ljson.G_chatty_layout !== undefined) {
G_chatty_layout = ljson.G_chatty_layout;
}
+ if (ljson.G_current_listmode !== undefined) {
+ G_current_listmode = ljson.G_current_listmode;
+ }
+ if (ljson.G_current_listmode_compact !== undefined) {
+ G_current_listmode_compact = ljson.G_current_listmode_compact;
+ }
}
}
@@ -3219,6 +3228,12 @@ function init_preferences(state, json) {
dmtr.checked = (G_current_listmode == 'treeview');
}
+ // Compact list view
+ let dmc = document.getElementById('display_mode_compact');
+ if (dmc) {
+ dmc.checked = G_current_listmode_compact;
+ }
+
if (G_ponymail_preferences.login && G_ponymail_preferences.login.credentials) {
@@ -3277,7 +3292,9 @@ function init_preferences(state, json) {
function save_preferences() {
if (G_can_store) {
let ljson = {
- G_chatty_layout: G_chatty_layout
+ G_chatty_layout: G_chatty_layout,
+ G_current_listmode: G_current_listmode,
+ G_current_listmode_compact: G_current_listmode_compact
};
let lstring = JSON.stringify(ljson);
window.localStorage.setItem('G_ponymail_preferences', lstring);
@@ -3286,8 +3303,11 @@ function save_preferences() {
}
-function set_theme(theme) {
+function set_theme(theme, compact_mode) {
G_current_listmode = theme;
+ if (compact_mode !== undefined) {
+ G_current_listmode_compact = compact_mode;
+ }
renderListView(G_current_state, G_current_json);
save_preferences();
}
[incubator-ponymail-foal] 02/08: fix width and position of user prefs for narrow devices
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 6e6ec8d5961df9d1e14e67e14077f34634b2d79f
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Nov 21 17:45:33 2021 +0100
fix width and position of user prefs for narrow devices
---
webui/css/scaffolding.css | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/webui/css/scaffolding.css b/webui/css/scaffolding.css
index 466caed..6bda268 100644
--- a/webui/css/scaffolding.css
+++ b/webui/css/scaffolding.css
@@ -697,6 +697,11 @@ a.dropdown-toggle {
@media only screen and (max-width: 440px) {
#preferences_ul #display_options_dropdown {
width: 300px;
+ position: absolute;
+ left: -140px;
+ right: auto;
+ font-weight: normal;
+ font-size: 1.15rem;
}
}