Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
QApplication
} from '@nodegui/nodegui';
import { NgWindow } from '../../../../projects/angular-nodegui/src/lib/components/window';
import * as os from 'os';
@Component({
// tslint:disable-next-line: component-selector
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent implements OnInit {
@ViewChild('window', { static: true }) window: ElementRef;
public aspectRatioMode: AspectRatioMode = AspectRatioMode.KeepAspectRatio;
public date: Date = new Date();
constructor() {}
/**
* Init component and configure window widget
*/
ngOnInit() {
const win = this.window.nativeElement.parent;
win.hide();
win.resize(300, 340);
win.setWindowFlag(WindowType.FramelessWindowHint, true);
win.setWindowFlag(WindowType.Widget, true);
import { NgWindow } from '../../projects/angular-nodegui/src/lib/components/window';
const windowHeight = 480;
const windowWeight = 620;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent implements OnInit {
@ViewChild('window', { static: true }) window: ElementRef;
public name = 'irustm';
public aspectRatioMode = AspectRatioMode.KeepAspectRatio;
constructor(private router: Router) {}
/**
* Init component and configure window widget
*/
ngOnInit(): void {
const win = this.window.nativeElement.parent;
win.resize(windowHeight, windowWeight);
win.setMinimumSize(windowHeight, windowWeight);
}
/**
* Change router
*/
export const WeatherIcon = React.memo(props => {
const iconId = props.icon || "na";
const imageUrl = `${path.resolve(assetUrl, `${iconId}.png`)}`;
return (
<img src="{imageUrl}">
);
});