mirror of
https://github.com/laurent22/joplin.git
synced 2025-03-20 20:55:18 +02:00
Desktop: Change template prompt to sans and sort templates (#1806)
* Change template prompt to sans and sort templates * Sort templates by filename to ensure order
This commit is contained in:
parent
8e32957111
commit
9a4f4cbb65
@ -104,6 +104,7 @@ class PromptDialog extends React.Component {
|
||||
Object.assign(provided, {
|
||||
minWidth: width * 0.2,
|
||||
maxWidth: width * 0.5,
|
||||
fontFamily: theme.fontFamily,
|
||||
}),
|
||||
input: provided =>
|
||||
Object.assign(provided, {
|
||||
|
@ -41,6 +41,10 @@ TemplateUtils.loadTemplates = async function(filePath) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
// Make sure templates are always in the same order
|
||||
// sensitivity ensures that the sort will ignore case
|
||||
files.sort((a, b) => { return a.path.localeCompare(b.path, undefined, {sensitivity: 'accent'}); });
|
||||
|
||||
files.forEach(async file => {
|
||||
if (file.path.endsWith('.md')) {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user