Add opening explorer to blind mode

pull/9412/head
Albert Ford 2021-07-14 03:42:09 -07:00
parent b3044cb48c
commit c7453237d8
1 changed files with 16 additions and 0 deletions

View File

@ -35,6 +35,7 @@ import * as moveView from '../moveView';
import { bind } from '../util';
import throttle from 'common/throttle';
import { Role } from 'chessground/types';
import explorerView from '../explorer/explorerView';
export const throttled = (sound: string) => throttle(100, () => lichess.sound.play(sound));
@ -87,6 +88,21 @@ lichess.AnalyseNVUI = function (redraw: Redraw) {
},
renderMainline(ctrl.mainline, ctrl.path, style)
),
...(!ctrl.studyPractice
? [
h(
'button',
{
attrs: {
'aria-pressed': `${ctrl.explorer.enabled()}`,
},
hook: bind('click', _ => ctrl.explorer.toggle(), redraw),
},
ctrl.trans.noarg('openingExplorerAndTablebase')
),
explorerView(ctrl),
]
: []),
h('h2', 'Pieces'),
h('div.pieces', renderPieces(ctrl.chessground.state.pieces, style)),
h('h2', 'Current position'),