Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Implement desktop notification options
Browse files Browse the repository at this point in the history
  • Loading branch information
nakajisan committed Mar 11, 2024
1 parent 920c6a6 commit 539e8a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/server/api/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const electron_1 = require("electron");
const utils_1 = require("../utils");
const router = express_1.default.Router();
router.post('/', (req, res) => {
const { title, body } = req.body;
const notification = new electron_1.Notification({ title, body });
const { title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml } = req.body;
const notification = new electron_1.Notification({ title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml });
notification.on("click", (event) => {
(0, utils_1.notifyLaravel)('events', {
event: '\\Native\\Laravel\\Events\\Notifications\\NotificationClicked',
Expand Down
4 changes: 2 additions & 2 deletions src/server/api/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {notifyLaravel} from "../utils";
const router = express.Router();

router.post('/', (req, res) => {
const {title, body} = req.body
const {title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml} = req.body

const notification = new Notification({title, body});
const notification = new Notification({title, body, subtitle, silent, icon, hasReply, timeoutType, replyPlaceholder, sound, urgency, actions, closeButtonText, toastXml});

notification.on("click", (event)=>{
notifyLaravel('events', {
Expand Down

0 comments on commit 539e8a5

Please sign in to comment.