1
0
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:
Caleb John 2019-08-29 10:34:54 -06:00 committed by Laurent Cozic
parent 8e32957111
commit 9a4f4cbb65
2 changed files with 5 additions and 0 deletions

View File

@ -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, {

View File

@ -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 {