Skip to content

Commit

Permalink
feat(overlay): add chat settings (reverse and position)
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Sep 6, 2022
1 parent f5541dc commit 4eeac49
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 25 deletions.
2 changes: 1 addition & 1 deletion d.ts/src/helpers/socket.d.ts
Expand Up @@ -183,7 +183,7 @@ export type ClientToServerEventsWithNamespace = {
},
'/overlays/chat': GenericEvents & {
'test': (data: { message: string; username: string }) => void,
'message': (data: { id: string, show: boolean; message: string; username: string }) => void,
'message': (data: { id: string, show: boolean; message: string; username: string, timestamp: number, badges: any }) => void,
},
'/overlays/texttospeech': GenericEvents & {
'speak': (data: { text: string; highlight: boolean, service: 0 | 1, key: string }) => void,
Expand Down
38 changes: 19 additions & 19 deletions package.json
Expand Up @@ -11,15 +11,15 @@
"author": "Michal Orlik <sogehige@gmail.com>",
"license": "MIT",
"dependencies": {
"@sogebot/ui-admin": "^63.0.0",
"@sogebot/ui-admin": "^63.1.0",
"@sogebot/ui-helpers": "^3.1.0",
"@sogebot/ui-oauth": "~3.1.1",
"@sogebot/ui-overlay": "^31.0.0",
"@sogebot/ui-overlay": "^32.0.0",
"@sogebot/ui-public": "^4.0.0",
"@twurple/api": "^5.2.2",
"@twurple/auth": "^5.2.2",
"@twurple/chat": "^5.2.2",
"@twurple/pubsub": "^5.2.2",
"@twurple/api": "^5.2.3",
"@twurple/auth": "^5.2.3",
"@twurple/chat": "^5.2.3",
"@twurple/pubsub": "^5.2.3",
"async-mutex": "^0.3.2",
"axios": "0.27.2",
"basic-auth": "2.0.1",
Expand All @@ -35,11 +35,11 @@
"dayjs": "1.11.5",
"decode-html": "2.0.0",
"discord.js": "14.3.0",
"dotenv": "16.0.1",
"dotenv": "16.0.2",
"emoji-regex": "10.1.0",
"express": "^4.18.1",
"express-graphql": "^0.12.0",
"express-rate-limit": "6.5.2",
"express-rate-limit": "6.6.0",
"figlet": "1.5.2",
"file-type": "^17.1.6",
"get-changelog-lib": "^3.0.0",
Expand All @@ -56,7 +56,7 @@
"multer": "^1.4.4",
"mysql2": "2.3.3",
"node-fetch": "^2.6.6",
"npm-check-updates": "^16.0.5",
"npm-check-updates": "^16.1.0",
"obs-websocket-js": "5.0.1",
"patch-package": "6.4.7",
"pg": "8.8.0",
Expand All @@ -67,8 +67,8 @@
"safe-eval": "^0.4.1",
"sanitize-filename": "1.6.3",
"shortid": "^2.2.16",
"socket.io": "4.5.1",
"socket.io-client": "4.5.1",
"socket.io": "4.5.2",
"socket.io-client": "4.5.2",
"source-map-support": "0.5.21",
"spotify-web-api-node": "5.0.2",
"strip-ansi": "6.0.0",
Expand All @@ -82,11 +82,11 @@
"url-join": "5.0.0",
"uuid": "8.3.2",
"velocity-animate": "1.5.2",
"vm2": "^3.9.10",
"vm2": "^3.9.11",
"ws": "8.8.1",
"xregexp": "5.1.1",
"yargs": "17.5.1",
"ytdl-core": "4.10.0",
"ytdl-core": "4.11.2",
"ytpl": "2.3.0",
"ytsr": "3.8.0"
},
Expand Down Expand Up @@ -123,7 +123,7 @@
"@types/mocha": "9.1.1",
"@types/module-alias": "2.0.1",
"@types/multer": "^1.4.7",
"@types/node": "18.7.13",
"@types/node": "18.7.15",
"@types/page": "1.11.5",
"@types/pg": "8.6.5",
"@types/prismjs": "1.26.0",
Expand All @@ -138,17 +138,17 @@
"@types/uuid": "8.3.4",
"@types/ws": "8.5.3",
"@types/xregexp": "4.3.0",
"@types/yargs": "17.0.11",
"@typescript-eslint/eslint-plugin": "5.35.1",
"@typescript-eslint/parser": "5.35.1",
"@types/yargs": "17.0.12",
"@typescript-eslint/eslint-plugin": "5.36.2",
"@typescript-eslint/parser": "5.36.2",
"axios-mock-adapter": "1.21.2",
"bestzip": "2.2.1",
"deepmerge": "4.2.2",
"docsify": "4.12.2",
"docsify-cli": "4.4.4",
"empty": "0.10.1",
"escope": "3.6.0",
"eslint": "8.22.0",
"eslint": "8.23.0",
"eslint-plugin-import": "2.26.0",
"git-semver-tags": "4.1.1",
"husky": "^8.0.1",
Expand All @@ -162,7 +162,7 @@
"test-until": "1.1.1",
"tsc-alias": "^1.7.0",
"tsconfig-paths": "^4.1.0",
"typescript": "4.7.4",
"typescript": "4.8.2",
"url-regex": "5.0.0",
"util": "0.12.4"
},
Expand Down
3 changes: 3 additions & 0 deletions src/database/entity/overlay.ts
Expand Up @@ -23,6 +23,9 @@ export interface OverlayMapperChat extends OverlayMapperInterfaceCommon {
type: 'vertical' | 'horizontal' | 'niconico';
hideMessageAfter: number;
showTimestamp: boolean;
showFromTopOrLeft: boolean;
reverseOrder: boolean;
showBadges: boolean;
font: {
family: string;
size: number;
Expand Down
12 changes: 7 additions & 5 deletions src/helpers/overlaysDefaultValues.ts
Expand Up @@ -230,11 +230,13 @@ const values = {
overlayId: null,
},
chat: {
type: 'vertical',
hideMessageAfter: 600000,
showTimestamp: true,
showBadges: true,
font: {
type: 'vertical',
hideMessageAfter: 600000,
showTimestamp: true,
showBadges: true,
reverseOrder: false,
showFromTopOrLeft: false,
font: {
family: 'PT Sans',
size: 20,
borderPx: 1,
Expand Down

0 comments on commit 4eeac49

Please sign in to comment.