@@ -14,7 +14,7 @@ export class SettingsTab extends PluginSettingTab {
14
14
const { containerEl } = this ;
15
15
containerEl . empty ( ) ;
16
16
17
- // General settings
17
+ // General
18
18
new Setting ( containerEl )
19
19
. setName ( "Remember last Canvas" )
20
20
. setDesc (
@@ -31,7 +31,7 @@ export class SettingsTab extends PluginSettingTab {
31
31
} ) ,
32
32
) ;
33
33
34
- // Open task settings
34
+ // Open task
35
35
new Setting ( containerEl )
36
36
. setName ( "Open task" )
37
37
. setDesc (
@@ -70,7 +70,7 @@ export class SettingsTab extends PluginSettingTab {
70
70
) ;
71
71
}
72
72
73
- // Block ID settings
73
+ // Block ID
74
74
new Setting ( containerEl )
75
75
. setName ( "Block ID" )
76
76
. setDesc (
@@ -112,7 +112,7 @@ export class SettingsTab extends PluginSettingTab {
112
112
) ;
113
113
}
114
114
115
- // Link timestamp settings
115
+ // Link timestamp
116
116
new Setting ( containerEl )
117
117
. setName ( "Link timestamp" )
118
118
. setDesc (
@@ -155,15 +155,15 @@ export class SettingsTab extends PluginSettingTab {
155
155
} ) ;
156
156
}
157
157
158
- // Canvas node size settings
158
+ // Canvas node size
159
159
new Setting ( containerEl )
160
160
. setName ( "Canvas node size" )
161
161
. setDesc (
162
162
"Customize the dimensions of nodes created in Canvas files. Default sizes are 400×100 for links, 400×200 for content, and 400×400 for note content." ,
163
163
)
164
164
. setHeading ( ) ;
165
165
166
- // Link and block link node size settings
166
+ // Link and block link node size
167
167
new Setting ( containerEl )
168
168
. setName ( "Link nodes (note links and block links)" )
169
169
. setDesc ( "Configure size settings for note links and block links" ) ;
@@ -198,7 +198,7 @@ export class SettingsTab extends PluginSettingTab {
198
198
} ) ,
199
199
) ;
200
200
201
- // Content node size settings (block embeds and plain text)
201
+ // Content node size (block embeds and plain text)
202
202
new Setting ( containerEl )
203
203
. setName ( "Content nodes (block embeds and plain text)" )
204
204
. setDesc ( "Configure size settings for block embeds and plain text" ) ;
@@ -233,7 +233,7 @@ export class SettingsTab extends PluginSettingTab {
233
233
} ) ,
234
234
) ;
235
235
236
- // File node size settings (note content)
236
+ // File node size (note content)
237
237
new Setting ( containerEl )
238
238
. setName ( "File nodes (note content)" )
239
239
. setDesc ( "Configure size settings for note content" ) ;
@@ -267,5 +267,25 @@ export class SettingsTab extends PluginSettingTab {
267
267
}
268
268
} ) ,
269
269
) ;
270
+
271
+ // Status bar
272
+ new Setting ( containerEl )
273
+ . setName ( "Status bar" )
274
+ . setDesc ( "Customize the status bar display" )
275
+ . setHeading ( ) ;
276
+
277
+ new Setting ( containerEl )
278
+ . setName ( "Maximum Canvas filename length" )
279
+ . setDesc ( "Maximum number of characters to display for Canvas filenames in the status bar. Longer filenames will be truncated with an ellipsis." )
280
+ . addSlider ( slider => slider
281
+ . setLimits ( 5 , 50 , 5 )
282
+ . setValue ( this . plugin . settings . statusBarMaxFilenameLength )
283
+ . setDynamicTooltip ( )
284
+ . onChange ( async ( value ) => {
285
+ this . plugin . settings . statusBarMaxFilenameLength = value ;
286
+ await this . plugin . saveSettings ( ) ;
287
+ this . plugin . updateStatusBar ( ) ; // Update immediately to show effect
288
+ } )
289
+ ) ;
270
290
}
271
291
}
0 commit comments