File tree Expand file tree Collapse file tree
app/components/CorpusMask Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ class CorpusMaskContainer extends Component {
4242 } )
4343 }
4444 render ( ) {
45- let { corpusMask} = this . props
45+ let { corpusMask } = this . props
46+ const fielddbCorpusMask = new CorpusMask ( corpusMask . toJS ( ) )
4647
4748 if ( ! corpusMask || ! corpusMask . get ( 'team' ) ) {
4849 return (
@@ -160,7 +161,7 @@ class CorpusMaskContainer extends Component {
160161 < h1 className = 'media-heading' > { corpusMask . get ( 'title' ) } </ h1 >
161162 < div className = 'media' >
162163 < a href = { `${ corpusMask . get ( 'prototypeApp' ) . get ( 'url' ) } /prototype/_design/prototype/user.html#login/${ corpusMask . get ( 'dbname' ) } ` } className = 'pull-right' >
163- < img src = { 'https://secure.gravatar.com/avatar/' + corpusMask . getIn ( [ ' connection' , ' gravatar' ] ) + '.jpg?s=96&d=retro&r=pg' } alt = 'Corpus image' className = 'media-object' />
164+ < img src = { 'https://secure.gravatar.com/avatar/' + fielddbCorpusMask . connection . gravatar + '.jpg?s=96&d=retro&r=pg' } alt = 'Corpus image' className = 'media-object' />
164165 </ a >
165166 < div className = 'media-body' >
166167 < div className = 'description' dangerouslySetInnerHTML = { {
Original file line number Diff line number Diff line change @@ -41,9 +41,10 @@ var getCorpusMask = function(dbname, next) {
4141 corpusMask . team . corpus = corpusMask ;
4242 corpusMask . connection = corpusMask . connection || { } ;
4343 corpusMask . team . fetch ( config . corpus . url + "/" + validateIdentifier . identifier ) . then ( function ( ) {
44- // console.log(new Date() + " owners's gravatar in this database " + corpusMask.team.gravatar, corpusMask.startYear);
45- // console.log(new Date() + " corpus connection's gravatar in this database " + corpusMask.connection.gravatar);
46- // console.log(new Date() + " TODO consider saving corpus.json with the team inside.");
44+ // Must prime the gravatar:
45+ // corpusMask.debug(new Date() + " owners's gravatar in this database " + corpusMask.team.gravatar, corpusMask.startYear);
46+ // corpusMask.debug(new Date() + " corpus connection's gravatar in this database " + corpusMask.connection.gravatar);
47+ // corpusMask.debug(new Date() + " TODO consider saving corpus.json with the team inside.");
4748 deferred . resolve ( corpusMask ) ;
4849 } , function ( err ) {
4950 console . log ( new Date ( ) + "error fetching corpus team" , err ) ;
Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ var getUserMask = function getUserMask(username, next) {
7373 connection : corpusConnection
7474 } ) ;
7575 promises . push ( corpusMask . fetch ( config . corpus . url + "/" + corpusConnection . dbname ) . then ( function ( ) {
76- // Must prime the gravatar
77- // console.log (new Date() + " Using connection from the corpus mask details", corpusMask.connection.owner, corpusMask.connection.gravatar);
76+ // Must prime the gravatar:
77+ corpusMask . debug ( new Date ( ) + " Using connection from the corpus mask details" , corpusMask . connection . owner , corpusMask . connection . gravatar ) ;
7878 corpusMask . connection . title = corpusMask . connection . title ;
7979 corpusMask . connection . description = corpusMask . connection . description ;
8080 if ( ! corpusMask . connection . websiteUrl || corpusMask . connection . websiteUrl === config . public . url || corpusMask . connection . websiteUrl . indexOf ( "lingsync.org" ) === corpusMask . connection . websiteUrl . length - 12 ) {
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ describe("/v1", function() {
3636
3737 expect ( res . text ) . to . contain ( "To install the Georgian Together app" ) ;
3838 expect ( res . text ) . to . contain ( "notify the author(s) of the corpus (apps" ) ;
39- expect ( res . text ) . to . match ( / © .* G e o r g i a n T o g e t h e r U s e r s .* - .* 2 0 1 7 / ) ;
39+ expect ( res . text ) . to . match ( / © .* G e o r g i a n T o g e t h e r U s e r s .* - .* 2 0 2 0 / ) ;
4040
4141 done ( ) ;
4242 } ) ;
You can’t perform that action at this time.
0 commit comments