add replacement feature for code note

This commit is contained in:
SiriusXT
2024-11-11 22:57:24 +08:00
parent 2d9376a05c
commit 8893e9d4d5
2 changed files with 45 additions and 1 deletions

View File

@@ -164,7 +164,7 @@ export default class FindWidget extends NoteContextAwareWidget {
this.$widget.show();
this.$input.focus();
const isReadOnly = await this.noteContext.isReadOnly();
if (this.note.type === 'text' && !isReadOnly) {
if (['text', 'code'].includes(this.note.type) && !isReadOnly) {
this.$replaceWidgetBox.show();
}else{
this.$replaceWidgetBox.hide();