Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chatterbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
element-hq
Chatterbox
Commits
6d67677d
Commit
6d67677d
authored
2 years ago
by
RMidhunSuresh
Browse files
Options
Downloads
Patches
Plain Diff
Create and pass footer vm to everywhere needed
parent
2756ba68
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/viewmodels/AccountSetupViewModel.ts
+4
-0
4 additions, 0 deletions
src/viewmodels/AccountSetupViewModel.ts
src/viewmodels/ChatterboxViewModel.ts
+4
-0
4 additions, 0 deletions
src/viewmodels/ChatterboxViewModel.ts
src/viewmodels/RootViewModel.ts
+5
-0
5 additions, 0 deletions
src/viewmodels/RootViewModel.ts
with
13 additions
and
0 deletions
src/viewmodels/AccountSetupViewModel.ts
+
4
−
0
View file @
6d67677d
...
...
@@ -109,4 +109,8 @@ export class AccountSetupViewModel extends ViewModel {
get
privacyPolicyLink
()
{
return
this
.
_privacyPolicyLink
;
}
get
footerViewModel
()
{
return
this
.
options
.
footerVM
;
}
}
This diff is collapsed.
Click to expand it.
src/viewmodels/ChatterboxViewModel.ts
+
4
−
0
View file @
6d67677d
...
...
@@ -119,4 +119,8 @@ export class ChatterboxViewModel extends ViewModel {
private
get
_session
()
{
return
this
.
_client
.
session
;
}
get
footerViewModel
()
{
return
this
.
options
.
footerVM
;
}
}
This diff is collapsed.
Click to expand it.
src/viewmodels/RootViewModel.ts
+
5
−
0
View file @
6d67677d
...
...
@@ -3,6 +3,7 @@ import { IChatterboxConfig } from "../types/IChatterboxConfig";
import
{
ChatterboxViewModel
}
from
"
./ChatterboxViewModel
"
;
import
"
hydrogen-view-sdk/style.css
"
;
import
{
AccountSetupViewModel
}
from
"
./AccountSetupViewModel
"
;
import
{
FooterViewModel
}
from
"
./FooterViewModel
"
;
import
{
MessageFromParent
}
from
"
../observables/MessageFromParent
"
;
type
Options
=
{
platform
:
typeof
Platform
,
navigation
:
typeof
Navigation
,
urlCreator
:
ReturnType
<
typeof
createRouter
>
,
startMinimized
:
boolean
};
...
...
@@ -16,12 +17,14 @@ export class RootViewModel extends ViewModel {
private
_messageFromParent
:
MessageFromParent
=
new
MessageFromParent
();
private
_startMinimized
:
boolean
;
private
_isWatchingNotificationCount
:
boolean
;
private
_footerViewModel
:
FooterViewModel
;
constructor
(
config
:
IChatterboxConfig
,
options
:
Options
)
{
super
(
options
);
this
.
_startMinimized
=
options
.
startMinimized
;
this
.
_config
=
config
;
this
.
_client
=
new
Client
(
this
.
platform
);
this
.
_footerViewModel
=
new
FooterViewModel
(
this
.
childOptions
({
config
:
this
.
_config
}));
this
.
_setupNavigation
();
this
.
_messageFromParent
.
on
(
"
maximize
"
,
()
=>
this
.
start
());
// Chatterbox can be minimized via the start button on the parent page!
...
...
@@ -60,6 +63,7 @@ export class RootViewModel extends ViewModel {
client
:
this
.
_client
,
config
:
this
.
_config
,
state
:
this
.
_state
,
footerVM
:
this
.
_footerViewModel
,
loginPromise
,
})
));
...
...
@@ -79,6 +83,7 @@ export class RootViewModel extends ViewModel {
client
:
this
.
_client
,
config
:
this
.
_config
,
state
:
this
.
_state
,
footerVM
:
this
.
_footerViewModel
,
})
));
this
.
emitChange
(
"
activeSection
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment