mirror of https://github.com/TriliumNext/Notes
feat(mobile): add button to toggle sidebar
parent
b00ca234f5
commit
857f33db08
@ -1,16 +0,0 @@
|
||||
import BasicWidget from "../basic_widget.js";
|
||||
|
||||
const TPL = `
|
||||
<button type="button" class="action-button d-sm-none d-md-none d-lg-none d-xl-none" aria-label="Close" style="padding-top: 10px;">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>`;
|
||||
|
||||
class CloseDetailButtonWidget extends BasicWidget {
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
|
||||
this.$widget.on('click', () => this.triggerCommand('setActiveScreen', {screen:'tree'}));
|
||||
}
|
||||
}
|
||||
|
||||
export default CloseDetailButtonWidget;
|
||||
@ -0,0 +1,16 @@
|
||||
import BasicWidget from "../basic_widget.js";
|
||||
|
||||
const TPL = `
|
||||
<button type="button" class="action-button bx bx-sidebar" style="padding-top: 10px;"></button>`;
|
||||
|
||||
class ToggleSidebarButtonWidget extends BasicWidget {
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
|
||||
this.$widget.on('click', () => this.triggerCommand('setActiveScreen', {
|
||||
screen: 'tree'
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
export default ToggleSidebarButtonWidget;
|
||||
Loading…
Reference in New Issue