bolt-devtools
Advanced tools
Comparing version
@@ -1,1 +0,1 @@ | ||
import{p as t,b as e}from"./p-2227ce75.js";t().then(t=>e([["p-xtjjv7jm",[[1,"bolt-dev-tools",{isOpen:[32],activeComponent:[32]}],[1,"bolt-app-details"],[1,"bolt-meta"],[1,"bolt-registration",{email:[32],error:[32],isSubmitting:[32],message:[32],username:[32]}]]]],t)); | ||
import{p as t,b as e}from"./p-2227ce75.js";t().then(t=>e([["p-utwrnqla",[[1,"bolt-dev-tools",{isOpen:[32],activeComponent:[32]}],[1,"bolt-app-details"],[1,"bolt-meta"],[1,"bolt-registration",{email:[32],error:[32],isSubmitting:[32],message:[32],username:[32]}]]]],t)); |
@@ -1,1 +0,1 @@ | ||
System.register(["./p-ad784f87.system.js"],(function(){"use strict";var t,e;return{setters:[function(s){t=s.p;e=s.b}],execute:function(){t().then((function(t){return e([["p-wijraqa3.system",[[1,"bolt-dev-tools",{isOpen:[32],activeComponent:[32]}],[1,"bolt-app-details"],[1,"bolt-meta"],[1,"bolt-registration",{email:[32],error:[32],isSubmitting:[32],message:[32],username:[32]}]]]],t)}))}}})); | ||
System.register(["./p-ad784f87.system.js"],(function(){"use strict";var t,e;return{setters:[function(s){t=s.p;e=s.b}],execute:function(){t().then((function(t){return e([["p-ydckgxvj.system",[[1,"bolt-dev-tools",{isOpen:[32],activeComponent:[32]}],[1,"bolt-app-details"],[1,"bolt-meta"],[1,"bolt-registration",{email:[32],error:[32],isSubmitting:[32],message:[32],username:[32]}]]]],t)}))}}})); |
{ | ||
"entries": [ | ||
"components/registration/registration.js", | ||
"components/app-details/app-details.js", | ||
"components/dev-tools/dev-tools.js", | ||
"components/app-details/app-details.js", | ||
"components/meta/meta.js" | ||
@@ -7,0 +7,0 @@ ], |
import { Host, h } from "@stencil/core"; | ||
import uuid from 'node-uuid'; | ||
import { getRandomDOB, getRandomFirstName, getRandomLastName, getRandomPostcode, getRandomStreet, randomIntFromInterval } from '../../utils/utils'; | ||
import { getRandomDOB, getRandomEmoji, getRandomFirstName, getRandomLastName, getRandomPostcode, getRandomStreet, randomIntFromInterval } from '../../utils/utils'; | ||
export class Registration { | ||
@@ -12,3 +12,2 @@ constructor() { | ||
e.preventDefault(); | ||
// TODO: Navigate | ||
const logo = document.querySelectorAll('a.logo')[0]; | ||
@@ -82,3 +81,3 @@ logo.href = '/login'; | ||
this.error = response.errors[0].code; | ||
this.message = `👉 ${username} password1`; | ||
this.message = `${getRandomEmoji()} ${username} password1`; | ||
} | ||
@@ -100,18 +99,21 @@ catch (e) { | ||
h("p", null, "User created"), | ||
h("span", null, this.message))); | ||
h("span", null, this.message), | ||
h("button", { onClick: (e) => this.login(e) }, | ||
"Login with ", | ||
this.username))); | ||
} | ||
return (h(Host, null, | ||
h("button", { onClick: (e) => this.login(e) }, "Login"), | ||
successMessage, | ||
h("p", { class: "error" }, this.error ? this.error : null), | ||
successMessage, | ||
h("form", { class: { 'is-submitting': this.isSubmitting }, onSubmit: (e) => this.handleSubmit(e) }, | ||
h("div", { class: "input-container" }, | ||
h("label", { htmlFor: "username" }, "Username"), | ||
h("input", { id: "username", name: "username", onInput: (event) => this.handleChange(event), placeholder: "Username", type: "text", value: this.username })), | ||
h("div", { class: "input-container" }, | ||
h("label", { htmlFor: "email" }, "Email"), | ||
h("div", null, | ||
h("input", { id: "email", name: "email", onInput: (event) => this.handleChange(event), placeholder: "first.last+username", type: "text", value: this.email }), | ||
h("span", null, "@rocketx.com"))), | ||
h("button", { type: "submit" }, "Submit")))); | ||
!this.message && | ||
h("form", { class: { 'is-submitting': this.isSubmitting }, onSubmit: (e) => this.handleSubmit(e) }, | ||
h("div", { class: "input-container" }, | ||
h("label", { htmlFor: "username" }, "Username"), | ||
h("input", { id: "username", name: "username", onInput: (event) => this.handleChange(event), placeholder: "Username", type: "text", value: this.username })), | ||
h("div", { class: "input-container" }, | ||
h("label", { htmlFor: "email" }, "Email"), | ||
h("div", null, | ||
h("input", { id: "email", name: "email", onInput: (event) => this.handleChange(event), placeholder: "first.last+username", type: "text", value: this.email }), | ||
h("span", null, "@rocketx.com"))), | ||
h("button", { type: "submit" }, "Submit")))); | ||
} | ||
@@ -118,0 +120,0 @@ static get is() { return "bolt-registration"; } |
@@ -309,1 +309,5 @@ export function format(first, middle, last) { | ||
} | ||
export function getRandomEmoji() { | ||
const emojis = ['🔥', '💥', '🥳', '😎', '🤩', '🤖']; | ||
return emojis[randomIntFromInterval(0, emojis.length - 1)]; | ||
} |
@@ -8,1 +8,2 @@ export declare function format(first: string, middle: string, last: string): string; | ||
export declare function getRandomLastName(): string; | ||
export declare function getRandomEmoji(): string; |
{ | ||
"name": "bolt-devtools", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Stencil Component Starter", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1099849
0.26%19956
0.18%