added icon to note title row

This commit is contained in:
zadam
2021-02-13 20:07:08 +01:00
parent 5eb850bf59
commit 378987e61c
6 changed files with 80 additions and 41 deletions

View File

@@ -0,0 +1,34 @@
import TabAwareWidget from "./tab_aware_widget.js";
import utils from "../services/utils.js";
import protectedSessionHolder from "../services/protected_session_holder.js";
import server from "../services/server.js";
import SpacedUpdate from "../services/spaced_update.js";
const TPL = `
<div class="note-icon-container">
<style>
.note-icon-container {
padding-top: 3px;
padding-left: 7px;
margin-right: 0;
}
.note-icon-container span {
font-size: 200%;
}
</style>
<span class="bx bx-archive"></span>
</div>`;
export default class NoteIconWidget extends TabAwareWidget {
doRender() {
this.$widget = $(TPL);
this.$icon = this.$widget.find('span');
this.contentSized();
}
async refreshWithNote(note) {
this.$icon.removeClass().addClass(note.getIcon())
}
}