forked from Blendman974/faceclaw
Use animated menus in a bunch more places
This commit is contained in:
1 parent
123c1142d6
commit
71c1971992
37 files changed
+1457
-1005
No files matched your search
@@ -3,6 +3,7 @@ const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
const vm = require('node:vm');
|
||||
const ts = require('typescript');
|
||||
const { Menu } = require('../.test-build/app/ui/menu-core.js');
|
||||
function load(file, context) {
|
||||
const sandbox = { exports: {}, ...context };
|
||||
vm.runInNewContext(ts.transpileModule(fs.readFileSync(file, 'utf8'), {
|
||||
@@ -23,7 +24,9 @@ test('iOS Type Into App submits UTF-8 terminal text and delays Enter at the byte
|
||||
client.handleMessage(JSON.stringify({ type: 'connect', command: 'test' }));
|
||||
const { VoiceInputLayer } = load('app/ui/shell/voice-input.ts', {
|
||||
require: id => id.includes('voice-control') ? { voiceControlBridge: { stop() {} } }
|
||||
: id.includes('dashboard-settings') ? { anthropicApiKeySetting: { get: () => '' } } : {},
|
||||
: id.includes('dashboard-settings') ? { anthropicApiKeySetting: { get: () => '' } }
|
||||
: id.includes('input-dialog') ? { createInputDialogMenu: (items, selectedIndex) =>
|
||||
new Menu({ items, selectedIndex, wrap: true, getHeight: () => 1, draw() {} }) } : {},
|
||||
global: { isIOS: true },
|
||||
});
|
||||
for (const text of ['hello terminal', 'café π 🔋', 'line one\n第二行', '']) {
|
||||
|
||||
Reference in new issue
Block a user