mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Preact: Fix options menu in !commands
This commit is contained in:
parent
3b0707924d
commit
12f3840ede
|
|
@ -484,7 +484,7 @@ class NewsPanel extends PSRoomPanel {
|
|||
change = (ev: Event) => {
|
||||
const target = ev.currentTarget as HTMLInputElement;
|
||||
if (target.value === '1') {
|
||||
document.cookie = "preactalpha=1; expires=Thu, 1 Jan 2026 12:00:00 UTC; path=/";
|
||||
document.cookie = "preactalpha=1; expires=Thu, 1 May 2026 12:00:00 UTC; path=/";
|
||||
} else {
|
||||
document.cookie = "preactalpha=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -702,6 +702,11 @@ export class PSView extends preact.Component {
|
|||
parentElem: elem,
|
||||
});
|
||||
return true;
|
||||
case 'openOptions':
|
||||
PS.join('options' as RoomID, {
|
||||
parentElem: elem,
|
||||
});
|
||||
return true;
|
||||
case 'showOtherFormats': {
|
||||
// TODO: refactor to a command after we drop support for the old client
|
||||
const table = elem.closest('table');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user