Skip to content

Commit

Permalink
Add textareas + vercel analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherPillow committed Oct 26, 2023
1 parent 81874be commit df369e1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"dependencies": {
"@fontsource/ubuntu": "^5.0.8",
"@types/node-fetch": "^2.6.7",
"@vercel/analytics": "^1.1.1",
"form-data": "^4.0.0",
"node-fetch": "2.6"
}
Expand Down
4 changes: 4 additions & 0 deletions src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { dev } from '$app/environment';
import { inject } from '@vercel/analytics';

inject({ mode: dev ? 'development' : 'production' });
4 changes: 2 additions & 2 deletions src/routes/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ export const actions = {
url: avatar,
},
footer: {
"text": `Submitted at ${(new Date()).toLocaleString()} UTC. Running on stardew.rocks`,
"text": `Submitted at ${(new Date()).getTime().toLocaleString()} UTC. Running on stardew.rocks`,
"icon_url": "https://avatars.githubusercontent.com/u/143358767"
}
},
];

const payload = {
content: `@${name}'s ${categoryPretty} Mod!`,
content: `@${name.split('\n')[0].trim()}'s ${categoryPretty} Mod!`,
embeds: embeds,
username: `New ${categoryPretty} Mod`,
avatar_url: avatar,
Expand Down
10 changes: 5 additions & 5 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<form method="POST" enctype="multipart/form-data" >
<div class="row">
<label for="usernameInput">Discord Username(s): </label>
<input
<br />
<textarea
on:invalid={handleInvalidInput}
type="text"
id="usernameInput"
name="usernameInput"
placeholder="mycooldiscordname"
Expand All @@ -57,9 +57,9 @@

<div class="row">
<label for="categoryInput">Any Notes?: </label>
<input
<br />
<textarea
on:invalid={handleInvalidInput}
type="text"
id="categoryInput"
name="categoryInput"
placeholder="Requires x, y, z, ..."
Expand Down Expand Up @@ -95,7 +95,7 @@
{/if}

<style lang="scss">
input, select, button {
input, select, button, textarea {
background-color: #222222;
border-radius: 0.5em;
color: white;
Expand Down

0 comments on commit df369e1

Please sign in to comment.