Notes/src/public/javascripts/widgets/history_navigation.js

30 lines
816 B
JavaScript
Raw Normal View History

2020-01-15 20:10:54 +01:00
import BasicWidget from "./basic_widget.js";
import utils from "../services/utils.js";
import keyboardActionService from "../services/keyboard_actions.js";
const TPL = `
<div class="history-navigation">
<style>
.history-navigation {
margin: 0 15px 0 5px;
}
</style>
2020-01-22 19:41:19 +01:00
<a title="Go to previous note." data-trigger-event="backInNoteHistory" class="icon-action bx bx-left-arrow-circle"></a>
2020-01-15 20:10:54 +01:00
2020-01-22 19:41:19 +01:00
<a title="Go to next note." data-trigger-event="forwardInNoteHistory" class="icon-action bx bx-right-arrow-circle"></a>
2020-01-15 20:10:54 +01:00
</div>
`;
export default class HistoryNavigationWidget extends BasicWidget {
2020-01-22 20:48:56 +01:00
doRender() {
2020-02-05 22:46:20 +01:00
if (utils.isElectron()) {
this.$widget = $(TPL);
}
else {
this.$widget = $("<div>");
2020-01-15 20:10:54 +01:00
}
return this.$widget;
}
}