File tree Expand file tree Collapse file tree 6 files changed +12
-9
lines changed Expand file tree Collapse file tree 6 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ function AvailableActionsList() {
9494 < td > { actionGroup . title } :</ td >
9595 { actionGroup . actions . map ( ( { actionName, actionTitle } ) =>
9696 < Button
97- small text = { actionTitle }
97+ size = "small"
98+ text = { actionTitle }
9899 onClick = { ( ) => bulk_action . addAction ( "_bulkAction" , actionName ) }
99100 />
100101 ) }
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ function RecentChangesDialogComponent() {
5757 header = {
5858 < Button
5959 text = { t ( "recent_changes.erase_notes_button" ) }
60- small style = { { padding : "0 10px" } }
60+ size = "small"
61+ style = { { padding : "0 10px" } }
6162 onClick = { ( ) => {
6263 server . post ( "notes/erase-deleted-notes-now" ) . then ( ( ) => {
6364 setNeedsRefresh ( true ) ;
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ function RevisionsDialogComponent() {
5555 helpPageId = "vZWERwf8U3nx"
5656 bodyStyle = { { display : "flex" , height : "80vh" } }
5757 header = {
58- ( ! ! revisions ?. length && < Button text = { t ( "revisions.delete_all_revisions" ) } small style = { { padding : "0 10px" } }
58+ ( ! ! revisions ?. length && < Button text = { t ( "revisions.delete_all_revisions" ) } size = " small" style = { { padding : "0 10px" } }
5959 onClick = { async ( ) => {
6060 const text = t ( "revisions.confirm_delete_all" ) ;
6161
Original file line number Diff line number Diff line change 11import type { InputHTMLAttributes , RefObject } from "preact/compat" ;
22
3- interface FormTextBoxProps extends Omit < InputHTMLAttributes < HTMLInputElement > , "onChange" | "value" > {
3+ interface FormTextBoxProps extends Omit < InputHTMLAttributes < HTMLInputElement > , "onChange" | "onBlur" | " value"> {
44 id ?: string ;
55 currentValue ?: string ;
66 onChange ?( newValue : string , validity : ValidityState ) : void ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export default function ShortcutSettings() {
2727 return ;
2828 }
2929
30- let updatedShortcuts : KeyboardShortcut [ ] = null ;
30+ let updatedShortcuts : ( KeyboardShortcut [ ] | null ) = null ;
3131
3232 for ( const optionName of optionNames ) {
3333 if ( ! ( optionName . startsWith ( "keyboardShortcuts" ) ) ) {
@@ -58,12 +58,13 @@ export default function ShortcutSettings() {
5858
5959 const optionsToSet : Record < string , string > = { } ;
6060 for ( const keyboardShortcut of keyboardShortcuts ) {
61- if ( ! ( "effectiveShortcuts" in keyboardShortcut ) ) {
61+ if ( ! ( "effectiveShortcuts" in keyboardShortcut ) || ! keyboardShortcut . effectiveShortcuts ) {
6262 continue ;
6363 }
6464
65- if ( ! arrayEqual ( keyboardShortcut . effectiveShortcuts , keyboardShortcut . defaultShortcuts ) ) {
66- optionsToSet [ getOptionName ( keyboardShortcut . actionName ) ] = JSON . stringify ( keyboardShortcut . defaultShortcuts ) ;
65+ const defaultShortcuts = keyboardShortcut . defaultShortcuts ?? [ ] ;
66+ if ( ! arrayEqual ( keyboardShortcut . effectiveShortcuts , defaultShortcuts ) ) {
67+ optionsToSet [ getOptionName ( keyboardShortcut . actionName ) ] = JSON . stringify ( defaultShortcuts ) ;
6768 }
6869 }
6970 options . saveMany ( optionsToSet ) ;
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ export function SyncTest() {
8383 onClick = { async ( ) => {
8484 const result = await server . post < SyncTestResponse > ( "sync/test" ) ;
8585
86- if ( result . success ) {
86+ if ( result . success && result . message ) {
8787 toast . showMessage ( result . message ) ;
8888 } else {
8989 toast . showError ( t ( "sync_2.handshake_failed" , { message : result . message } ) ) ;
You can’t perform that action at this time.
0 commit comments