update
|
@ -8,10 +8,11 @@ Colubrina is a simple chatting platform written in Vue, and Vuetify for the fron
|
||||||
- [x] Messaging
|
- [x] Messaging
|
||||||
- [x] Authentication
|
- [x] Authentication
|
||||||
- [x] Admin panel
|
- [x] Admin panel
|
||||||
- [x] CLI (cli)
|
- [x] CLI
|
||||||
- [ ] Message history
|
- [ ] Message history
|
||||||
- [x] User profile cards
|
- [x] User profile cards
|
||||||
- [x] Group creation and modification
|
- [x] Group creation and modification
|
||||||
|
- [x] Direct message groups
|
||||||
- [x] Friending
|
- [x] Friending
|
||||||
- [x] Searching
|
- [x] Searching
|
||||||
|
|
||||||
|
@ -46,11 +47,10 @@ Failed to check for updates, ensure you are connected to the internet, and servi
|
||||||
Build frontend for production
|
Build frontend for production
|
||||||
Exit
|
Exit
|
||||||
```
|
```
|
||||||
Select setup, and go through the steps. After completing the initial setup, you may run `yarn build` in the frontend folder, or select "Build frontend for production" in the CLI.<br>
|
Select setup, and go through the steps.<br>After completing the initial setup, you may run `yarn build` in the frontend folder, or select "Build frontend for production" in the CLI.<br>
|
||||||
The CLI will populate the database with some default data which are essential for operation.<br>
|
|
||||||
The backend service can now be started with `node .` in the `backend` folder which will run on port `23998`.
|
The backend service can now be started with `node .` in the `backend` folder which will run on port `23998`.
|
||||||
|
|
||||||
A systemd service example config file can be found at `colubrina.service`
|
A systemd service example config file can be found at `colubrina.service`, and an `nginx.conf` example.
|
||||||
## Frontend setup
|
## Frontend setup
|
||||||
|
|
||||||
Rename .env.example to .env and fill it out with your own information.
|
Rename .env.example to .env and fill it out with your own information.
|
||||||
|
|
|
@ -762,7 +762,10 @@ router.get("/users", auth, async (req, res, next) => {
|
||||||
"updatedAt",
|
"updatedAt",
|
||||||
"status",
|
"status",
|
||||||
"admin"
|
"admin"
|
||||||
]
|
],
|
||||||
|
where: {
|
||||||
|
banned: false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
res.json(users)
|
res.json(users)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -27,12 +27,7 @@ module.exports = {
|
||||||
sheet: "#181818",
|
sheet: "#181818",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#151515",
|
dark: "#151515",
|
||||||
bg: "#151515",
|
bg: "#151515"
|
||||||
calendarNormalActivity: "#3f51b5",
|
|
||||||
calendarActivityType7: "#f44336",
|
|
||||||
calendarActivityType8: "#4caf50",
|
|
||||||
calendarActivityType10: "#ff9800",
|
|
||||||
calendarExternalActivity: "#2196f3"
|
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
primary: "#0190ea",
|
primary: "#0190ea",
|
||||||
|
@ -47,12 +42,7 @@ module.exports = {
|
||||||
sheet: "#f8f8f8",
|
sheet: "#f8f8f8",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#f8f8f8",
|
dark: "#f8f8f8",
|
||||||
bg: "#f8f8f8",
|
bg: "#f8f8f8"
|
||||||
calendarNormalActivity: "#3f51b5",
|
|
||||||
calendarActivityType7: "#f44336",
|
|
||||||
calendarActivityType8: "#4caf50",
|
|
||||||
calendarActivityType10: "#ff9800",
|
|
||||||
calendarExternalActivity: "#2196f3"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createdAt: "2022-03-26 23:23:29",
|
createdAt: "2022-03-26 23:23:29",
|
||||||
|
@ -83,12 +73,7 @@ module.exports = {
|
||||||
sheet: "#262626",
|
sheet: "#262626",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#262626",
|
dark: "#262626",
|
||||||
bg: "#191919",
|
bg: "#191919"
|
||||||
calendarNormalActivity: "#3f51b5",
|
|
||||||
calendarActivityType7: "#f44336",
|
|
||||||
calendarActivityType8: "#4caf50",
|
|
||||||
calendarActivityType10: "#ff9800",
|
|
||||||
calendarExternalActivity: "#2196f3"
|
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
primary: "#0190ea",
|
primary: "#0190ea",
|
||||||
|
@ -103,12 +88,7 @@ module.exports = {
|
||||||
sheet: "#dedede",
|
sheet: "#dedede",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#dedede",
|
dark: "#dedede",
|
||||||
bg: "#e7e7e7",
|
bg: "#e7e7e7"
|
||||||
calendarNormalActivity: "#3f51b5",
|
|
||||||
calendarActivityType7: "#f44336",
|
|
||||||
calendarActivityType8: "#4caf50",
|
|
||||||
calendarActivityType10: "#ff9800",
|
|
||||||
calendarExternalActivity: "#2196f3"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createdAt: "2022-03-26 23:25:12",
|
createdAt: "2022-03-26 23:25:12",
|
||||||
|
@ -136,12 +116,7 @@ module.exports = {
|
||||||
sheet: "#000000",
|
sheet: "#000000",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#000000",
|
dark: "#000000",
|
||||||
bg: "#000000",
|
bg: "#000000"
|
||||||
calendarNormalActivity: "#3f51b5",
|
|
||||||
calendarActivityType7: "#f44336",
|
|
||||||
calendarActivityType8: "#4caf50",
|
|
||||||
calendarActivityType10: "#ff9800",
|
|
||||||
calendarExternalActivity: "#2196f3"
|
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
primary: "#0190ea",
|
primary: "#0190ea",
|
||||||
|
@ -155,12 +130,7 @@ module.exports = {
|
||||||
toolbar: "#f8f8f8",
|
toolbar: "#f8f8f8",
|
||||||
sheet: "#f8f8f8",
|
sheet: "#f8f8f8",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#f8f8f8",
|
dark: "#f8f8f8"
|
||||||
calendarNormalActivity: "#3f51b5",
|
|
||||||
calendarActivityType7: "#f44336",
|
|
||||||
calendarActivityType8: "#4caf50",
|
|
||||||
calendarActivityType10: "#ff9800",
|
|
||||||
calendarExternalActivity: "#2196f3"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createdAt: "2022-03-26 23:25:12",
|
createdAt: "2022-03-26 23:25:12",
|
||||||
|
@ -188,12 +158,7 @@ module.exports = {
|
||||||
sheet: "#181818",
|
sheet: "#181818",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#151515",
|
dark: "#151515",
|
||||||
bg: "#151515",
|
bg: "#151515"
|
||||||
calendarNormalActivity: "#565656",
|
|
||||||
calendarActivityType7: "#767676",
|
|
||||||
calendarActivityType8: "#868686",
|
|
||||||
calendarActivityType10: "#A6A6A6",
|
|
||||||
calendarExternalActivity: "#7D7D7D"
|
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
primary: "#6E6E6E",
|
primary: "#6E6E6E",
|
||||||
|
@ -208,12 +173,7 @@ module.exports = {
|
||||||
sheet: "#f8f8f8",
|
sheet: "#f8f8f8",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#f8f8f8",
|
dark: "#f8f8f8",
|
||||||
bg: "#f8f8f8",
|
bg: "#f8f8f8"
|
||||||
calendarNormalActivity: "#565656",
|
|
||||||
calendarActivityType7: "#767676",
|
|
||||||
calendarActivityType8: "#868686",
|
|
||||||
calendarActivityType10: "#A6A6A6",
|
|
||||||
calendarExternalActivity: "#7D7D7D"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createdAt: "2022-03-26 23:25:12",
|
createdAt: "2022-03-26 23:25:12",
|
||||||
|
@ -241,12 +201,7 @@ module.exports = {
|
||||||
sheet: "#181818",
|
sheet: "#181818",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#151515",
|
dark: "#151515",
|
||||||
bg: "#151515",
|
bg: "#151515"
|
||||||
calendarNormalActivity: "#0057E9",
|
|
||||||
calendarActivityType7: "#E11845",
|
|
||||||
calendarActivityType8: "#87E911",
|
|
||||||
calendarActivityType10: "#F2CA19",
|
|
||||||
calendarExternalActivity: "#0057E9"
|
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
primary: "#0057E9",
|
primary: "#0057E9",
|
||||||
|
@ -261,12 +216,7 @@ module.exports = {
|
||||||
sheet: "#f8f8f8",
|
sheet: "#f8f8f8",
|
||||||
text: "#000000",
|
text: "#000000",
|
||||||
dark: "#f8f8f8",
|
dark: "#f8f8f8",
|
||||||
bg: "#f8f8f8",
|
bg: "#f8f8f8"
|
||||||
calendarNormalActivity: "#0057E9",
|
|
||||||
calendarActivityType7: "#E11845",
|
|
||||||
calendarActivityType8: "#87E911",
|
|
||||||
calendarActivityType10: "#F2CA19",
|
|
||||||
calendarExternalActivity: "#0057E9"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createdAt: "2022-03-26 23:25:12",
|
createdAt: "2022-03-26 23:25:12",
|
||||||
|
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.2 KiB |
BIN
frontend/public/img/icons/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -1,3 +1,3 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1210" viewBox="0 0 1024 1210" version="1.1">
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M 493.235 14.497 C 464.342 19.735, 439.862 34.705, 422.618 57.682 C 411.030 73.122, 404.162 90.199, 401.231 110.864 C 396.915 141.290, 406.950 173.469, 428.437 198.107 C 431.458 201.570, 433.832 204.501, 433.714 204.620 C 433.595 204.738, 425.399 206.460, 415.499 208.446 C 330.893 225.421, 258.467 260.158, 190.594 316.316 C 176.124 328.289, 142.713 361.542, 131.129 375.500 C 64.543 455.737, 26.508 545.245, 15.335 648 C 12.807 671.250, 12.807 724.750, 15.335 748 C 26.435 850.077, 64.513 940.174, 129.869 1019 C 142.140 1033.800, 176.200 1067.860, 191 1080.131 C 269.809 1145.473, 359.945 1183.568, 462 1194.665 C 485.250 1197.193, 538.750 1197.193, 562 1194.665 C 664.055 1183.568, 754.191 1145.473, 833 1080.131 C 847.800 1067.860, 881.860 1033.800, 894.131 1019 C 959.473 940.191, 997.568 850.055, 1008.665 748 C 1011.193 724.750, 1011.193 671.250, 1008.665 648 C 997.491 545.243, 959.525 455.889, 892.879 375.500 C 882.190 362.607, 847.393 327.810, 834.500 317.121 C 753.918 250.315, 665.493 212.767, 562 201.409 C 542.565 199.276, 501.701 198.504, 482.624 199.910 C 473.891 200.554, 466.563 200.896, 466.337 200.671 C 466.112 200.445, 472.131 199.295, 479.714 198.114 C 510.935 193.253, 518.993 192.686, 560.353 192.441 L 600.206 192.204 603.483 187.595 C 611.983 175.640, 619.858 155.514, 622.070 140.097 C 623.832 127.812, 622.765 108.836, 619.631 96.723 C 616.606 85.032, 610.051 70.794, 602.992 60.583 C 597.035 51.966, 583.177 38.231, 574.498 32.342 C 551.275 16.584, 519.825 9.678, 493.235 14.497 M 501.402 77.486 C 493.091 79.294, 485.691 83.233, 479.361 89.220 C 468.759 99.247, 464 110.148, 464 124.408 C 464 137.798, 467.832 147.630, 476.778 157.194 C 504.011 186.308, 552.645 171.168, 559.213 131.532 C 562.543 111.440, 551.389 90.310, 532.792 81.478 C 521.620 76.173, 512.669 75.034, 501.402 77.486 M 489.500 338.587 C 487.300 338.804, 480.550 339.453, 474.500 340.030 C 443.256 343.005, 408.828 351.492, 377 364.063 C 372.325 365.910, 360.625 371.362, 351 376.180 C 280.471 411.480, 225.500 466.451, 190.177 537 C 170.291 576.716, 159.668 612.641, 153.806 660 C 151.808 676.136, 152.130 723.084, 154.358 740.500 C 167.815 845.717, 223.199 936.928, 309.039 995.240 C 358.126 1028.586, 409.976 1048.112, 469.500 1055.667 C 489.165 1058.163, 534.835 1058.163, 554.500 1055.667 C 614.024 1048.112, 665.874 1028.586, 714.961 995.240 C 765.874 960.655, 805.893 914.784, 833.823 859 C 853.756 819.189, 864.433 783.084, 870.198 736 C 871.900 722.102, 871.894 673.828, 870.189 660 C 864.364 612.753, 853.711 576.720, 833.823 537 C 798.500 466.451, 743.529 411.480, 673 376.180 C 634.151 356.735, 598.148 345.906, 554 340.388 C 543.023 339.016, 497.913 337.756, 489.500 338.587 M 473 601 L 473 658 415.500 658 L 358 658 358 697 L 358 736 415.500 736 L 473 736 473 793 L 473 850 511.500 850 L 550 850 550 793 L 550 736 608 736 L 666 736 666 697 L 666 658 608 658 L 550 658 550 601 L 550 544 511.500 544 L 473 544 473 601" stroke="none" fill="black" fill-rule="evenodd"/>
|
<path d="M8.00251 14.9297L0 1.07422H6.14651L8.00251 4.27503L9.84583 1.07422H16L8.00251 14.9297Z" fill="black"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 215 B |
|
@ -8,7 +8,7 @@
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="nickname.nickname"
|
v-model="nickname.nickname"
|
||||||
label="Nickname"
|
label="Nickname"
|
||||||
required
|
autofocus
|
||||||
@keyup.enter="setFriendNickname"
|
@keyup.enter="setFriendNickname"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
<small>Friend nicknames only show to you.</small>
|
<small>Friend nicknames only show to you.</small>
|
||||||
|
|
|
@ -156,40 +156,42 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.mutualGroups = []
|
if(this.user?.item?.id) {
|
||||||
this.mutualFriends = []
|
this.mutualGroups = []
|
||||||
this.loading = {
|
this.mutualFriends = []
|
||||||
mutualGroups: true,
|
this.loading = {
|
||||||
mutualFriends: true
|
mutualGroups: true,
|
||||||
|
mutualFriends: true
|
||||||
|
}
|
||||||
|
this.axios
|
||||||
|
.get(
|
||||||
|
process.env.VUE_APP_BASE_URL +
|
||||||
|
"/api/v1/communications/mutual/" +
|
||||||
|
this.user.item.id +
|
||||||
|
"/groups"
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
|
this.mutualGroups = res.data
|
||||||
|
this.loading.mutualGroups = false
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
AjaxErrorHandler(this.$store)(e)
|
||||||
|
})
|
||||||
|
this.axios
|
||||||
|
.get(
|
||||||
|
process.env.VUE_APP_BASE_URL +
|
||||||
|
"/api/v1/communications/mutual/" +
|
||||||
|
this.user.item.id +
|
||||||
|
"/friends"
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
|
this.mutualFriends = res.data
|
||||||
|
this.loading.mutualFriends = false
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
AjaxErrorHandler(this.$store)(e)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.axios
|
|
||||||
.get(
|
|
||||||
process.env.VUE_APP_BASE_URL +
|
|
||||||
"/api/v1/communications/mutual/" +
|
|
||||||
this.user.item.id +
|
|
||||||
"/groups"
|
|
||||||
)
|
|
||||||
.then((res) => {
|
|
||||||
this.mutualGroups = res.data
|
|
||||||
this.loading.mutualGroups = false
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
AjaxErrorHandler(this.$store)(e)
|
|
||||||
})
|
|
||||||
this.axios
|
|
||||||
.get(
|
|
||||||
process.env.VUE_APP_BASE_URL +
|
|
||||||
"/api/v1/communications/mutual/" +
|
|
||||||
this.user.item.id +
|
|
||||||
"/friends"
|
|
||||||
)
|
|
||||||
.then((res) => {
|
|
||||||
this.mutualFriends = res.data
|
|
||||||
this.loading.mutualFriends = false
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
AjaxErrorHandler(this.$store)(e)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -74,7 +74,8 @@ Vue.use(VueNativeNotification, {
|
||||||
|
|
||||||
Vue.use({
|
Vue.use({
|
||||||
install(Vue) {
|
install(Vue) {
|
||||||
Vue.prototype.$socket = SocketIO(process.env.VUE_APP_SOCKET_URL, {
|
Vue.prototype.$socket = SocketIO("", {
|
||||||
|
transports: ["websocket", "polling"],
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: localStorage.getItem("session")
|
Authorization: localStorage.getItem("session")
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
:user="context.userPopout"
|
:user="context.userPopout"
|
||||||
:key="context.userPopout.item?.id || 0"
|
:key="context.userPopout.item?.id || 0"
|
||||||
></UserDialog>
|
></UserDialog>
|
||||||
<NicknameDialog :nickname="context.nickname" />
|
<NicknameDialog :nickname="nickname" />
|
||||||
<v-dialog
|
<v-dialog
|
||||||
v-model="preview.dialog"
|
v-model="preview.dialog"
|
||||||
elevation="0"
|
elevation="0"
|
||||||
|
|
42
nginx.conf
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
ssl_certificate /etc/nginx/ssl/colubrina.mydomain.com/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/nginx/ssl/colubrina.mydomain.com/privkey.pem;
|
||||||
|
server_name colubrina.mydomain.com;
|
||||||
|
root /home/colubrina/colubrina/frontend/dist;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
location ~ \.(css|js|fonts)$ {
|
||||||
|
expires 16d;
|
||||||
|
access_log off;
|
||||||
|
add_header Cache-Control "public";
|
||||||
|
}
|
||||||
|
location /api {
|
||||||
|
proxy_pass http://localhost:23998;
|
||||||
|
}
|
||||||
|
location /socket.io {
|
||||||
|
proxy_pass http://localhost:23998;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
location /usercontent {
|
||||||
|
proxy_pass http://localhost:23998;
|
||||||
|
}
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
client_max_body_size 200M;
|
||||||
|
error_log /var/log/nginx/colubrina.error.log warn;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name colubrina.mydomain.com;
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|