forked from Blendman974/faceclaw
Move and rename DashboardInputEvent->InputEvent
This commit is contained in:
1 parent
3e8be93833
commit
80d688dd4e
51 files changed
+299
-361
No files matched your search
@@ -1,7 +1,8 @@
|
||||
import { getDefaultSmallFont } from "../../graphics/ui-fonts";
|
||||
import { GrayImage } from "../../graphics/image";
|
||||
import { truncateText } from "../../graphics/textwrap";
|
||||
import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../../ui/layers";
|
||||
import { type InputEvent } from "../../ui/gestures";
|
||||
import { Layer, type LayerContext, type PaintBelow } from "../../ui/layers";
|
||||
import { drawSelectionHighlight } from "../../ui/menu";
|
||||
import { LIST_ROW_TEXT_INSET, lineStep, listRowHeight } from "../../ui/metrics";
|
||||
|
||||
@@ -79,7 +80,7 @@ export class EvenHubApiKeyDialogLayer implements Layer {
|
||||
return image;
|
||||
}
|
||||
|
||||
handleInput(event: DashboardInputEvent, ctx: LayerContext): void {
|
||||
handleInput(event: InputEvent, ctx: LayerContext): void {
|
||||
switch (event.type) {
|
||||
case "scroll-up":
|
||||
case "scroll-down":
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
*/
|
||||
import { GrayImage } from "../../graphics/image";
|
||||
import { EVENHUB_SCREEN_WIDTH } from "./compositor";
|
||||
import { type DashboardInputEvent, type Layer, type LayerContext } from "../../ui/layers";
|
||||
import { type InputEvent } from "../../ui/gestures";
|
||||
import { type Layer, type LayerContext } from "../../ui/layers";
|
||||
import {
|
||||
createInProcessWindow,
|
||||
type InProcessAppOptions,
|
||||
@@ -33,7 +34,7 @@ class EvenHubAppLayer implements Layer {
|
||||
return this.session.paint(size, ctx.stack.isFocused());
|
||||
}
|
||||
|
||||
handleInput(event: DashboardInputEvent): void {
|
||||
handleInput(event: InputEvent): void {
|
||||
// Everything goes to the app; long-press never reaches here (the window
|
||||
// menu intercepts it), which is the guaranteed way out since EvenHub
|
||||
// apps own double-click.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { getDefaultSmallFont } from "../../graphics/ui-fonts";
|
||||
import { GrayImage } from "../../graphics/image";
|
||||
import { truncateText } from "../../graphics/textwrap";
|
||||
import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../../ui/layers";
|
||||
import { type InputEvent } from "../../ui/gestures";
|
||||
import { Layer, type LayerContext, type PaintBelow } from "../../ui/layers";
|
||||
import { drawSelectionHighlight } from "../../ui/menu";
|
||||
import { permissionDetail, permissionLabel, type EvenHubPermission } from "./permissions";
|
||||
import { openPrivacyPolicyOnPhone } from "./privacy-policy";
|
||||
@@ -89,7 +90,7 @@ export class EvenHubPermissionDialogLayer implements Layer {
|
||||
return image;
|
||||
}
|
||||
|
||||
handleInput(event: DashboardInputEvent, ctx: LayerContext): void {
|
||||
handleInput(event: InputEvent, ctx: LayerContext): void {
|
||||
const actions = this.actions();
|
||||
switch (event.type) {
|
||||
case "scroll-up":
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
import { ApplicationSettings } from "@nativescript/core";
|
||||
import { GrayImage } from "../../graphics/image";
|
||||
import { EvenHubFont } from "../../graphics/evenhub-font";
|
||||
import { type DashboardInputEvent, type InputSource, type Layer } from "../../ui/layers";
|
||||
import { type InputEvent, type InputSource } from "../../ui/gestures";
|
||||
import { type Layer } from "../../ui/layers";
|
||||
import {
|
||||
anthropicApiKeySetting,
|
||||
elevenLabsApiKeySetting,
|
||||
@@ -425,7 +426,7 @@ export class EvenHubSession implements EvenHubMicClient, EvenHubImuClient, EvenH
|
||||
* fields elided the way protobuf JSON elides them; list selection moves
|
||||
* locally with events only for clicks and boundary scrolls.
|
||||
*/
|
||||
handleGesture(event: DashboardInputEvent): void {
|
||||
handleGesture(event: InputEvent): void {
|
||||
if (!this.page) return;
|
||||
const capture = this.page ? eventCaptureContainer(this.page) : undefined;
|
||||
switch (event.type) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { getDefaultSmallFont } from "../../graphics/ui-fonts";
|
||||
import { GrayImage } from "../../graphics/image";
|
||||
import { truncateText, wrapText } from "../../graphics/textwrap";
|
||||
import { type DashboardInputEvent, type Layer, type LayerContext } from "../../ui/layers";
|
||||
import { type InputEvent } from "../../ui/gestures";
|
||||
import { type Layer, type LayerContext } from "../../ui/layers";
|
||||
import { drawSelectionHighlight } from "../../ui/menu";
|
||||
import { TextViewerLayer } from "../files/text-viewer";
|
||||
import { evenHubApi, type EvenHubStoreApp } from "./even-api";
|
||||
@@ -109,7 +110,7 @@ export class EvenHubStoreDetailLayer implements Layer {
|
||||
return image;
|
||||
}
|
||||
|
||||
async handleInput(event: DashboardInputEvent, ctx: LayerContext): Promise<void> {
|
||||
async handleInput(event: InputEvent, ctx: LayerContext): Promise<void> {
|
||||
if (event.type === "double-click") {
|
||||
if (!this.working) ctx.stack.pop();
|
||||
return;
|
||||
|
||||
@@ -2,30 +2,12 @@ import { getDefaultSmallFont } from "../../graphics/ui-fonts";
|
||||
import { GrayImage, type UiFont } from "../../graphics/image";
|
||||
import { truncateText, wrapText } from "../../graphics/textwrap";
|
||||
import { clamp } from "../../util/numeric-util";
|
||||
import { GESTURE_CLICK } from "../../ui/gestures";
|
||||
import { type DashboardInputEvent, type Layer, type LayerActions, type LayerContext } from "../../ui/layers";
|
||||
import {
|
||||
drawListScrollbar,
|
||||
drawSelectionHighlight,
|
||||
scrollToKeepSelectionVisible,
|
||||
type MenuItem,
|
||||
} from "../../ui/menu";
|
||||
import { GESTURE_CLICK, type InputEvent } from "../../ui/gestures";
|
||||
import { type Layer, type LayerActions, type LayerContext } from "../../ui/layers";
|
||||
import { drawListScrollbar, drawSelectionHighlight, scrollToKeepSelectionVisible, type MenuItem } from "../../ui/menu";
|
||||
import { shell } from "../../ui/shell/shell";
|
||||
import {
|
||||
evenHubApi,
|
||||
EvenHubAuthenticationError,
|
||||
isEvenHubStoreConfigured,
|
||||
type EvenHubStoreApp,
|
||||
} from "./even-api";
|
||||
import {
|
||||
clearEvenHubLoginForm,
|
||||
clearEvenHubSession,
|
||||
clearTransientEvenHubSession,
|
||||
evenHubLoginEmailSetting,
|
||||
evenHubLoginPasswordSetting,
|
||||
evenHubRememberMeSetting,
|
||||
resetEvenHubLoginForm,
|
||||
} from "./credentials";
|
||||
import { evenHubApi, EvenHubAuthenticationError, isEvenHubStoreConfigured, type EvenHubStoreApp } from "./even-api";
|
||||
import { clearEvenHubLoginForm, clearEvenHubSession, clearTransientEvenHubSession, evenHubLoginEmailSetting, evenHubLoginPasswordSetting, evenHubRememberMeSetting, resetEvenHubLoginForm } from "./credentials";
|
||||
import { EvenHubStoreDetailLayer } from "./store-detail-layer";
|
||||
import { lineStep } from "../../ui/metrics";
|
||||
|
||||
@@ -122,7 +104,7 @@ export class EvenHubStoreLayer implements Layer {
|
||||
return image;
|
||||
}
|
||||
|
||||
async handleInput(event: DashboardInputEvent, ctx: LayerContext): Promise<void> {
|
||||
async handleInput(event: InputEvent, ctx: LayerContext): Promise<void> {
|
||||
if (this.showingLogin) {
|
||||
if (event.type === "click" && !this.loading) {
|
||||
this.openCredentialEditor(ctx);
|
||||
|
||||
Reference in new issue
Block a user