mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Fix notifications crashing and table buttons moving on hover
This commit is contained in:
@@ -89,7 +89,7 @@ namespace VRCX
|
|||||||
/// <param name="body">The content of the notification.</param>
|
/// <param name="body">The content of the notification.</param>
|
||||||
/// <param name="timeout">[CURRENTLY UNUSED]The timeout of the notification.</param>
|
/// <param name="timeout">[CURRENTLY UNUSED]The timeout of the notification.</param>
|
||||||
/// <param name="image">The image of the notification.</param>
|
/// <param name="image">The image of the notification.</param>
|
||||||
public void OVRTNotification(bool hudNotification, bool wristNotification, string title, string body, int timeout, int opacity, string image = "")
|
public void OVRTNotification(bool hudNotification, bool wristNotification, string title, string body, int timeout, double opacity, string image = "")
|
||||||
{
|
{
|
||||||
List<OvrtMessage> messages = [];
|
List<OvrtMessage> messages = [];
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace VRCX
|
|||||||
/// <param name="content">The content of the notification.</param>
|
/// <param name="content">The content of the notification.</param>
|
||||||
/// <param name="timeout">The duration of the notification in milliseconds.</param>
|
/// <param name="timeout">The duration of the notification in milliseconds.</param>
|
||||||
/// <param name="image">The optional image to display in the notification.</param>
|
/// <param name="image">The optional image to display in the notification.</param>
|
||||||
public void XSNotification(string title, string content, int timeout, int opacity, string image = "")
|
public void XSNotification(string title, string content, int timeout, double opacity, string image = "")
|
||||||
{
|
{
|
||||||
var broadcastSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
var broadcastSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||||
var endPoint = new IPEndPoint(IPAddress.Loopback, 42069);
|
var endPoint = new IPEndPoint(IPAddress.Loopback, 42069);
|
||||||
@@ -44,7 +44,7 @@ namespace VRCX
|
|||||||
audioPath = string.Empty,
|
audioPath = string.Empty,
|
||||||
useBase64Icon = useBase64Icon,
|
useBase64Icon = useBase64Icon,
|
||||||
icon = icon,
|
icon = icon,
|
||||||
opacity = opacity / 100f
|
opacity = (float)opacity
|
||||||
};
|
};
|
||||||
|
|
||||||
var byteBuffer = JsonSerializer.SerializeToUtf8Bytes(msg);
|
var byteBuffer = JsonSerializer.SerializeToUtf8Bytes(msg);
|
||||||
|
|||||||
+9
-9
@@ -87,17 +87,17 @@
|
|||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table .cell {
|
// .el-table .cell {
|
||||||
display: -webkit-box;
|
// display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
// -webkit-box-orient: vertical;
|
||||||
// -webkit-line-clamp: 1;
|
// -webkit-line-clamp: 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// expand table cell on hover, TODO: replace with a better solution
|
// expand table cell on hover, TODO: replace with a better solution
|
||||||
.el-table__row:hover .el-table__cell .cell {
|
// .el-table__row:hover .el-table__cell .cell {
|
||||||
-webkit-box-orient: unset;
|
// -webkit-box-orient: unset;
|
||||||
-webkit-line-clamp: unset;
|
// -webkit-line-clamp: unset;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.el-table th.is-sortable .cell {
|
.el-table th.is-sortable .cell {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -570,9 +570,10 @@ export default class extends baseClass {
|
|||||||
},
|
},
|
||||||
|
|
||||||
displayXSNotification(noty, message, image) {
|
displayXSNotification(noty, message, image) {
|
||||||
var timeout = Math.floor(
|
const timeout = Math.floor(
|
||||||
parseInt(this.notificationTimeout, 10) / 1000
|
parseInt(this.notificationTimeout, 10) / 1000
|
||||||
);
|
);
|
||||||
|
const opacity = parseFloat(this.notificationOpacity) / 100;
|
||||||
switch (noty.type) {
|
switch (noty.type) {
|
||||||
case 'OnPlayerJoined':
|
case 'OnPlayerJoined':
|
||||||
AppApi.XSNotification(
|
AppApi.XSNotification(
|
||||||
@@ -968,9 +969,10 @@ export default class extends baseClass {
|
|||||||
message,
|
message,
|
||||||
image
|
image
|
||||||
) {
|
) {
|
||||||
var timeout = Math.floor(
|
const timeout = Math.floor(
|
||||||
parseInt(this.notificationTimeout, 10) / 1000
|
parseInt(this.notificationTimeout, 10) / 1000
|
||||||
);
|
);
|
||||||
|
const opacity = parseFloat(this.notificationOpacity) / 100;
|
||||||
switch (noty.type) {
|
switch (noty.type) {
|
||||||
case 'OnPlayerJoined':
|
case 'OnPlayerJoined':
|
||||||
AppApi.OVRTNotification(
|
AppApi.OVRTNotification(
|
||||||
|
|||||||
@@ -788,9 +788,9 @@ mixin settingsTab
|
|||||||
el-tab-pane(lazy :label='$t("view.settings.category.pictures")')
|
el-tab-pane(lazy :label='$t("view.settings.category.pictures")')
|
||||||
.options-container(style='margin-top: 0')
|
.options-container(style='margin-top: 0')
|
||||||
span.header {{ $t('view.settings.category.pictures') }}
|
span.header {{ $t('view.settings.category.pictures') }}
|
||||||
|
.options-container-item(style='margin-top: 15px')
|
||||||
.options-container
|
el-button-group
|
||||||
el-button(size='small' icon='el-icon-picture' @click='showScreenshotMetadataDialog()') {{ $t('view.settings.advanced.advanced.screenshot_metadata') }}
|
el-button(size='small' icon='el-icon-picture' @click='showScreenshotMetadataDialog()') {{ $t('view.settings.advanced.advanced.screenshot_metadata') }}
|
||||||
|
|
||||||
.options-container
|
.options-container
|
||||||
span.header {{ $t('view.settings.pictures.pictures.open_folder') }}
|
span.header {{ $t('view.settings.pictures.pictures.open_folder') }}
|
||||||
|
|||||||
Reference in New Issue
Block a user