This repository was archived by the owner on May 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-11
lines changed
Expand file tree Collapse file tree 2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,17 @@ export const getClickHandler = (plugin: ALxFolderNote) => {
99 return async ( item : FolderItem , evt : MouseEvent ) : Promise < boolean > => {
1010 if (
1111 ! item ||
12+ ( Platform . isMobile && ! plugin . settings . mobileClickToOpen ) ||
13+ // allow folder shift selection to work
14+ evt . shiftKey ||
15+ // allow collapse indicator to work
1216 item . collapseIndicatorEl === evt . target ||
1317 item . collapseIndicatorEl . contains ( evt . target as Node ) ||
14- item . fileExplorer . fileBeingRenamed === item . file ||
15- ( Platform . isMobile && ! plugin . settings . mobileClickToOpen )
18+ // ignore file being renamed
19+ item . fileExplorer . fileBeingRenamed === item . file
1620 )
1721 return false ;
18- // check if dblclick is triggered
22+
1923 if ( evt . type === "auxclick" && evt . button !== 1 ) return false ;
2024
2125 // get the folder path
Original file line number Diff line number Diff line change @@ -182,28 +182,29 @@ export class ALxFolderNoteSettingTab extends PluginSettingTab {
182182 . setName ( "Modifier for New Note" )
183183 . setDesc ( "Choose a modifier to click folders with to create folder notes" )
184184 . addDropdown ( ( dropDown ) => {
185- const windowsOpts : Record < Modifier , string > = {
185+ type NoShift = Exclude < Modifier , "Shift" > ;
186+ const windowsOpts : Record < NoShift , string > = {
186187 Mod : "Ctrl (Cmd in macOS)" ,
187188 Ctrl : "Ctrl (Ctrl in macOS)" ,
188189 Meta : "⊞ Win" ,
189- Shift : "Shift" ,
190+ // Shift: "Shift",
190191 Alt : "Alt" ,
191192 } ;
192- const macOSOpts : Record < Modifier , string > = {
193- Mod : "⌘ Cmd (Ctrl)" ,
193+ const macOSOpts : Record < NoShift , string > = {
194+ Mod : "⌘ Cmd (Ctrl in Windows )" ,
194195 Ctrl : "⌃ Control" ,
195- Meta : "⌘ Cmd (Win)" ,
196- Shift : "⇧ Shift" ,
196+ Meta : "⌘ Cmd (Win in Windows )" ,
197+ // Shift: "⇧ Shift",
197198 Alt : "⌥ Option" ,
198199 } ;
199200
200201 const options = Platform . isMacOS ? macOSOpts : windowsOpts ;
201202
202203 dropDown
203204 . addOptions ( options )
204- . setValue ( this . plugin . settings . modifierForNewNote . toString ( ) )
205+ . setValue ( this . plugin . settings . modifierForNewNote )
205206 . onChange ( async ( value : string ) => {
206- this . plugin . settings . modifierForNewNote = value as Modifier ;
207+ this . plugin . settings . modifierForNewNote = value as NoShift ;
207208 await this . plugin . saveSettings ( ) ;
208209 } ) ;
209210 } ) ;
You can’t perform that action at this time.
0 commit comments