This commit is contained in:
crusader 2018-08-15 23:54:10 +09:00
parent 8f4d7ec895
commit f770a24a10
15 changed files with 37 additions and 36 deletions

View File

@ -1,3 +0,0 @@
<div id="app-menu-bar" role="menubar" aria-label="Application menu">
</div>

View File

@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'of-app-menu-bar', selector: 'app-menu-bar',
templateUrl: './app-menu-bar.component.html', templateUrl: './app-menu-bar.component.html',
}) })
export class AppMenuBarComponent implements OnInit { export class AppMenuBarComponent implements OnInit {

View File

@ -9,6 +9,10 @@
/> />
</svg> </svg>
<of-app-menu-bar></of-app-menu-bar> <app-menu-bar></app-menu-bar>
<of-window-controls></of-window-controls>
<div class="window-controls">
<app-window-controls></app-window-controls>
</div>
</div> </div>

View File

@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'of-title-bar', selector: 'app-title-bar',
templateUrl: './title-bar.component.html', templateUrl: './title-bar.component.html',
}) })
export class TitleBarComponent implements OnInit { export class TitleBarComponent implements OnInit {

View File

@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { ipcRenderer, remote } from 'electron'; import { ipcRenderer, remote } from 'electron';
@Component({ @Component({
selector: 'of-window-controls', selector: 'app-window-controls',
templateUrl: './window-controls.component.html', templateUrl: './window-controls.component.html',
}) })
export class WindowControlsComponent implements OnInit { export class WindowControlsComponent implements OnInit {

View File

@ -7,7 +7,7 @@
"root": "", "root": "",
"sourceRoot": "src", "sourceRoot": "src",
"projectType": "application", "projectType": "application",
"prefix": "of", "prefix": "app",
"schematics": { "schematics": {
"@schematics/angular:component": { "@schematics/angular:component": {
"styleext": "scss" "styleext": "scss"

View File

@ -6,6 +6,6 @@ export class AppPage {
} }
getParagraphText() { getParagraphText() {
return element(by.css('of-root h1')).getText(); return element(by.css('app-root h1')).getText();
} }
} }

View File

@ -1,6 +1,6 @@
<div id="app-container"> <div id="app-container">
<div id="app-chrome" class="focused"> <div id="app-chrome" class="focused">
<of-title-bar></of-title-bar> <app-title-bar></app-title-bar>
<div id="app-contents"> <div id="app-contents">
<router-outlet></router-outlet> <router-outlet></router-outlet>
</div> </div>

View File

@ -1,7 +1,7 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
@Component({ @Component({
selector: 'of-root', selector: 'app-root',
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'] styleUrls: ['./app.component.scss']
}) })

View File

@ -3,7 +3,7 @@ import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'of-pages-home', selector: 'app-pages-home',
templateUrl: './home-page.component.html', templateUrl: './home-page.component.html',
styleUrls: ['./home-page.component.scss'], styleUrls: ['./home-page.component.scss'],
}) })

View File

@ -11,7 +11,7 @@ enum MenuOrientation {
} }
@Component({ @Component({
selector: 'of-pages', selector: 'app-pages',
templateUrl: './pages.component.html', templateUrl: './pages.component.html',
styleUrls: ['./pages.component.scss'], styleUrls: ['./pages.component.scss'],
}) })

View File

@ -1,16 +1,16 @@
@import '../mixins'; @import '../mixins';
#app { app-root {
// This is just a dummy wrapper needed because react doesn't like // This is just a dummy wrapper needed because react doesn't like
// being installed into <body>, see https://github.com/facebook/react/issues/3207 // being installed into <body>, see https://github.com/facebook/react/issues/3207
&-container { #app-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
// The main react component div // The main react component div
&-chrome { #app-chrome {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -19,7 +19,7 @@
} }
// main non-window chrome wrapper // main non-window chrome wrapper
&-contents { #app-contents {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-grow: 1; flex-grow: 1;

View File

@ -48,7 +48,7 @@
// maximize/restore and close. On macOS the controls are added // maximize/restore and close. On macOS the controls are added
// automatically even for borderless window so we only render // automatically even for borderless window so we only render
// controls on Windows. // controls on Windows.
of-window-controls { .window-controls {
flex-grow: 0; flex-grow: 0;
flex-shrink: 0; flex-shrink: 0;
margin-left: auto; margin-left: auto;

View File

@ -11,7 +11,7 @@
</head> </head>
<body class="platform-win32 theme-light"> <body class="platform-win32 theme-light">
<of-root></of-root> <app-root></app-root>
</body> </body>
</html> </html>

View File

@ -1,17 +1,17 @@
{ {
"extends": "../tslint.json", "extends": "../tslint.json",
"rules": { "rules": {
"directive-selector": [ "directive-selector": [
true, true,
"attribute", "attribute",
"of", "app",
"camelCase" "camelCase"
], ],
"component-selector": [ "component-selector": [
true, true,
"element", "element",
"of", "app",
"kebab-case" "kebab-case"
] ]
} }
} }