diff --git a/.webpack/js.mjs b/.webpack/js.mjs index a9471871..2c17834b 100644 --- a/.webpack/js.mjs +++ b/.webpack/js.mjs @@ -126,7 +126,7 @@ export default { [`${modules}/edit-names-vim`]: `${dirModules}/edit-names-vim.mjs`, [`${modules}/menu`]: `${dirModules}/menu/index.mjs`, [`${modules}/view`]: `${dirModules}/view/index.mjs`, - [`${modules}/help`]: `${dirModules}/help.js`, + [`${modules}/help`]: `${dirModules}/help.mjs`, [`${modules}/markdown`]: `${dirModules}/markdown.js`, [`${modules}/config`]: `${dirModules}/config/index.mjs`, [`${modules}/contact`]: `${dirModules}/contact.js`, diff --git a/client/modules/edit-names-vim.mjs b/client/modules/edit-names-vim.mjs index 75121b7e..8b3b2f89 100644 --- a/client/modules/edit-names-vim.mjs +++ b/client/modules/edit-names-vim.mjs @@ -1,4 +1,4 @@ -import Events from '#dom/events'; +import * as Events from '#dom/events'; const {CloudCmd} = globalThis; @@ -42,4 +42,3 @@ function listener(event) { hide(); } } - diff --git a/client/modules/help.js b/client/modules/help.js deleted file mode 100644 index b916fcb9..00000000 --- a/client/modules/help.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -/* global CloudCmd */ -CloudCmd.Help = exports; - -const Images = require('#dom/images'); - -module.exports.init = () => { - Images.show.load('top'); -}; - -module.exports.show = show; -module.exports.hide = hide; - -function show() { - const positionLoad = 'top'; - const relative = true; - - CloudCmd.Markdown.show('/HELP.md', { - positionLoad, - relative, - }); -} - -function hide() { - CloudCmd.View.hide(); -} diff --git a/client/modules/help.mjs b/client/modules/help.mjs new file mode 100644 index 00000000..c418bdf1 --- /dev/null +++ b/client/modules/help.mjs @@ -0,0 +1,28 @@ +import * as Images from '#dom/images'; + +const {CloudCmd} = globalThis; + +CloudCmd.Help = { + init, + show, + hide, +}; + +export function init() { + Images.show.load('top'); +} + +export function show() { + const positionLoad = 'top'; + const relative = true; + + CloudCmd.Markdown.show('/HELP.md', { + positionLoad, + relative, + }); +} + +export function hide() { + CloudCmd.View.hide(); +} +