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:
wandji 2023-09-11 08:50:05 +01:00 committed by GitHub
parent 0dc79316f1
commit a3dd30d218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 2250 additions and 234189 deletions

View file

@ -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

View file

@ -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>

View file

@ -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:

View file

@ -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",

2247
yarn.lock

File diff suppressed because it is too large Load diff