Skip to content

Commit

Permalink
Fix the way sass files are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Jul 29, 2016
1 parent b3c5e1a commit e8ce19b
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#### Fixes
* Fix devtools opening when using full-screen shortcut.
* Disable text selection in settings menu.
* Fix canvas positioning to allow laying multiple canvases.


### v1.0.0-alpha.1 (2016-07-25)
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# SKQW

![SKQW Logo](src/assets/images/logo.png)

A native desktop audio visualizer, built with Electron and Angular 2.
Expand Down
5 changes: 3 additions & 2 deletions src/render/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, ChangeDetectorRef, ViewChild, HostListener} from '@angular/core';
import {Component, ChangeDetectorRef, ViewChild, HostListener, ViewEncapsulation} from '@angular/core';
import {
START_ANALYZER, SAMPLE, REQUEST_DEVICE_LIST, RECEIVE_DEVICE_LIST, SET_INPUT_DEVICE_ID,
SET_GAIN, TOGGLE_NORMALIZATION, MAX_GAIN, MIN_GAIN, TOGGLE_FULLSCREEN, TOGGLE_DEVTOOLS
Expand All @@ -16,11 +16,12 @@ const {app, dialog} = require('electron').remote;
const path = require('path');
const storage = require('electron-json-storage');

require('./styles/app.scss');
require('style!./styles/app.scss');

@Component({
selector: 'app',
template: require('./app.component.html'),
encapsulation: ViewEncapsulation.None,
directives: [Visualizer, SettingsPanel, VSelector, Notification]
})
export class App {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {MAX_GAIN, MIN_GAIN} from '../../../common/constants';
@Component({
selector: 'gain-selector',
template: require('./gain-selector.component.html'),
styles: [`:host { display: block; }`, require('./gain-selector.scss').toString()]
styles: [require('./gain-selector.scss')]
})
export class GainSelector {
@Input() state: IState;
Expand Down
4 changes: 1 addition & 3 deletions src/render/components/gain-selector/gain-selector.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
.gain-selector-container {

}
:host { display: block; }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Component, Input, EventEmitter, Output} from '@angular/core';
@Component({
selector: 'library-path-selector',
template: require('./library-path-selector.component.html'),
styles: [`:host { position: relative; }`, require('./library-path-selector.scss').toString()]
styles: [require('./library-path-selector.scss')]
})
export class LibraryPathSelector {
@Input() library: { id: number; name: string; }[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
:host {
position: relative;
}

.none-found {
color: #af211a !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {NotificationService} from '../../providers/notification.service';
@Component({
selector: 'notification',
template: `<div class="notification-message" [class.visible]="visible">{{ message }}</div>`,
styles: [require('./notification.scss').toString()]
styles: [require('./notification.scss')]
})
export class Notification {
private visible: boolean = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {IParameter, IParamUpdate} from '../../../common/models';
@Component({
selector: 'parameter-controls',
template: require('./parameter-controls.component.html'),
styles: [`:host { display: block; }`, require('./parameter-controls.scss').toString()]
styles: [require('./parameter-controls.scss')]
})
export class ParameterControls {
@Input() params: { [name: string]: IParameter };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
:host { display: block; }
.parameter-controls {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Component, ElementRef, Input, ViewChild} from '@angular/core';
@Component({
selector: 'settings-group',
template: require('./settings-group.component.html'),
styles: [require('./settings-group.scss').toString()]
styles: [require('./settings-group.scss')]
})

export class SettingsGroup {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ declare var VERSION: string;
@Component({
selector: 'settings-panel',
template: require('./settings-panel.component.html'),
styles: [require('./settings-panel.scss').toString()],
styles: [require('./settings-panel.scss')],
directives: [VSelector, InputSelector, GainSelector, ParameterControls, LibraryPathSelector, SettingsGroup]
})
export class SettingsPanel {
Expand Down
2 changes: 1 addition & 1 deletion src/render/components/v-selector/v-selector.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {NotificationService} from '../../providers/notification.service';
@Component({
selector: 'v-selector',
template: require('./v-selector.component.html'),
styles: [require('./v-selector.scss').toString()],
styles: [require('./v-selector.scss')],
directives: []
})
export class VSelector {
Expand Down
9 changes: 1 addition & 8 deletions src/render/components/visualizer/visualizer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ export interface IDimensions {
@Component({
selector: 'visualizer',
template: ``,
styles: [`:host {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
`]
styles: [require('./visualizer.scss')]
})
export class Visualizer {

Expand Down
17 changes: 17 additions & 0 deletions src/render/components/visualizer/visualizer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:host {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;

/deep/ canvas {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}


2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module.exports = [
{test: /\.css$/, loader: 'raw'},

// all css required in src/app files will be merged in js files
{test: /\.s[ac]ss$/, loader: 'style!css!sass'},
{test: /\.s[ac]ss$/, loader: 'raw!sass'},

// support for .html as raw text
// todo: change the loader to something that adds a hash to images
Expand Down

0 comments on commit e8ce19b

Please sign in to comment.