Skip to content

Commit 1bf3436

Browse files
committed
Added basic chat layout
1 parent 39f89ef commit 1bf3436

File tree

6 files changed

+64
-13
lines changed

6 files changed

+64
-13
lines changed

Camera/.idea/runConfigurations.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

Camera/.idea/vcs.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Camera/app/src/main/java/com/example/videorecorder/MainActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ class MainActivity : AppCompatActivity() {
4747
fotoapparatState = FotoapparatState.OFF
4848

4949
fab_camera.setOnClickListener {
50+
print("Taking photo")
51+
val test = "Test233"
5052
takePhoto()
5153
}
5254

NestVueChat/src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { NestFactory } from '@nestjs/core';
22
import { AppModule } from './app.module';
3+
import { NestExpressApplication } from '@nestjs/platform-express';
4+
import { join } from 'path';
35

46
async function bootstrap() {
5-
const app = await NestFactory.create(AppModule);
7+
const app = await NestFactory.create<NestExpressApplication>(AppModule);
8+
app.useStaticAssets(join(__dirname, '..', 'static'));
69
await app.listen(3000);
710
}
811
bootstrap();

NestVueChat/static/index.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
8+
<title>Document</title>
9+
<link rel="stylesheet" href="styles.css">
10+
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
11+
<script type="text/javascript" src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
12+
13+
</head>
14+
<body>
15+
<div id="app" class="container">
16+
<div class="row">
17+
<div class="col-md-6 offset-md-3 col-sm-12">
18+
<h1 class="text-center">{{ title }}</h1>
19+
<br>
20+
<div id="status"></div>
21+
<div id="chat">
22+
<input type="text" v-model="name" id="username" class="form-control" placeholder="Enter name...">
23+
<br>
24+
<div class="card">
25+
<div id="messages" class="card-block">
26+
<ul>
27+
<li v-for="message of messages">{{ message }}</li>
28+
</ul>
29+
</div>
30+
</div>
31+
<br>
32+
<textarea id="textarea" class="form-control" v-model="text" placeholder="Enter message..."></textarea>
33+
<br>
34+
<button id="send" class="btn">Send</button>
35+
</div>
36+
</div>
37+
</div>
38+
</div>
39+
40+
41+
<script>
42+
var app = new Vue({
43+
el: '#app',
44+
data: {
45+
title: 'Nestjs Websockets Chat',
46+
name: '',
47+
text: '',
48+
messages: ['test', 'test2']
49+
},
50+
})
51+
</script>
52+
</body>
53+
</html>

NestVueChat/static/styles.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#messages{
2+
height:300px;
3+
overflow-y: scroll;
4+
}

0 commit comments

Comments
 (0)