create all components for new repo page
This commit is contained in:
parent
6ae13096c7
commit
8fae92267e
6 changed files with 36 additions and 9 deletions
|
@ -1,9 +1,19 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as angular from "angular";
|
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);
|
return reactDirective(repoHeader);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
angular.module('quayPages').directive('rpSidebar', function(reactDirective) {
|
||||||
|
return reactDirective(repoSidebar);
|
||||||
|
});
|
||||||
|
|
||||||
|
angular.module('quayPages').directive('rpMain', function(reactDirective) {
|
||||||
|
return reactDirective(repoMain);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import * as React from "react";
|
||||||
|
|
||||||
class repoHeader extends React.Component<{}, {}> {
|
class repoHeader extends React.Component<{}, {}> {
|
||||||
render () {
|
render () {
|
||||||
return <p> The component for the header</p>;
|
return <div> The component for the header</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
10
static/js/directives/components/publicRepo/main.tsx
Normal file
10
static/js/directives/components/publicRepo/main.tsx
Normal 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;
|
||||||
|
|
10
static/js/directives/components/publicRepo/sidebar.tsx
Normal file
10
static/js/directives/components/publicRepo/sidebar.tsx
Normal 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;
|
||||||
|
|
|
@ -11,11 +11,6 @@
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
function RepoViewCtrl($scope, $routeParams, $location, $timeout, ApiService, UserService, AngularPollChannel, ImageLoaderService, CookieService) {
|
function RepoViewCtrl($scope, $routeParams, $location, $timeout, ApiService, UserService, AngularPollChannel, ImageLoaderService, CookieService) {
|
||||||
$scope.reactProps = {
|
|
||||||
firstProp: 'Prop 1',
|
|
||||||
secondProp: 'Prop 2'
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.namespace = $routeParams.namespace;
|
$scope.namespace = $routeParams.namespace;
|
||||||
$scope.name = $routeParams.name;
|
$scope.name = $routeParams.name;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
<!-- New Public Repo Page experiment -->
|
<!-- New Public Repo Page experiment -->
|
||||||
<div ng-if="newRepoExperiment" class="main-panel">
|
<div ng-if="newRepoExperiment" class="main-panel">
|
||||||
<!-- React Components -->
|
<!-- React Components -->
|
||||||
<repo-header />
|
<rp-header></rp-header>
|
||||||
|
<rp-sidebar></rp-sidebar>
|
||||||
|
<rp-main></rp-main>
|
||||||
</div>
|
</div>
|
||||||
<!-- Old Repo Page -->
|
<!-- Old Repo Page -->
|
||||||
<div ng-if="!newRepoExperiment">
|
<div ng-if="!newRepoExperiment">
|
||||||
|
|
Reference in a new issue