Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Ntfy_archive
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
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
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
TeDomum
Ntfy_archive
Commits
6f9fba99
Commit
6f9fba99
authored
3 years ago
by
Philipp Heckel
Browse files
Options
Downloads
Patches
Plain Diff
Notification sound
parent
317621c6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+6
-0
6 additions, 0 deletions
README.md
server/index.html
+1
-0
1 addition, 0 deletions
server/index.html
server/static/js/app.js
+2
-0
2 additions, 0 deletions
server/static/js/app.js
server/static/sound/mixkit-long-pop-2358.wav
+0
-0
0 additions, 0 deletions
server/static/sound/mixkit-long-pop-2358.wav
with
9 additions
and
0 deletions
README.md
+
6
−
0
View file @
6f9fba99
...
@@ -127,3 +127,9 @@ I welcome any and all contributions. Just create a PR or an issue.
...
@@ -127,3 +127,9 @@ I welcome any and all contributions. Just create a PR or an issue.
## License
## License
Made with ❤️ by
[
Philipp C. Heckel
](
https://heckel.io
)
, distributed under the
[
Apache License 2.0
](
LICENSE
)
.
Made with ❤️ by
[
Philipp C. Heckel
](
https://heckel.io
)
, distributed under the
[
Apache License 2.0
](
LICENSE
)
.
Third party libraries and resources:
*
[
github.com/urfave/cli/v2
](
https://github.com/urfave/cli/v2
)
(
MIT
)
is used to drive the CLI
*
[
Mixkit sound
](
https://mixkit.co/free-sound-effects/notification/
)
(
Mixkit
Free License) used as notification sound
*
[
Lato Font
](
https://www.latofonts.com/
)
(
OFL
)
is used as a font in the Web UI
*
[
GoReleaser
](
https://goreleaser.com/
)
(
MIT
)
is used to create releases
This diff is collapsed.
Click to expand it.
server/index.html
+
1
−
0
View file @
6f9fba99
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
</form>
</form>
<p
id=
"topicsHeader"
>
Subscribed topics:
</p>
<p
id=
"topicsHeader"
>
Subscribed topics:
</p>
<ul
id=
"topicsList"
></ul>
<ul
id=
"topicsList"
></ul>
<audio
id=
"notifySound"
src=
"static/sound/mixkit-long-pop-2358.wav"
></audio>
<h3>
Subscribe via your app, or via the CLI
</h3>
<h3>
Subscribe via your app, or via the CLI
</h3>
<code>
<code>
...
...
This diff is collapsed.
Click to expand it.
server/static/js/app.js
+
2
−
0
View file @
6f9fba99
...
@@ -14,6 +14,7 @@ let topics = {};
...
@@ -14,6 +14,7 @@ let topics = {};
const
topicsHeader
=
document
.
getElementById
(
"
topicsHeader
"
);
const
topicsHeader
=
document
.
getElementById
(
"
topicsHeader
"
);
const
topicsList
=
document
.
getElementById
(
"
topicsList
"
);
const
topicsList
=
document
.
getElementById
(
"
topicsList
"
);
const
topicField
=
document
.
getElementById
(
"
topicField
"
);
const
topicField
=
document
.
getElementById
(
"
topicField
"
);
const
notifySound
=
document
.
getElementById
(
"
notifySound
"
);
const
subscribeButton
=
document
.
getElementById
(
"
subscribeButton
"
);
const
subscribeButton
=
document
.
getElementById
(
"
subscribeButton
"
);
const
subscribeForm
=
document
.
getElementById
(
"
subscribeForm
"
);
const
subscribeForm
=
document
.
getElementById
(
"
subscribeForm
"
);
const
errorField
=
document
.
getElementById
(
"
error
"
);
const
errorField
=
document
.
getElementById
(
"
error
"
);
...
@@ -59,6 +60,7 @@ const subscribeInternal = (topic, delaySec) => {
...
@@ -59,6 +60,7 @@ const subscribeInternal = (topic, delaySec) => {
eventSource
.
onmessage
=
(
e
)
=>
{
eventSource
.
onmessage
=
(
e
)
=>
{
const
event
=
JSON
.
parse
(
e
.
data
);
const
event
=
JSON
.
parse
(
e
.
data
);
new
Notification
(
event
.
message
);
new
Notification
(
event
.
message
);
notifySound
.
play
();
};
};
topics
[
topic
]
=
eventSource
;
topics
[
topic
]
=
eventSource
;
localStorage
.
setItem
(
'
topics
'
,
JSON
.
stringify
(
Object
.
keys
(
topics
)));
localStorage
.
setItem
(
'
topics
'
,
JSON
.
stringify
(
Object
.
keys
(
topics
)));
...
...
This diff is collapsed.
Click to expand it.
server/static/sound/mixkit-long-pop-2358.wav
0 → 100644
+
0
−
0
View file @
6f9fba99
File added
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