Skip to content

Commit

Permalink
Merge pull request #78 from valueinstrument/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
philipeachille authored Nov 24, 2022
2 parents af3181c + aaca8e4 commit 8207843
Show file tree
Hide file tree
Showing 23 changed files with 304 additions and 127 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint global-require: "off" */

const settings = {
floatEth: true,
floatEth: false,
};

const collE = global.db.collE;
Expand Down
1 change: 1 addition & 0 deletions web-interface/app/assets/icon/done-24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web-interface/app/assets/icon/edit-24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web-interface/app/assets/icon/search-24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web-interface/app/plugins/builds/vplugins.min.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions web-interface/app/plugins/src/chat/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const Chat = ( function() { // eslint-disable-line no-unused-vars
'padding': '4px 12px',
'border-radius': '20px',
},
h: res.status || res.errors[0].message,
h: res.status || res.errors && res.errors[0].message,
} ) );
}
} );
Expand Down Expand Up @@ -149,7 +149,13 @@ const Chat = ( function() { // eslint-disable-line no-unused-vars
}
else if ( V.getSetting( 'chatLedger' ) == 'Firebase' ) {
V.setNode( 'listings', $list );
NetworkMainRoom.once( 'child_added', childAdded );
setTimeout( function delayedChildAddedOnce() {
const $list = V.getNode( 'list' );
if( !$list.firstChild ) {
NetworkMainRoom.once( 'child_added', childAdded );
}
}, 1200 );

}
else {
V.setNode( $topcontent, CanvasComponents.notFound( 'message' ) );
Expand Down Expand Up @@ -251,7 +257,7 @@ const Chat = ( function() { // eslint-disable-line no-unused-vars
}

if ( V.getSetting( 'chatLedger' ) == 'Firebase' ) {
NetworkMainRoom.on( 'child_added', function childAddedLive( snap ) {
NetworkMainRoom.on( 'child_added', function childAddedOn( snap ) {
childAdded( snap );
} );
}
Expand Down
78 changes: 39 additions & 39 deletions web-interface/app/plugins/src/entity/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,17 @@ const UserComponents = ( function() { // eslint-disable-line no-unused-vars
}
}

function handleViewMode() {
const data = {
uuidE: V.getState( 'active' ).lastViewedUuidE,
uuidP: V.getState( 'active' ).lastViewedUuidP,
navReset: false,
};
this.checked
? User.draw( data )
: Profile.draw( data );

}
// function handleViewMode() {
// const data = {
// uuidE: V.getState( 'active' ).lastViewedUuidE,
// uuidP: V.getState( 'active' ).lastViewedUuidP,
// navReset: false,
// };
// this.checked
// ? User.draw( data )
// : Profile.draw( data );
//
// }

function handlePrivacyRadioButton( e ) {
setField( 'privacy', { privacy: e.target.value } );
Expand Down Expand Up @@ -798,34 +798,34 @@ const UserComponents = ( function() { // eslint-disable-line no-unused-vars
},
],
},
{
c: 'pxy flex ',
h: [
{
t: 'input',
i: 'view-mode',
c: 'toggle-switch__input',
a: {
type: 'checkbox',
checked: editable ? true : undefined,
},
e: {
change: handleViewMode,
},
},
{
t: 'label',
c: 'toggle-switch',
a: { for: 'view-mode' },
h: 'toggle',
},
{
t: 'p',
c: 'active__title fs-xs pxy',
h: V.getString( editable ? ui.editMode : ui.viewMode ),
},
],
},
// {
// c: 'pxy flex ',
// h: [
// {
// t: 'input',
// i: 'view-mode',
// c: 'toggle-switch__input',
// a: {
// type: 'checkbox',
// checked: editable ? true : undefined,
// },
// e: {
// change: handleViewMode,
// },
// },
// {
// t: 'label',
// c: 'toggle-switch',
// a: { for: 'view-mode' },
// h: 'toggle',
// },
// {
// t: 'p',
// c: 'active__title fs-xs pxy',
// h: V.getString( editable ? ui.editMode : ui.viewMode ),
// },
// ],
// },
],
} );

Expand Down
25 changes: 19 additions & 6 deletions web-interface/app/plugins/src/entity/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const Profile = ( function() { // eslint-disable-line no-unused-vars
UserComponents.financialCard(),
UserComponents.evmAddressCard(),
UserComponents.evmReceiverAddressCard(),
UserComponents.managementCard(),
// UserComponents.managementCard(),
UserComponents.holderOfCard(),
UserComponents.socialShareButtons(),
] );
Expand Down Expand Up @@ -147,7 +147,7 @@ const Profile = ( function() { // eslint-disable-line no-unused-vars
position: 'top',
listings: $list,
} );
MagicButton.draw( 'chat' );
// MagicButton.draw( 'chat' );
// delayedMessageForm( entity );
} );
}
Expand All @@ -157,10 +157,22 @@ const Profile = ( function() { // eslint-disable-line no-unused-vars
position: 'top',
listings: $list,
} );
MagicButton.draw( 'chat' );
// MagicButton.draw( 'chat' );
// delayedMessageForm( entity );
}

if (
V.aE()
&& V.getLastViewed().holders.includes( V.aE().fullId )
) {
MagicButton.draw( 'edit' );
// Chat.drawMessageForm();
// delayedMessageForm( entity );
}
else {
MagicButton.draw( 'chat' );
}

