ForgeComponents
en

Components

j-Restart

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

The component is very primitive and it will only display the content if the value is positive. It can be useful for single page applications that change a version in the background and the front end needs to reload.


Configuration:

  • top {Number} a top position (default: 75)
  • bottom {Number} a top position (default: 0)
  • right {Number} a top position (default: 20)
  • left {Number} a top position (default: 0)
  • url {String} optional, a link to the editor (default: ?reload=1)

Use it with <ui-component name="restart">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<ui-component name="restart" path="common.restart" config="top:20;right:20" class="hidden"><i class="ti ti-bullhorn"></i>New update. <b>Reload</b></ui-component>

<script>

	var common = {};
	setTimeout(() => SET('common.restart', true), 2000);

</script>