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';
@Component({
selector: 'of-app-menu-bar',
selector: 'app-menu-bar',
templateUrl: './app-menu-bar.component.html',
})
export class AppMenuBarComponent implements OnInit {

View File

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

View File

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

View File

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

View File

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

View File

@ -6,6 +6,6 @@ export class AppPage {
}
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-chrome" class="focused">
<of-title-bar></of-title-bar>
<app-title-bar></app-title-bar>
<div id="app-contents">
<router-outlet></router-outlet>
</div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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