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

29 lines
770 B
JavaScript
Raw Normal View History

2020-01-16 03:10:54 +08: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-23 02:41:19 +08:00
<a title="Go to previous note." data-trigger-event="backInNoteHistory" class="icon-action bx bx-left-arrow-circle"></a>
2020-01-16 03:10:54 +08:00
2020-01-23 02:41:19 +08:00
<a title="Go to next note." data-trigger-event="forwardInNoteHistory" class="icon-action bx bx-right-arrow-circle"></a>
2020-01-16 03:10:54 +08:00
</div>
`;
export default class HistoryNavigationWidget extends BasicWidget {
2020-01-23 03:48:56 +08:00
doRender() {
2020-01-16 03:10:54 +08:00
if (!utils.isElectron()) {
return;
}
this.$widget = $(TPL);
return this.$widget;
}
}