create all components for new repo page

This commit is contained in:
Ian Minoso 2016-10-28 18:39:34 -04:00
parent 6ae13096c7
commit 8fae92267e
6 changed files with 36 additions and 9 deletions

View file

@ -1,9 +1,19 @@
import * as React from "react";
import * as angular from "angular";
import repoHeader from "./directives/components/component";
import repoHeader from "./directives/components/publicRepo/header";
import repoSidebar from "./directives/components/publicRepo/sidebar";
import repoMain from "./directives/components/publicRepo/main";
angular.module('quayPages').directive('repoHeader', function(reactDirective) {
angular.module('quayPages').directive('rpHeader', function(reactDirective) {
return reactDirective(repoHeader);
});
angular.module('quayPages').directive('rpSidebar', function(reactDirective) {
return reactDirective(repoSidebar);
});
angular.module('quayPages').directive('rpMain', function(reactDirective) {
return reactDirective(repoMain);
});

View file

@ -2,7 +2,7 @@ import * as React from "react";
class repoHeader extends React.Component<{}, {}> {
render () {
return <p> The component for the header</p>;
return <div> The component for the header</div>;
}
}

View file

@ -0,0 +1,10 @@
import * as React from "react";
class main extends React.Component<{}, {}> {
render () {
return <div> The component for the main content</div>;
}
}
export default main;

View file

@ -0,0 +1,10 @@
import * as React from "react";
class repo_sidebar extends React.Component<{}, {}> {
render () {
return <div> The component for the sidebar</div>;
}
}
export default repo_sidebar;

View file

@ -11,11 +11,6 @@
}]);
function RepoViewCtrl($scope, $routeParams, $location, $timeout, ApiService, UserService, AngularPollChannel, ImageLoaderService, CookieService) {
$scope.reactProps = {
firstProp: 'Prop 1',
secondProp: 'Prop 2'
};
$scope.namespace = $routeParams.namespace;
$scope.name = $routeParams.name;

View file

@ -5,7 +5,9 @@
<!-- New Public Repo Page experiment -->
<div ng-if="newRepoExperiment" class="main-panel">
<!-- React Components -->
<repo-header />
<rp-header></rp-header>
<rp-sidebar></rp-sidebar>
<rp-main></rp-main>
</div>
<!-- Old Repo Page -->
<div ng-if="!newRepoExperiment">