if ( entity.images.tinyImage ) {
Navigation.drawImage( entity );
}
Expand All @@ -172,9 +184,10 @@ const Profile = ( function() { // eslint-disable-line no-unused-vars
//
// /** This is a hacky way to wait for V.aE( 'uuidE' ) to be available */
// setTimeout( function delayMsgForm() {
// entity.uuidE != V.aE( 'uuidE' )
// ? Chat.drawMessageForm()
// : null;
// Chat.drawMessageForm();
// // entity.uuidE != V.aE( 'uuidE' )
// // ? Chat.drawMessageForm()
// // : null;
// }, 1800, entity );
// }

Expand Down
11 changes: 3 additions & 8 deletions web-interface/app/plugins/src/entity/editable.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,9 @@ const User = ( function() { // eslint-disable-line no-unused-vars
}
}

function preview( /* path */ ) {
MagicButton.draw( 'chat' );
function preview() {

// Button.draw( 'all', { fade: 'out' } );

// if ( path == '/me/profile' ) {
// Navigation.draw( path );
// }
MagicButton.draw( 'done' );

Page.draw( {
position: 'top',
Expand Down Expand Up @@ -273,7 +268,7 @@ const User = ( function() { // eslint-disable-line no-unused-vars
Modal.draw( 'disconnect' );
}
else {
preview( /* path */ );
preview();
presenter( data ).then( viewData => { view( viewData ) } );
}
}
Expand Down
15 changes: 11 additions & 4 deletions web-interface/app/plugins/src/hall/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,21 @@ const HallComponents = ( function() { // eslint-disable-line no-unused-vars
},
} ),
},
{
c: 'network-layout__featured font-bold fs-l mt-r mb-r',
h: V.getString( ui.featuredPeople ),
},
// {
// c: 'network-layout__featured font-bold fs-l mt-r mb-r',
// h: V.getString( ui.featuredPeople ),
// },
],
} ),
],
} );
}
function vipTitle() {
return V.cN( {
c: 'network-layout__featured font-bold fs-l mt-r mb-r',
h: V.getString( ui.featuredPeople ),
} );
}

function callsToAction( aE ) {

Expand Down Expand Up @@ -255,6 +261,7 @@ const HallComponents = ( function() { // eslint-disable-line no-unused-vars
networkLayout: networkLayout,
legalBlabla: legalBlabla,
callsToAction: callsToAction,
vipTitle: vipTitle,
};

} )();
18 changes: 13 additions & 5 deletions web-interface/app/plugins/src/hall/hall.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ const Hall = ( function() { // eslint-disable-line no-unused-vars

if ( vips.success ) {
const networkE = vips.data.find( item => item.role == 'Network' );

if ( !networkE ) {
return vips;
}
await V.getEntity( networkE.uuidE ).then( res => {
if ( res.success ) {
V.setCache( 'vips', res.data );
Expand All @@ -91,17 +93,18 @@ const Hall = ( function() { // eslint-disable-line no-unused-vars
const $list = CanvasComponents.list();

if ( cachedVips && cachedVips.data[0] ) {
setVipTitle();
cachedVips.data.forEach( cardData => {
if ( 'Network' == cardData.role ) {
setNetworkContent( cardData );
VMap.draw( [cardData] );
}
else {
setListContent( cardData );
setVipContent( cardData );
}
} );
setLegalBlabla();
setCallToActions();
// setCallToActions();
}
else {
V.setNode( $list, CanvasComponents.notFound( 'vips' ) );
Expand All @@ -121,10 +124,15 @@ const Hall = ( function() { // eslint-disable-line no-unused-vars

function setNetworkContent( cardData ) { // eslint-disable-line no-inner-declarations
const $networkLayout = HallComponents.networkLayout( cardData );
V.setNode( $list, $networkLayout, 'prepend' );
V.setNode( $list, [$networkLayout], 'prepend' );
}

function setVipTitle() {
const $vipTitle = HallComponents.vipTitle();
V.setNode( $list, $vipTitle );
}

function setListContent( cardData ) { // eslint-disable-line no-inner-declarations
function setVipContent( cardData ) { // eslint-disable-line no-inner-declarations
const $cardContent = MarketplaceComponents.cardContent( cardData );
const $card = CanvasComponents.card( $cardContent );
V.setNode( $list, $card );
Expand Down
2 changes: 1 addition & 1 deletion web-interface/app/theme/builds/vtheme.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion web-interface/app/theme/lang/de_DE_du.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,9 @@
"Featured Members": "Wichtige Mitglieder",
"Imprint": "Impressum",
"Data Protection": "Datenschutz",
"Privacy Policy": "Schutz der Privatsphäre"
"Privacy Policy": "Schutz der Privatsphäre",
"Use key file": "Schlüssel-Datei verwenden",
"No file selected": "Keine Datei hochgeladen",
"No key found in file": "Kein Schlüssel in Datei gefunden",
"Enter key manually": "Schlüssel manuell eingeben"
}
6 changes: 5 additions & 1 deletion web-interface/app/theme/lang/de_DE_sie.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,9 @@
"Featured Members": "Wichtige Mitglieder",
"Imprint": "Impressum",
"Data Protection": "Datenschutz",
"Privacy Policy": "Schutz der Privatsphäre"
"Privacy Policy": "Schutz der Privatsphäre",
"Use key file": "Schlüssel-Datei verwenden",
"No file selected": "Keine Datei hochgeladen",
"No key found in file": "Kein Schlüssel in Datei gefunden",
"Enter key manually": "Schlüssel manuell eingeben"
}
Loading

0 comments on commit 8207843

Please sign in to comment.