2020-01-12 04:19:56 +08:00
|
|
|
import BasicWidget from "./basic_widget.js";
|
2020-01-12 18:15:23 +08:00
|
|
|
import appContext from "../services/app_context.js";
|
2020-01-12 04:19:56 +08:00
|
|
|
|
|
|
|
const WIDGET_TPL = `
|
|
|
|
<style>
|
|
|
|
.global-buttons {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-around;
|
|
|
|
padding: 3px 0 3px 0;
|
|
|
|
border: 1px solid var(--main-border-color);
|
|
|
|
border-radius: 7px;
|
|
|
|
margin: 3px 5px 5px 5px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<div class="global-buttons">
|
2020-01-22 05:08:41 +08:00
|
|
|
<a data-trigger-event="createTopLevelNote"
|
|
|
|
title="Create new top level note"
|
|
|
|
class="icon-action bx bx-folder-plus"></a>
|
|
|
|
|
|
|
|
<a data-trigger-event="collapseTree"
|
|
|
|
title="Collapse note tree"
|
|
|
|
data-kb-action="CollapseTree"
|
|
|
|
class="icon-action bx bx-layer-minus"></a>
|
|
|
|
|
|
|
|
<a data-trigger-event="scrollToActiveNote"
|
|
|
|
title="Scroll to active note"
|
|
|
|
data-kb-action="ScrollToActiveNote"
|
|
|
|
class="icon-action bx bx-crosshair"></a>
|
|
|
|
|
|
|
|
<a data-trigger-event="searchNotes"
|
|
|
|
title="Search in notes"
|
|
|
|
data-kb-action="SearchNotes"
|
|
|
|
class="icon-action bx bx-search"></a>
|
2020-01-12 04:19:56 +08:00
|
|
|
</div>
|
|
|
|
`;
|
|
|
|
|
|
|
|
class GlobalButtonsWidget extends BasicWidget {
|
2020-01-13 03:15:05 +08:00
|
|
|
doRender($widget) {
|
2020-01-22 05:08:41 +08:00
|
|
|
return $(WIDGET_TPL);
|
2020-01-12 04:19:56 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default GlobalButtonsWidget;
|