chore: remove demo
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
use enigo::{Direction, Enigo, Key, Keyboard, Settings};
|
use enigo::{Direction, Enigo, Key, Keyboard, Settings};
|
||||||
|
use tauri::Manager;
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use tauri::Manager;
|
|
||||||
|
|
||||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
<main class="container">
|
<main class="container">
|
||||||
<form class="row" (submit)="greet($event, greetInput.value)">
|
|
||||||
<input #greetInput id="greet-input" placeholder="Enter a name..." />
|
|
||||||
<button type="submit">Greet</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<p>{{ greetingMessage }}</p>
|
|
||||||
|
|
||||||
<!-- Layout Switcher -->
|
<!-- Layout Switcher -->
|
||||||
<div class="layout-controls">
|
<div class="layout-controls">
|
||||||
<button (click)="switchLayout()" class="layout-button">
|
<button (click)="switchLayout()" class="layout-button">
|
||||||
|
|||||||
@@ -19,24 +19,13 @@ import { CircleKeyboardComponent } from './keyboards/circle-keyboard.component';
|
|||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrl: './app.component.css'
|
styleUrl: './app.component.css'
|
||||||
})
|
})
|
||||||
export class AppComponent implements AfterViewInit {
|
export class AppComponent {
|
||||||
greetingMessage = "";
|
greetingMessage = "";
|
||||||
currentLayout: 'qwerty' | 'dvorak' | 'circle' = 'qwerty';
|
currentLayout: 'qwerty' | 'dvorak' | 'circle' = 'qwerty';
|
||||||
shiftActive = false;
|
shiftActive = false;
|
||||||
|
|
||||||
@ViewChild('greetInput') inputElement!: ElementRef;
|
@ViewChild('greetInput') inputElement!: ElementRef;
|
||||||
|
|
||||||
ngAfterViewInit() {
|
|
||||||
this.inputElement.nativeElement.focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
greet(event: SubmitEvent, name: string): void {
|
|
||||||
event.preventDefault();
|
|
||||||
invoke<string>("greet", { name }).then((text) => {
|
|
||||||
this.greetingMessage = text;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
toggleShift(): void {
|
toggleShift(): void {
|
||||||
this.shiftActive = !this.shiftActive;
|
this.shiftActive = !this.shiftActive;
|
||||||
}
|
}
|
||||||
@@ -52,7 +41,6 @@ export class AppComponent implements AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async handleKeyPress(key: string): Promise<void> {
|
async handleKeyPress(key: string): Promise<void> {
|
||||||
this.inputElement.nativeElement.focus();
|
|
||||||
|
|
||||||
let finalKey = key;
|
let finalKey = key;
|
||||||
if (key.length === 1) {
|
if (key.length === 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user