editor-refactor #18
@ -12,6 +12,7 @@ import {OptionMenuComponent} from './components/option-menu/option-menu.componen
|
|||||||
import {SelectorComponent} from './components/sharing/selector/selector.component';
|
import {SelectorComponent} from './components/sharing/selector/selector.component';
|
||||||
import {SessionService} from './service/session.service';
|
import {SessionService} from './service/session.service';
|
||||||
import {SearchComponent} from './components/search/Search.component';
|
import {SearchComponent} from './components/search/Search.component';
|
||||||
|
import {NodeTypeIcons} from './structures/node-types';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@ -64,13 +65,7 @@ export class AppComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public typeIcons = {
|
public typeIcons = NodeTypeIcons;
|
||||||
branch: 'fa fa-folder',
|
|
||||||
node: 'fa fa-quote-left',
|
|
||||||
page: 'fa fa-sticky-note',
|
|
||||||
db: 'fa fa-database',
|
|
||||||
code: 'fa fa-code',
|
|
||||||
};
|
|
||||||
|
|
||||||
public get appName(): string {
|
public get appName(): string {
|
||||||
return this.session.appName || 'Noded';
|
return this.session.appName || 'Noded';
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import {PopoverController} from '@ionic/angular';
|
import {PopoverController} from '@ionic/angular';
|
||||||
|
import {NodeTypeIcons} from '../../../structures/node-types';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'editor-node-picker',
|
selector: 'editor-node-picker',
|
||||||
@ -8,14 +9,7 @@ import {PopoverController} from '@ionic/angular';
|
|||||||
})
|
})
|
||||||
export class NodePickerComponent implements OnInit {
|
export class NodePickerComponent implements OnInit {
|
||||||
|
|
||||||
public typeIcons = {
|
public typeIcons = NodeTypeIcons;
|
||||||
branch: 'fa fa-folder',
|
|
||||||
node: 'fa fa-quote-left',
|
|
||||||
norm: 'fa fa-quote-left',
|
|
||||||
page: 'fa fa-sticky-note',
|
|
||||||
db: 'fa fa-database',
|
|
||||||
code: 'fa fa-code',
|
|
||||||
};
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private popover: PopoverController,
|
private popover: PopoverController,
|
||||||
|
@ -3,6 +3,7 @@ import {IonInput, ModalController} from '@ionic/angular';
|
|||||||
import {ApiService} from '../../service/api.service';
|
import {ApiService} from '../../service/api.service';
|
||||||
import {BehaviorSubject} from 'rxjs';
|
import {BehaviorSubject} from 'rxjs';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
|
import {NodeTypeIcons} from '../../structures/node-types';
|
||||||
|
|
||||||
export interface SearchResult {
|
export interface SearchResult {
|
||||||
title: string;
|
title: string;
|
||||||
@ -26,12 +27,7 @@ export class SearchComponent implements OnInit {
|
|||||||
@Input() query = '';
|
@Input() query = '';
|
||||||
public results: BehaviorSubject<SearchResult[]> = new BehaviorSubject<SearchResult[]>([]);
|
public results: BehaviorSubject<SearchResult[]> = new BehaviorSubject<SearchResult[]>([]);
|
||||||
|
|
||||||
public typeIcons = {
|
public typeIcons = NodeTypeIcons;
|
||||||
node: 'fa fa-quote-left',
|
|
||||||
page: 'fa fa-sticky-note',
|
|
||||||
db: 'fa fa-database',
|
|
||||||
code: 'fa fa-code',
|
|
||||||
};
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected modal: ModalController,
|
protected modal: ModalController,
|
||||||
|
@ -7,6 +7,7 @@ import {LoadingController, PopoverController} from '@ionic/angular';
|
|||||||
import {NodePickerComponent} from '../../components/editor/node-picker/node-picker.component';
|
import {NodePickerComponent} from '../../components/editor/node-picker/node-picker.component';
|
||||||
import {HostOptionsComponent} from '../../components/editor/host-options/host-options.component';
|
import {HostOptionsComponent} from '../../components/editor/host-options/host-options.component';
|
||||||
import {EditorService} from '../../service/editor.service';
|
import {EditorService} from '../../service/editor.service';
|
||||||
|
import {NodeTypeIcons} from '../../structures/node-types';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-editor',
|
selector: 'app-editor',
|
||||||
@ -17,16 +18,7 @@ export class EditorPage implements OnInit {
|
|||||||
// @ViewChildren('editorHosts') editorHosts;
|
// @ViewChildren('editorHosts') editorHosts;
|
||||||
// @ViewChild('titleBar') titleBar;
|
// @ViewChild('titleBar') titleBar;
|
||||||
|
|
||||||
public typeIcons = {
|
public typeIcons = NodeTypeIcons;
|
||||||
branch: 'fa fa-folder',
|
|
||||||
node: 'fa fa-quote-left',
|
|
||||||
norm: 'fa fa-quote-left',
|
|
||||||
page: 'fa fa-sticky-note',
|
|
||||||
db: 'fa fa-database',
|
|
||||||
database_ref: 'fa fa-database',
|
|
||||||
code: 'fa fa-code',
|
|
||||||
code_ref: 'fa fa-code',
|
|
||||||
};
|
|
||||||
|
|
||||||
@Input() pageId: string;
|
@Input() pageId: string;
|
||||||
public pageName = '';
|
public pageName = '';
|
||||||
|
10
src/app/structures/node-types.ts
Normal file
10
src/app/structures/node-types.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export const NodeTypeIcons = {
|
||||||
|
branch: 'fa fa-folder',
|
||||||
|
node: 'fa fa-quote-left',
|
||||||
|
norm: 'fa fa-quote-left',
|
||||||
|
page: 'fa fa-sticky-note',
|
||||||
|
db: 'fa fa-database',
|
||||||
|
database_ref: 'fa fa-database',
|
||||||
|
code: 'fa fa-code',
|
||||||
|
code_ref: 'fa fa-code',
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user