mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 06:35:56 +08:00
Load OVE packages via yarn [SCI-9231] (#6176)
* Add OVE yarn package and load assets from node_modules [SCI-9231] * Move hardcoded text to i18 [SCI-9231]
This commit is contained in:
parent
0dc79316f1
commit
a3dd30d218
|
@ -1,2 +1,2 @@
|
|||
import './ove/script.js';
|
||||
import './ove/style.css';
|
||||
import '@teselagen/ove';
|
||||
import '@teselagen/ove/style.css';
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -56,6 +56,7 @@
|
|||
readOnly: this.readOnly,
|
||||
showMenuBar: true,
|
||||
alwaysAllowSave: true,
|
||||
menuFilter: this.menuFilter,
|
||||
ToolBarProps: {
|
||||
toolList: [
|
||||
'saveTool',
|
||||
|
@ -132,7 +133,28 @@
|
|||
if (parent !== window) {
|
||||
parent.document.getElementById('iFrameModal').dispatchEvent(new Event('hide'));
|
||||
}
|
||||
},
|
||||
menuFilter(menus) {
|
||||
return menus.map(menu => {
|
||||
if(menu.text !== 'Help') return menu;
|
||||
|
||||
const menuOverride = {
|
||||
text: I18n.t('open_vector_editor.editor.menu_bar.help_text'),
|
||||
submenu: [
|
||||
{ isMenuSearch: true },
|
||||
"--",
|
||||
{ text: I18n.t('open_vector_editor.editor.menu_bar.about_text'), onClick: () => { return } },
|
||||
{
|
||||
cmd: "versionNumber",
|
||||
shouldDismissPopover: true,
|
||||
onClick: () => { return }
|
||||
},
|
||||
"hotkeyDialog"
|
||||
]
|
||||
};
|
||||
return menuOverride;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -3713,6 +3713,9 @@ en:
|
|||
editor:
|
||||
tooltips:
|
||||
importTool: "Click or drag to import and view files (.fasta .gb .dna .json)"
|
||||
menu_bar:
|
||||
help_text: 'Help'
|
||||
about_text: 'About'
|
||||
pdf_preview:
|
||||
fit_to_screen: 'Fit to screen'
|
||||
pages:
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
"@babel/preset-env": "^7.20.2",
|
||||
"@fortawesome/fontawesome-free": "^5.2.0",
|
||||
"@joeattardi/emoji-button": "^4.6.2",
|
||||
"@teselagen/ove": "^0.3.15",
|
||||
"ajv": "6.12.6",
|
||||
"autoprefixer": "10.4.14",
|
||||
"axios": "^1.4.0",
|
||||
|
|
Loading…
Reference in a new issue