diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 8c286b6..768fb91 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -64,12 +64,10 @@ pub fn run() {
#[cfg(target_os = "windows")]
{
+ #![allow(deprecated)]
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle};
use windows::Win32::Foundation::HWND;
- use windows::Win32::UI::WindowsAndMessaging::{
- GetWindowLongPtrW, SetWindowLongPtrW, SetWindowPos, GWL_EXSTYLE, HWND_TOPMOST,
- SWP_NOACTIVATE, WS_EX_NOACTIVATE,
- };
+ use windows::Win32::UI::WindowsAndMessaging::{GetWindowLongPtrW, SetWindowLongPtrW, GWL_EXSTYLE, WS_EX_NOACTIVATE,};
unsafe {
if let Ok(RawWindowHandle::Win32(handle)) = window.raw_window_handle() {
diff --git a/src/app/app.component.html b/src/app/app.component.html
index 9ff4d96..c9d90bc 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -2,27 +2,27 @@
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 26d1cdc..6984f6b 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -21,13 +21,13 @@ import { CircleKeyboardComponent } from './keyboards/circle-keyboard.component';
styleUrl: './app.component.css',
})
export class AppComponent implements OnInit {
- async ngOnInit() {
- const matches = await getMatches();
- console.log(matches);
- }
- greetingMessage = "";
- currentLayout: 'qwerty' | 'dvorak' | 'circle' = 'qwerty';
+ Keyboards = Keyboards;
+ currentLayout: Keyboards = Keyboards.QWERTY;
shiftActive = false;
+ async ngOnInit() {
+
+ const cli = await getMatches();
+ }
@ViewChild('greetInput') inputElement!: ElementRef;
@@ -36,12 +36,12 @@ export class AppComponent implements OnInit {
}
switchLayout(): void {
- if (this.currentLayout == 'qwerty'){
- this.currentLayout = 'dvorak';
- } else if (this.currentLayout == 'dvorak'){
- this.currentLayout = 'circle';
- } else if (this.currentLayout == 'circle'){
- this.currentLayout = 'qwerty';
+ if (this.currentLayout === Keyboards.QWERTY){
+ this.currentLayout = Keyboards.DVORAK;
+ } else if (this.currentLayout === Keyboards.DVORAK){
+ this.currentLayout = Keyboards.CIRCLE;
+ } else if (this.currentLayout === Keyboards.CIRCLE){
+ this.currentLayout = Keyboards.QWERTY;
}
}
@@ -59,3 +59,8 @@ export class AppComponent implements OnInit {
}
}
}
+enum Keyboards{
+ QWERTY,
+ DVORAK,
+ CIRCLE
+}