@alstar/create 0.0.0-beta.7 → 0.0.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alstar/create",
3
- "version": "0.0.0-beta.7",
3
+ "version": "0.0.0-beta.8",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create": "main.js"
@@ -2,9 +2,7 @@ import { html } from '@alstar/studio'
2
2
 
3
3
  export default () => {
4
4
  return html`
5
- <link rel="stylesheet" href="/components/Welcome/Welcome.css" />
6
-
7
- <section class="welcome">
5
+ <section id="welcome">
8
6
  <div>
9
7
  <h1>
10
8
  <a href="/" aria-label="Go to Alstars homepage">
@@ -1,4 +1,4 @@
1
- section.welcome {
1
+ #welcome {
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -1,9 +1,8 @@
1
1
  // client side script
2
2
  const eventSource = new EventSource('http://localhost:5432')
3
- eventSource.onmessage = () => {
4
- setTimeout(() => {
5
- window.location.reload()
6
- }, 1000)
3
+ eventSource.onmessage = ({ data }) => {
4
+ const delay = data.split(' - ').at(-1) === 'true'
5
+ setTimeout(() => window.location.reload(), delay ? 0 : 1000)
7
6
  }
8
7
 
9
8
  console.log(