Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chatbot v3 #1394

Merged
merged 164 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
5e5b4bd
pulled from staging
Nitsorn Jul 31, 2018
8ab2071
dropdownmenu added
Nitsorn Jul 31, 2018
219d66c
merged staging
Nitsorn Aug 1, 2018
42fe240
pulled from staging
Nitsorn Aug 1, 2018
e3485c1
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 2, 2018
cdd5ec5
merging staging
Nitsorn Aug 7, 2018
0192fa2
some conflict
Nitsorn Aug 7, 2018
f362635
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 9, 2018
bb88d7f
pulling from remote
Nitsorn Aug 10, 2018
9b66ca2
added new files from remote
Nitsorn Aug 10, 2018
17150ea
added alphaOnly
Nitsorn Aug 10, 2018
2831a8a
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 10, 2018
1481978
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 10, 2018
bc4f1c4
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 10, 2018
f0048dc
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 14, 2018
103f028
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 15, 2018
56e99a2
Build out media share skeleton
gettinToasty Aug 7, 2018
7c4b5d3
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 15, 2018
cdb35f9
Rebase on staging
gettinToasty Aug 15, 2018
5d7c4a9
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 16, 2018
d8ed30a
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 18, 2018
2d0011b
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 20, 2018
166d9cc
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 20, 2018
459bb63
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 21, 2018
34f4587
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 21, 2018
94e578b
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 22, 2018
6a81386
added quotes
Nitsorn Aug 23, 2018
262cc8d
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 24, 2018
65ec5b9
fixed conflict
Nitsorn Aug 27, 2018
f6f035c
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 27, 2018
a5b7a2e
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 28, 2018
5df2173
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 29, 2018
74412d3
added chatbot back
Nitsorn Aug 29, 2018
249681d
fixed some ui issues
Nitsorn Aug 30, 2018
6a3bfc6
reenabled auto-updated
Nitsorn Aug 30, 2018
9d63384
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 30, 2018
f79590f
Merge branch 'staging' into chatbot
Nitsorn Aug 30, 2018
ca8be95
Finished chatbot queue except sockets
Nitsorn Aug 31, 2018
79757d2
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Aug 31, 2018
de91791
Merge branch 'staging' into chatbot
Nitsorn Aug 31, 2018
431c050
adding sockets
Nitsorn Aug 31, 2018
1c5345c
added sockets
Nitsorn Aug 31, 2018
3b65a03
finished queue
Nitsorn Sep 4, 2018
b0ded46
updated arrw right icon for switching windows
Nitsorn Sep 4, 2018
7e5169d
reenable auto-updater
Nitsorn Sep 4, 2018
9587e54
starting song request
Nitsorn Sep 5, 2018
cb46fa9
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Sep 10, 2018
0960aba
fixed conflict from validated-form
Nitsorn Sep 10, 2018
fd9671a
fixed conflicts
Nitsorn Sep 10, 2018
936a3f1
fixed another connfclit
Nitsorn Sep 10, 2018
844ddc0
refactor formgroup in mediashare to v-formgroup
Nitsorn Sep 10, 2018
052ac5f
fixed conflict
Nitsorn Sep 10, 2018
2ef1393
song request get done
Nitsorn Sep 10, 2018
bbaea8f
refactor to match new forms
Nitsorn Sep 10, 2018
9d523df
Merge branch 'staging' of https://github.com/stream-labs/streamlabs-o…
Nitsorn Sep 10, 2018
60ab09d
Merge branch 'staging' into sb_add_media_share
Nitsorn Sep 10, 2018
5b56b5b
added patchbeforesend
Nitsorn Sep 11, 2018
6197bff
Merge branch 'staging' into sb_add_media_share
Nitsorn Sep 11, 2018
122ad1e
seems like POST is working but fetch returning default values and not…
Nitsorn Sep 11, 2018
b0d2ac7
finished media share widget settings
Nitsorn Sep 11, 2018
e764921
fixed https from http
Nitsorn Sep 11, 2018
90d1437
fixed conflicts
Nitsorn Sep 11, 2018
d696d15
finished song request preferences, just need to connect commands
Nitsorn Sep 12, 2018
2d8b9b6
finished unbanning
Nitsorn Sep 12, 2018
7ea9265
finished song request except default
Nitsorn Sep 13, 2018
f67fc07
switching song request pref and command windows
Nitsorn Sep 13, 2018
eafaa6e
Chatbot widget (#820)
Nitsorn Sep 18, 2018
f703248
Connect to current platform (#807)
AnkhHeart Sep 18, 2018
07dcfd7
Merge branch 'staging' into chatbot
Nitsorn Sep 18, 2018
e7c1b86
streamlabs instead of beta3
Nitsorn Sep 18, 2018
67ff462
finished onboarding
Nitsorn Sep 18, 2018
a2c148a
fixed ui bugs
Nitsorn Sep 20, 2018
16d3fbc
added other responses to song request and notes in queue
Nitsorn Sep 20, 2018
726df62
fixed seans comments
Nitsorn Sep 20, 2018
a953938
added placeholder for widget install:
Nitsorn Sep 20, 2018
2373a0a
fix conflicts
Nitsorn Sep 20, 2018
9c691eb
fixed form-group to h-form-group in mediashare
Nitsorn Sep 20, 2018
6e75bdf
disable song request for v1
Nitsorn Sep 20, 2018
4bd4a21
readd song request
Nitsorn Sep 20, 2018
c46e159
fixed conflicts
Nitsorn Sep 20, 2018
3d725bc
commented out v2
Nitsorn Sep 20, 2018
b854e82
disable queue and quotes
Nitsorn Sep 20, 2018
4439500
merged staging
Nitsorn Oct 5, 2018
6463b0b
Merge branch 'staging' into chatbot-v2
Nitsorn Oct 5, 2018
6745efd
enabled v2
Nitsorn Oct 6, 2018
597f2ab
fixed setTitle
Nitsorn Oct 6, 2018
14218ea
Merge branch 'staging' into chatbot-v2
Nitsorn Oct 6, 2018
181e8c6
fixed child window title for all
Nitsorn Oct 9, 2018
6bbe766
minor import change
Nitsorn Oct 9, 2018
f3cc440
refactoring chatbot service
Nitsorn Oct 9, 2018
e4d7c35
wip
Nitsorn Oct 9, 2018
41eaae1
wip
Nitsorn Oct 9, 2018
c65a490
refactored chatbot service
Nitsorn Oct 10, 2018
08462cb
textarea style overrides foundation
Nitsorn Oct 10, 2018
2ff04af
starting test
Nitsorn Oct 10, 2018
8d7aa1e
fixed conflicts
Nitsorn Oct 11, 2018
9a5aa9e
Merge branch 'staging' into chatbot-v2
Nitsorn Oct 11, 2018
404c2bf
fixing media share widget settings
Nitsorn Oct 11, 2018
e1409d0
wip
Nitsorn Oct 11, 2018
84983ef
wip
Nitsorn Oct 11, 2018
c67a42f
got test to navigate and load chatbot!
Nitsorn Oct 12, 2018
9ad3244
wip
Nitsorn Oct 12, 2018
1cf4ae9
wip
Nitsorn Oct 12, 2018
5bcd090
added socket transports
Nitsorn Oct 18, 2018
8dde3bc
Merge branch 'staging' into chatbot-v2
Nitsorn Oct 18, 2018
d018e38
removed env
Nitsorn Oct 18, 2018
8dc5c62
notifications area fix
Nitsorn Oct 18, 2018
bc5a3f2
removed tests for now
Nitsorn Oct 18, 2018
693c810
Fix for Chatbot Link Protection Save
AnkhHeart Nov 5, 2018
357a235
Merge pull request #990 from stream-labs/Chatbot-Link-Prot-Patch
AnkhHeart Nov 5, 2018
fc7347f
LOCAL_CHATBOT env variable added for local testing
AnkhHeart Nov 19, 2018
64eeca4
Merge remote-tracking branch 'origin/master' into chatbot-v3
AnkhHeart Nov 19, 2018
3405d76
Implemented Loyalty Tab
AnkhHeart Nov 23, 2018
aa68da7
Pagination improved
AnkhHeart Nov 23, 2018
48882ff
Fixed queue connection leaking issue
AnkhHeart Nov 28, 2018
7f74a83
UX Update
AnkhHeart Dec 3, 2018
821a64c
UX Cleanup
AnkhHeart Dec 4, 2018
7f8dbea
Removed ugly shadow from night mode modals
AnkhHeart Dec 4, 2018
a68045c
Queue adjustments to fit new data structure
AnkhHeart Dec 5, 2018
68693aa
Merge branch 'master' into chatbot-v3
AnkhHeart Dec 5, 2018
74d56b3
Queue & Quote improvements
AnkhHeart Dec 7, 2018
4c69603
Merge branch 'staging' into chatbot-v3
AnkhHeart Dec 7, 2018
b96b995
Window & Loyalty tweaks
AnkhHeart Dec 7, 2018
b33c13b
Modal Layout tab scroll fix
AnkhHeart Dec 7, 2018
4c14791
Heist Implemented & Realtime input Error msgs
AnkhHeart Dec 9, 2018
1b53422
Error Consistancy + Real Time Show
AnkhHeart Dec 9, 2018
c5ae476
Fixed min and Max values for input fields
AnkhHeart Dec 10, 2018
a388bff
Started poll implementation
AnkhHeart Dec 11, 2018
cb77228
Merge branch 'staging' into chatbot-v3
AnkhHeart Dec 11, 2018
1f09cf3
Set defaults
AnkhHeart Dec 11, 2018
bc4e884
Poll, Queue & Fixes
AnkhHeart Dec 16, 2018
f8c1c48
Implemented Poll Preferences
AnkhHeart Dec 20, 2018
498eb29
Betting, Importer & UX
AnkhHeart Jan 1, 2019
baf39e5
Gamble & Misc
AnkhHeart Jan 3, 2019
c1045e3
Implemented Command Preferences Window
AnkhHeart Jan 8, 2019
a5c86f7
Merge conflicts resolved
AnkhHeart Jan 8, 2019
88ce118
Updated code to follow new tslint rules
AnkhHeart Jan 8, 2019
8112a22
Removed filler modules
AnkhHeart Jan 8, 2019
daa4c6b
Removed logs
AnkhHeart Jan 8, 2019
57039c8
tslint fixes
AnkhHeart Jan 8, 2019
fa570e8
tslint fixes
AnkhHeart Jan 8, 2019
923dab5
Cooldown added to heist
AnkhHeart Jan 10, 2019
90e2b2e
Fixed module laoding
AnkhHeart Jan 16, 2019
1002c14
New youtube mod info
AnkhHeart Jan 24, 2019
f35c9df
Fixed bg color so it's readable
AnkhHeart Jan 24, 2019
e05ab7d
Tweaks
AnkhHeart Feb 15, 2019
1e7f55e
Merge branch 'staging' into chatbot-v3
AnkhHeart Feb 15, 2019
c016ee2
Fixes
AnkhHeart Feb 19, 2019
916806b
Use updateValue instead
AnkhHeart Feb 19, 2019
b241641
Handle input instead
AnkhHeart Feb 19, 2019
4aa9f1d
Code Refactoring 1
AnkhHeart Feb 19, 2019
c30dd68
Fixes
AnkhHeart Feb 19, 2019
88ac0d8
Merge branch 'staging' into chatbot-v3
AnkhHeart Feb 22, 2019
83e6d9a
Text area updated
AnkhHeart Feb 22, 2019
7b43968
Tslint formatted files
AnkhHeart Feb 22, 2019
0f2cf67
Merge branch 'staging' into chatbot-v3
avacreeth Feb 22, 2019
885e3fa
Removed @keydown.enter.prevent on textarea
AnkhHeart Feb 22, 2019
7b55485
Merge branch 'chatbot-v3' of https://github.com/stream-labs/streamlab…
AnkhHeart Feb 22, 2019
208f0df
hiden songrequest commands
AnkhHeart Feb 22, 2019
d859fef
Fixed (Andy Feedback)
AnkhHeart Feb 23, 2019
f3a9325
Fixes (Holiber Feedback)
AnkhHeart Feb 23, 2019
4c3e830
Removed browser specific transitions
AnkhHeart Feb 25, 2019
add2657
ignore .env
AnkhHeart Feb 26, 2019
70b39b9
Remove env variable
AnkhHeart Feb 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes (Holiber Feedback)
- Updated update timer, passes Date.now()
- Removed unecessary injection
- Removed uuid mentions
- Added TODO comment
  • Loading branch information
AnkhHeart committed Feb 23, 2019
commit f3a9325fea1a7251b865e0d94dcead292453f8fb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component, Prop } from 'vue-property-decorator';
import { ISourceApi } from 'services/sources';
import { WidgetType } from 'services/widgets';
import { NavigationService } from 'services/navigation';
import { ChatbotApiService } from 'services/chatbot';
import { WindowsService } from 'services/windows';
import { Inject } from 'util/injector';
import { UserService } from 'services/user';
Expand All @@ -15,7 +14,6 @@ export default class WidgetProperties extends Vue {
@Inject() navigationService: NavigationService;
@Inject() windowsService: WindowsService;
@Inject() userService: UserService;
@Inject() chatbotApiChatbotApiService: ChatbotApiService;

get isLoggedIn() {
return this.userService.isLoggedIn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default class ChatbotModules extends ChatbotBase {
});
},
},
// TODO: Commented for the time being seeing as it's not ready
/*{
Copy link
Contributor

@holiber holiber Feb 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it's commented? If you need to keep it commented pls add // TODO: explanation

title: $t('Song Request'),
description: $t(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,18 @@ export default class ChatbotCommandPreferencesWindow extends ChatbotWindowsBase
required: true,
max: 450,
placeholder: $t('Cost Message'),
uuid: $t('Cost Message'),
}),
permission: metadataHelper.text({
type: EInputType.text,
required: true,
max: 450,
placeholder: $t('Permission Message'),
uuid: $t('Permission Message'),
}),
cooldown: metadataHelper.text({
type: EInputType.text,
required: true,
max: 450,
placeholder: $t('Cooldown Message'),
uuid: $t('Cooldown Message'),
}),
};
}
Expand Down
16 changes: 10 additions & 6 deletions app/services/chatbot/chatbot-betting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ export class ChatbotBettingApiService extends PersistentStatefulService<
this.socket.removeAllListeners();
}

this.UPDATE_TIMER();
this.UPDATE_TIMER(Date.now());
// @ts-ignore - weird stuff going on with NodeJs.Timer & number ...
this.timer = setInterval(this.UPDATE_TIMER, 1000);
this.timer = setInterval(() => {
this.UPDATE_TIMER(Date.now());
}, 1000);

this.socket = io.connect(
this.socketUrl,
Expand Down Expand Up @@ -254,10 +256,12 @@ export class ChatbotBettingApiService extends PersistentStatefulService<
// Timer
//
@mutation()
private UPDATE_TIMER() {
private UPDATE_TIMER(now: number) {
const activePoll = this.state.activeBettingResponse;
const containsSettings =
activePoll.settings !== undefined && activePoll.settings.timer !== undefined;
activePoll.settings !== undefined &&
activePoll.settings.timer !== undefined &&
activePoll.settings.timer.enabled !== null;

if (!containsSettings) {
return;
Expand All @@ -267,13 +271,13 @@ export class ChatbotBettingApiService extends PersistentStatefulService<
const startedTimer = activePoll.settings.timer.started_at !== undefined;

if (containsSettings && containsTimer && startedTimer) {
const timeElapsed = Date.now() - activePoll.settings.timer.started_at;
const timeElapsed = now - activePoll.settings.timer.started_at;
const timerLength = activePoll.settings.timer.time_remaining * 1000;

const duration = moment.duration(Math.max(0, timerLength - timeElapsed));
this.state.timeRemaining = moment.utc(duration.asMilliseconds()).format('HH:mm:ss');
} else if (!activePoll.settings.timer.enabled) {
const timeElapsed = Date.now() - Date.parse(activePoll.created_at);
const timeElapsed = now - Date.parse(activePoll.created_at);
const duration = moment.duration(Math.max(0, timeElapsed));
this.state.timeRemaining = moment.utc(duration.asMilliseconds()).format('HH:mm:ss');
}
Expand Down
18 changes: 11 additions & 7 deletions app/services/chatbot/chatbot-poll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ export class ChatbotPollApiService extends PersistentStatefulService<IChatbotPol
this.socket.removeAllListeners();
}

this.UPDATE_TIMER();
this.UPDATE_TIMER(Date.now());
// @ts-ignore - weird stuff going on with NodeJs.Timer & number ...
this.timer = setInterval(this.UPDATE_TIMER, 1000);
this.timer = setInterval(() => {
this.UPDATE_TIMER(Date.now());
}, 1000);

this.socket = io.connect(
this.socketUrl,
Expand Down Expand Up @@ -238,10 +240,12 @@ export class ChatbotPollApiService extends PersistentStatefulService<IChatbotPol
// Timer
//
@mutation()
private UPDATE_TIMER() {
private UPDATE_TIMER(now: number) {
const activePoll = this.state.activePollResponse;
const containsSettings =
activePoll.settings !== undefined && activePoll.settings.timer !== undefined;
activePoll.settings !== undefined &&
activePoll.settings.timer !== undefined &&
activePoll.settings.timer.enabled !== null;

if (!containsSettings) {
return;
Expand All @@ -251,13 +255,13 @@ export class ChatbotPollApiService extends PersistentStatefulService<IChatbotPol
const startedTimer = activePoll.settings.timer.started_at !== undefined;

if (containsSettings && containsTimer && startedTimer) {
const timeElapsed = Date.now() - activePoll.settings.timer.started_at;
const timeElapsed = now - activePoll.settings.timer.started_at;
const timerLength = activePoll.settings.timer.time_remaining * 1000;

const duration = moment.duration(Math.max(0, timerLength - timeElapsed));

this.state.timeRemaining = moment.utc(duration.asMilliseconds()).format('HH:mm:ss');
} else if (!activePoll.settings.timer.enabled) {
const timeElapsed = Date.now() - Date.parse(activePoll.created_at);
const timeElapsed = now - Date.parse(activePoll.created_at);
const duration = moment.duration(Math.max(0, timeElapsed));
this.state.timeRemaining = moment.utc(duration.asMilliseconds()).format('HH:mm:ss');
}
Expand Down