Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PlayWallCompanion
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PlayWall
PlayWallCompanion
Commits
d6cf863d
Commit
d6cf863d
authored
1 year ago
by
Tobias Ullerich
Browse files
Options
Downloads
Patches
Plain Diff
#195 - Fetch current page on initial connection
parent
b029aeba
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
main.js
+3
-1
3 additions, 1 deletion
main.js
receive/current_page_request.js
+11
-0
11 additions, 0 deletions
receive/current_page_request.js
receive/project_update.js
+2
-0
2 additions, 0 deletions
receive/project_update.js
with
16 additions
and
1 deletion
main.js
+
3
−
1
View file @
d6cf863d
...
@@ -8,6 +8,7 @@ const Project = require("./project");
...
@@ -8,6 +8,7 @@ const Project = require("./project");
const
PadNameUpdate
=
require
(
"
./receive/pad_name_update
"
);
const
PadNameUpdate
=
require
(
"
./receive/pad_name_update
"
);
const
PadStatusUpdate
=
require
(
"
./receive/pad_status_update
"
);
const
PadStatusUpdate
=
require
(
"
./receive/pad_status_update
"
);
const
CurrentPageUpdate
=
require
(
"
./receive/current_page_update
"
);
const
CurrentPageUpdate
=
require
(
"
./receive/current_page_update
"
);
const
CurrentPageRequest
=
require
(
"
./receive/current_page_request
"
);
const
uuid
=
require
(
'
uuid
'
);
const
uuid
=
require
(
'
uuid
'
);
const
presets
=
require
(
'
./presets
'
);
const
presets
=
require
(
'
./presets
'
);
...
@@ -20,7 +21,8 @@ class ModuleInstance extends InstanceBase {
...
@@ -20,7 +21,8 @@ class ModuleInstance extends InstanceBase {
'
project-current
'
:
new
ProjectUpdate
(),
'
project-current
'
:
new
ProjectUpdate
(),
'
pad-name-changed
'
:
new
PadNameUpdate
(),
'
pad-name-changed
'
:
new
PadNameUpdate
(),
'
pad-status-changed
'
:
new
PadStatusUpdate
(),
'
pad-status-changed
'
:
new
PadStatusUpdate
(),
'
current-page-changed
'
:
new
CurrentPageUpdate
()
'
current-page-changed
'
:
new
CurrentPageUpdate
(),
'
current-page-request
'
:
new
CurrentPageRequest
()
};
};
currentProject
=
new
Project
({});
currentProject
=
new
Project
({});
...
...
This diff is collapsed.
Click to expand it.
receive/current_page_request.js
0 → 100644
+
11
−
0
View file @
d6cf863d
const
MessageExecutable
=
require
(
"
./message_executable
"
);
module
.
exports
=
class
CurrentPageRequest
extends
MessageExecutable
{
handleMessage
(
plugin
,
message
)
{
plugin
.
currentProject
.
updateCurrentPage
(
message
.
page
);
plugin
.
checkFeedbacks
();
plugin
.
updateVariablesForCurrentPage
();
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
receive/project_update.js
+
2
−
0
View file @
d6cf863d
...
@@ -5,6 +5,8 @@ module.exports = class ProjectUpdate extends MessageExecutable {
...
@@ -5,6 +5,8 @@ module.exports = class ProjectUpdate extends MessageExecutable {
handleMessage
(
plugin
,
message
)
{
handleMessage
(
plugin
,
message
)
{
plugin
.
currentProject
=
new
Project
(
message
)
plugin
.
currentProject
=
new
Project
(
message
)
plugin
.
sendToWebSocket
(
'
current-page-request
'
,
{});
plugin
.
checkFeedbacks
();
plugin
.
checkFeedbacks
();
plugin
.
updateVariables
()
plugin
.
updateVariables
()
...
...
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