sist2 icon indicating copy to clipboard operation
sist2 copied to clipboard

Ability to add & edit WEBUI Front-end Help pop-up contents

Open ioncubekh opened this issue 1 year ago • 6 comments

Which SIST2 component is your Feature Request related to? Web UI Front end

Is your feature request related to a problem? Please describe. No

What would you like to see happen? I want to add / edit HTML content in the HELP pop-up menu. I am using sqlite backend & want to add some examples for my students. Will also help to add contents in non-English language

Additional context Mine is a docker setup & I want an easy way to modify contents of HELP pop-up menu. Until this feature is available author is reqested to direct me to the file that I need to add my own HTML content

Image

ioncubekh avatar Mar 18 '25 20:03 ioncubekh

You could just use the search function on the repository to find the files you want. Here is the path to the Help Dialog sist2-vue/src/components/HelpDialog.vue

If you want to add content for non-English, you can make a pull request with your changes to this file: https://github.com/sist2app/sist2/blob/master/sist2-vue/src/i18n/messages.js There are already translations in English, German, French, Chinese, and Polish. You can read more about that here: #180.

The Help page should probably change based on whether you are using ElasticSearch or SQlite though.

dpieski avatar Mar 18 '25 20:03 dpieski

@dpieski Thanks for replying

sist2-vue/src/components/HelpDialog.vue

The Help page should probably change based on whether you are using ElasticSearch or SQlite though

I reached this file earlier but its content are a bit much for me. Its not only translation but the contents only have queries targeted at Elasticsearch with no mention / examples of sqlite!

I just want a way to add my own html contents or .md syntax if that what it accepts. Can you guide me

For instance this code <p v-html="$t('help.example1')"></p> trasnlates to For example: "fried eggs" +(eggplant | potato) -frittata will match the phrase fried eggs and either eggplant or potato, but will ignore results containing frittata.

Where is the latter text coming from?

ioncubekh avatar Mar 18 '25 20:03 ioncubekh

The latter text comes from that second file I linked to above.

It uses the messages.js file with i18n

Image

dpieski avatar Mar 18 '25 21:03 dpieski

Excellent I will modify & report back.

ioncubekh avatar Mar 18 '25 21:03 ioncubekh

@dpieski Well like I said before that my sist2 is running in a docker instance, so I tried as follows

sudo su
docker exec -it awesome_alden-sist2-admin-1 /bin/sh
grep -Ril "fried eggs" /

output

/root/sist2

cd /root/sist2
/bin/sh: 3: cd: can't cd to /root/sist2

So I cannot edit the help contents? There is no instance of "fried eggs" in any other location of whole container

This file is also unavailable in docker

sist2-vue/src/components/HelpDialog.vue

ioncubekh avatar Mar 21 '25 21:03 ioncubekh

You would have to clone the repo, edit the file, then build. https://github.com/sist2app/sist2?tab=readme-ov-file#build-from-source

dpieski avatar Mar 25 '25 14:03 dpieski