minor tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-09-02 17:50:33 +03:00
parent 8a78fabb46
commit a105151f2a

View File

@ -208,7 +208,6 @@ object.Constructor('BasePage', {
__delete__: function(path='.'){ __delete__: function(path='.'){
return this.store.delete(pwpath.relative(this.path, path)) }, return this.store.delete(pwpath.relative(this.path, path)) },
//* XXX
__energetic: undefined, __energetic: undefined,
get energetic(){ return async function(){ get energetic(){ return async function(){
return this.__energetic === true return this.__energetic === true
@ -218,12 +217,10 @@ object.Constructor('BasePage', {
|| !!await this.store.isEnergetic(this.path)) }.call(this) }, || !!await this.store.isEnergetic(this.path)) }.call(this) },
set energetic(value){ set energetic(value){
this.__energetic = value }, this.__energetic = value },
//*/
// page data... // page data...
// //
strict: undefined, strict: undefined,
//energetic: undefined,
get data(){ return (async function(){ get data(){ return (async function(){
// direct actions... // direct actions...
if(this.actions if(this.actions
@ -231,9 +228,8 @@ object.Constructor('BasePage', {
var name = this.name var name = this.name
var page = this.get('..') var page = this.get('..')
var res = (this.isPattern var res = (this.isPattern
&& !await this.energetic && !this.__energetic
//&& !page[name].energetic) ? && !page[name].energetic) ?
&& !await page.energetic) ?
page page
.map(function(page){ .map(function(page){
var res = page[name] var res = page[name]
@ -252,8 +248,7 @@ object.Constructor('BasePage', {
// its context (i.e. bind action to page).... // its context (i.e. bind action to page)....
if(this.isPattern if(this.isPattern
// XXX ENERGETIC... // XXX ENERGETIC...
&& !(await this.energetic && !await this.energetic){
|| await this.store.isEnergetic(this.path))){
return this return this
.map(function(page){ .map(function(page){
return page.data }) } return page.data }) }