mirror of
https://github.com/laurent22/joplin.git
synced 2025-03-23 21:09:30 +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, {
|
Object.assign(provided, {
|
||||||
minWidth: width * 0.2,
|
minWidth: width * 0.2,
|
||||||
maxWidth: width * 0.5,
|
maxWidth: width * 0.5,
|
||||||
|
fontFamily: theme.fontFamily,
|
||||||
}),
|
}),
|
||||||
input: provided =>
|
input: provided =>
|
||||||
Object.assign(provided, {
|
Object.assign(provided, {
|
||||||
|
@ -41,6 +41,10 @@ TemplateUtils.loadTemplates = async function(filePath) {
|
|||||||
throw error;
|
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 => {
|
files.forEach(async file => {
|
||||||
if (file.path.endsWith('.md')) {
|
if (file.path.endsWith('.md')) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user