bind global menu item "Open SQL console" to the logic to create such a note

This commit is contained in:
zadam
2020-05-08 23:39:46 +02:00
parent c3438e0f3f
commit d20415c979
9 changed files with 67 additions and 24 deletions

View File

@@ -4,7 +4,6 @@ const TPL = `
<table class="note-info-widget-table">
<style>
.note-info-widget-table {
table-layout: fixed;
width: 100%;
}
@@ -22,22 +21,24 @@ const TPL = `
<tr>
<th>Note ID:</th>
<td colspan="3" class="note-info-note-id"></td>
<td class="note-info-note-id"></td>
</tr>
<tr>
<th>Created:</th>
<td colspan="3" class="note-info-date-created"></td>
<td class="note-info-date-created"></td>
</tr>
<tr>
<th>Modified:</th>
<td colspan="3" class="note-info-date-modified"></td>
<td class="note-info-date-modified"></td>
</tr>
<tr>
<th>Type:</th>
<td class="note-info-type"></td>
<th>MIME:</th>
<td class="note-info-mime"></td>
<td>
<span class="note-info-type"></span>,
MIME:
<span class="note-info-mime"></span>
</td>
</tr>
</table>
`;

View File

@@ -441,6 +441,9 @@ export default class NoteTreeWidget extends TabAwareWidget {
return "bx bx-note";
}
}
else if (note.type === 'code' && note.mime.startsWith('text/x-sql')) {
return "bx bx-data";
}
else {
return NOTE_TYPE_ICONS[note.type];
}