mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-05 02:39:26 +02:00
feat(adb): add power related api
This commit is contained in:
parent
1ea248d57e
commit
45d784c8a5
19 changed files with 196 additions and 106 deletions
|
@ -3,7 +3,7 @@ import { AdbPacketInit, decodeUtf8 } from '@yume-chan/adb';
|
|||
import { DisposableList } from '@yume-chan/event';
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
||||
import { global, logger } from "../state";
|
||||
import { globalState, logger } from "../state";
|
||||
import { Icons, withDisplayName } from '../utils';
|
||||
import { CommandBar } from './command-bar';
|
||||
|
||||
|
@ -57,10 +57,10 @@ const LogLine = withDisplayName('LoggerLine')(({ packet }: { packet: [string, Ad
|
|||
export const ToggleLogView = observer(() => {
|
||||
return (
|
||||
<IconButton
|
||||
checked={global.logVisible}
|
||||
checked={globalState.logVisible}
|
||||
iconProps={{ iconName: Icons.TextGrammarError }}
|
||||
title="Toggle Log"
|
||||
onClick={global.toggleLog}
|
||||
onClick={globalState.toggleLog}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
@ -142,7 +142,7 @@ export const LogView = observer(({
|
|||
classNames['logger-container'],
|
||||
), [className]);
|
||||
|
||||
if (!global.logVisible) {
|
||||
if (!globalState.logVisible) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue