mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 02:05:53 +01:00
extracted widgets from note title
This commit is contained in:
22
src/public/javascripts/widgets/protected_note_switch.js
Normal file
22
src/public/javascripts/widgets/protected_note_switch.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import BasicWidget from "./basic_widget.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="btn-group btn-group-xs">
|
||||
<button type="button"
|
||||
class="btn btn-sm icon-button bx bx-check-shield protect-button"
|
||||
title="Protected note can be viewed and edited only after entering password">
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-sm icon-button bx bx-shield unprotect-button"
|
||||
title="Not protected note can be viewed without entering password">
|
||||
</button>
|
||||
</div>`;
|
||||
|
||||
export default class ProtectedNoteSwitchWidget extends BasicWidget {
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
|
||||
return this.$widget;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user