Skip to content

Commit

Permalink
refactor: 💄 update the UI for the controls and add nuxt UI
Browse files Browse the repository at this point in the history
  • Loading branch information
nirjan-dev committed Dec 12, 2024
1 parent 7dc8ad9 commit 80f3b27
Show file tree
Hide file tree
Showing 7 changed files with 816 additions and 109 deletions.
6 changes: 6 additions & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default defineAppConfig({
ui: {
primary: "fuchsia",
gray: "cool",
},
});
5 changes: 3 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ export default defineNuxtConfig({
},
},

modules: ["@nuxtjs/tailwindcss"],
runtimeConfig: {
turnID: "",
turnToken: "",
},
});

modules: ["@nuxt/ui"],
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
"@nuxt/ui": "2.20.0",
"nuxt": "^3.14.159",
"simple-peer": "^9.11.1",
"vue": "latest",
Expand All @@ -18,7 +19,6 @@
"packageManager": "[email protected]+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b",
"devDependencies": {
"@flydotio/dockerfile": "^0.5.9",
"@nuxtjs/tailwindcss": "^6.12.2",
"@types/simple-peer": "^9.11.8"
}
}
18 changes: 9 additions & 9 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<template>
<div class="flex items-center flex-col justify-center h-screen px-6">
<h1 class="text-2xl md:text-4xl py-4">Welcome to NK chat</h1>
<div class="flex flex-col gap-4 text-center">
<button @click="joinRoom" class="mr-2 py-2 px-2 border-2">
Create room
</button>
<div class="flex flex-col gap-6 text-center">
<UButton block @click="joinRoom"> Create new room </UButton>

<hr />

<form action="" class="flex flex-col gap-2">
<label for="roomLink"
>Enter room link
<input
class="w-full p-1 border-b-2 bg-gray-100"
<UInput
class="my-1 w-full p-1"
size="sm"
type="text"
name="roomLink"
id="roomLink"
required
v-model="roomLink"
/>
</label>
<button
class="py-2 px-2 border-2"
<UButton
block
variant="outline"
@click.prevent="joinRoom"
type="submit"
>
Join
</button>
</UButton>
</form>
</div>
</div>
Expand Down
12 changes: 3 additions & 9 deletions pages/join.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,16 @@
<form action="" class="flex flex-col gap-2">
<label for="username"
>Enter your display name
<input
class="w-full p-1 border-b-2 bg-gray-100"
<UInput
class="w-full p-1"
type="text"
name="username"
id="username"
required
v-model="username"
/>
</label>
<button
@click.prevent="enterRoom"
class="py-2 px-2 border-2"
type="submit"
>
Join
</button>
<UButton block @click.prevent="enterRoom" type="submit"> Join </UButton>
</form>
</div>
</template>
Expand Down
Loading

0 comments on commit 80f3b27

Please sign in to comment.