Add offline transfer history and mobile app support

This commit is contained in:
yoyuzh
2026-04-02 17:31:28 +08:00
parent 2cdda3c305
commit f02ff9342f
17 changed files with 2600 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { MOBILE_APP_MAX_WIDTH, shouldUseMobileApp } from './app-shell';
test('shouldUseMobileApp enables the mobile shell below the width breakpoint', () => {
assert.equal(shouldUseMobileApp(MOBILE_APP_MAX_WIDTH - 1), true);
assert.equal(shouldUseMobileApp(MOBILE_APP_MAX_WIDTH), false);
assert.equal(shouldUseMobileApp(1280), false);
});

View File

@@ -0,0 +1,5 @@
export const MOBILE_APP_MAX_WIDTH = 768;
export function shouldUseMobileApp(width: number) {
return width < MOBILE_APP_MAX_WIDTH;
}