node.js - 场景设置为“incomingCall”的 Windows 10 Toast 通知扰乱了通知 UI
问题描述
我正在开发一个使用 NodeRT 在 Windows 10 中显示 toast 通知的 Electron 应用程序。到目前为止,我的工作正常,并且“ToastGeneric”通知显示正常。
该应用程序应在收到来电时向用户显示通知。
一个普通的吐司就可以了:
但是,如果我在 中添加一个scenario="incomingCall"
,<toast>
它会弄乱 UI。
我在任何地方都找不到有关此行为的任何适当文档。我什至尝试使用 Microsoft 提供的代码示例,但这也不起作用。
知道这哪里出错了吗?
这是我的吐司有效载荷:
<toast>
<visual>
<binding template='ToastGeneric'>
<text>%s</text>
<text>%s, %s</text>
<group>
<subgroup>
<text hint-style="base">52 attendees</text>
<text hint-style="captionSubtle">23 minute drive</text>
</subgroup>
<subgroup>
<text hint-style="captionSubtle" hint-align="right">1 Microsoft Way</text>
<text hint-style="captionSubtle" hint-align="right">Bellevue, WA 98008</text>
</subgroup>
</group>
</binding>
</visual>
<actions>
<action arguments = 'answer'
content = 'answer' />
<action arguments = 'ignore'
content = 'ignore' />
</actions>
</toast>
解决方案
根据@Richard Zhang 提供的建议,我在 Notifications Visualizer 中试用了该模板。
它产生了与我通过 NodeRT 看到的相同的混乱 UI。似乎该incomingCall
场景强制要求模板在正文之后提供两个(或三个,我不记得确切)按钮。然后是最后一行,带有“回答”和“拒绝”按钮。
能够使用这种场景真的很酷,但是,我不得不使用常规的 toast 通知。
推荐阅读
- c# - C# MVC .Net Core 表单,强类型表单,不工作(404 错误)
- python - Azure Spot 实例创建问题
- python-3.x - 使用 python 进行多部分/表单数据发布请求
- python - 如何更改 Pygame 坐标系,使窗口的中心为 (0,0)?
- javascript - JQuery为表单验证val()函数查找具有重复值的所有元素不返回用户输入的值
- c++ - 我在 C++ 控制台中制作了一个移动的屏幕保护程序,但是当它到达角落时有一个错误
- javascript - 以短方式返回数组的一半
- python - 使用 SSL 公钥/私钥在 Windows 上为 Flask 应用程序提供服务员
- css - 如何在 div 的同一行中对齐内容和箭头?
- scala - 从种类中提取类型