Project

General

Profile

« Previous | Next » 

Revision 58281

Almost final commit for the new UI

View differences:

sidemenu.component.ts
175 175
      this.visibleReposOfUser = Object.assign([], this.reposOfUser);
176 176
    }
177 177

  
178
    let route = this.router.url;
179
    let repositoryID = '';
180
    let index: number = 0;
181
    if(route.includes('repository')) {
178 182

  
183
      console.log('************* route: '+ route);
184
      let repositoryIndex = route.indexOf('repository');
185
      repositoryID = route.substr(repositoryIndex).split('/')[1];
186

  
187
      console.log('************* repositoryID: '+ repositoryID);
188

  
189
      if(!route.includes('repositoryAdmin')) {
190
        this.visibleAdminRepo = false;
191
        index = this.reposOfUser.findIndex(x => x.id === repositoryID);
192
        console.log('************* index: '+ index);
193
        if (index > 5)
194
          this.showMoreRepos();
195
      }
196
    }
197

  
179 198
    // let repository: Repository;
180 199
    // this.sharedService.repository$.subscribe(
181 200
    //   r => {
......
195 214
  }
196 215

  
197 216
  showMoreRepos() {
217
    console.log('************* show more repos');
198 218
    this.visibleReposOfUser = Object.assign([], this.reposOfUser);
199 219
    this.allReposVisible = true;
200 220
  }

Also available in: Unified diff