mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Clean up, handle sentry init fail
This commit is contained in:
Generated
+45
-36
@@ -3,6 +3,11 @@
|
|||||||
// This work is licensed under the terms of the MIT license.
|
// This work is licensed under the terms of the MIT license.
|
||||||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace VRCX
|
namespace VRCX
|
||||||
{
|
{
|
||||||
partial class MainForm
|
partial class MainForm
|
||||||
@@ -10,7 +15,7 @@ namespace VRCX
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 필수 디자이너 변수입니다.
|
/// 필수 디자이너 변수입니다.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 사용 중인 모든 리소스를 정리합니다.
|
/// 사용 중인 모든 리소스를 정리합니다.
|
||||||
@@ -22,6 +27,7 @@ namespace VRCX
|
|||||||
{
|
{
|
||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,85 +39,88 @@ namespace VRCX
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new Container();
|
||||||
this.TrayMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.TrayMenu = new ContextMenuStrip(this.components);
|
||||||
this.TrayMenu_Open = new System.Windows.Forms.ToolStripMenuItem();
|
this.TrayMenu_Open = new ToolStripMenuItem();
|
||||||
this.TrayMenu_DevTools = new System.Windows.Forms.ToolStripMenuItem();
|
this.TrayMenu_DevTools = new ToolStripMenuItem();
|
||||||
this.TrayMenu_Separator = new System.Windows.Forms.ToolStripSeparator();
|
this.TrayMenu_Separator = new ToolStripSeparator();
|
||||||
this.TrayMenu_Quit = new System.Windows.Forms.ToolStripMenuItem();
|
this.TrayMenu_Quit = new ToolStripMenuItem();
|
||||||
this.TrayIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
this.TrayIcon = new NotifyIcon(this.components);
|
||||||
|
this.TrayMenu.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
|
||||||
this.TrayMenu.SuspendLayout();
|
this.TrayMenu.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// TrayMenu
|
// TrayMenu
|
||||||
//
|
//
|
||||||
this.TrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.TrayMenu.Items.AddRange(new ToolStripItem[]
|
||||||
|
{
|
||||||
this.TrayMenu_Open,
|
this.TrayMenu_Open,
|
||||||
this.TrayMenu_DevTools,
|
this.TrayMenu_DevTools,
|
||||||
this.TrayMenu_Separator,
|
this.TrayMenu_Separator,
|
||||||
this.TrayMenu_Quit});
|
this.TrayMenu_Quit
|
||||||
|
});
|
||||||
this.TrayMenu.Name = "TrayMenu";
|
this.TrayMenu.Name = "TrayMenu";
|
||||||
this.TrayMenu.Size = new System.Drawing.Size(132, 54);
|
this.TrayMenu.Size = new Size(132, 54);
|
||||||
//
|
//
|
||||||
// TrayMenu_Open
|
// TrayMenu_Open
|
||||||
//
|
//
|
||||||
this.TrayMenu_Open.Name = "TrayMenu_Open";
|
this.TrayMenu_Open.Name = "TrayMenu_Open";
|
||||||
this.TrayMenu_Open.Size = new System.Drawing.Size(131, 22);
|
this.TrayMenu_Open.Size = new Size(131, 22);
|
||||||
this.TrayMenu_Open.Text = "Open";
|
this.TrayMenu_Open.Text = "Open";
|
||||||
this.TrayMenu_Open.Click += new System.EventHandler(this.TrayMenu_Open_Click);
|
this.TrayMenu_Open.Click += new EventHandler(this.TrayMenu_Open_Click);
|
||||||
//
|
//
|
||||||
// TrayMenu_DevTools
|
// TrayMenu_DevTools
|
||||||
//
|
//
|
||||||
this.TrayMenu_DevTools.Name = "TrayMenu_DevTools";
|
this.TrayMenu_DevTools.Name = "TrayMenu_DevTools";
|
||||||
this.TrayMenu_DevTools.Size = new System.Drawing.Size(131, 22);
|
this.TrayMenu_DevTools.Size = new Size(131, 22);
|
||||||
this.TrayMenu_DevTools.Text = "DevTools";
|
this.TrayMenu_DevTools.Text = "DevTools";
|
||||||
this.TrayMenu_DevTools.Click += new System.EventHandler(this.TrayMenu_DevTools_Click);
|
this.TrayMenu_DevTools.Click += new EventHandler(this.TrayMenu_DevTools_Click);
|
||||||
//
|
//
|
||||||
// TrayMenu_Separator
|
// TrayMenu_Separator
|
||||||
//
|
//
|
||||||
this.TrayMenu_Separator.Name = "TrayMenu_Separator";
|
this.TrayMenu_Separator.Name = "TrayMenu_Separator";
|
||||||
this.TrayMenu_Separator.Size = new System.Drawing.Size(128, 6);
|
this.TrayMenu_Separator.Size = new Size(128, 6);
|
||||||
//
|
//
|
||||||
// TrayMenu_Quit
|
// TrayMenu_Quit
|
||||||
//
|
//
|
||||||
this.TrayMenu_Quit.Name = "TrayMenu_Quit";
|
this.TrayMenu_Quit.Name = "TrayMenu_Quit";
|
||||||
this.TrayMenu_Quit.Size = new System.Drawing.Size(131, 22);
|
this.TrayMenu_Quit.Size = new Size(131, 22);
|
||||||
this.TrayMenu_Quit.Text = "Quit VRCX";
|
this.TrayMenu_Quit.Text = "Quit VRCX";
|
||||||
this.TrayMenu_Quit.Click += new System.EventHandler(this.TrayMenu_Quit_Click);
|
this.TrayMenu_Quit.Click += new EventHandler(this.TrayMenu_Quit_Click);
|
||||||
//
|
//
|
||||||
// TrayIcon
|
// TrayIcon
|
||||||
//
|
//
|
||||||
this.TrayIcon.ContextMenuStrip = this.TrayMenu;
|
this.TrayIcon.ContextMenuStrip = this.TrayMenu;
|
||||||
this.TrayIcon.Text = "VRCX";
|
this.TrayIcon.Text = "VRCX";
|
||||||
this.TrayIcon.Visible = true;
|
this.TrayIcon.Visible = true;
|
||||||
this.TrayIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TrayIcon_MouseClick);
|
this.TrayIcon.MouseClick += new MouseEventHandler(this.TrayIcon_MouseClick);
|
||||||
//
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
this.AutoScaleDimensions = new SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
this.AutoScaleMode = AutoScaleMode.Dpi;
|
||||||
this.ClientSize = new System.Drawing.Size(842, 561);
|
this.ClientSize = new Size(842, 561);
|
||||||
this.MinimumSize = new System.Drawing.Size(320, 240);
|
this.MinimumSize = new Size(320, 240);
|
||||||
this.Name = "MainForm";
|
this.Name = "MainForm";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = FormStartPosition.CenterScreen;
|
||||||
this.Text = Program.Version;
|
this.Text = Program.Version;
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
this.FormClosing += new FormClosingEventHandler(this.MainForm_FormClosing);
|
||||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed);
|
this.FormClosed += new FormClosedEventHandler(this.MainForm_FormClosed);
|
||||||
this.Load += new System.EventHandler(this.MainForm_Load);
|
this.Load += new EventHandler(this.MainForm_Load);
|
||||||
this.Move += new System.EventHandler(this.MainForm_Move);
|
this.Move += new EventHandler(this.MainForm_Move);
|
||||||
this.Resize += new System.EventHandler(this.MainForm_Resize);
|
this.Resize += new EventHandler(this.MainForm_Resize);
|
||||||
this.TrayMenu.ResumeLayout(false);
|
this.TrayMenu.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.ContextMenuStrip TrayMenu;
|
private ContextMenuStrip TrayMenu;
|
||||||
private System.Windows.Forms.ToolStripMenuItem TrayMenu_Open;
|
private ToolStripMenuItem TrayMenu_Open;
|
||||||
private System.Windows.Forms.ToolStripMenuItem TrayMenu_DevTools;
|
private ToolStripMenuItem TrayMenu_DevTools;
|
||||||
private System.Windows.Forms.ToolStripSeparator TrayMenu_Separator;
|
private ToolStripSeparator TrayMenu_Separator;
|
||||||
private System.Windows.Forms.ToolStripMenuItem TrayMenu_Quit;
|
private ToolStripMenuItem TrayMenu_Quit;
|
||||||
private System.Windows.Forms.NotifyIcon TrayIcon;
|
private NotifyIcon TrayIcon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -456,9 +456,13 @@
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!sentryErrorReporting.value) return;
|
if (!sentryErrorReporting.value) return;
|
||||||
|
try {
|
||||||
const feedback = Sentry.getFeedback();
|
const feedback = Sentry.getFeedback();
|
||||||
feedback?.attachTo(document.getElementById('feedback'));
|
feedback?.attachTo(document.getElementById('feedback'));
|
||||||
window.addEventListener('keydown', handleKeydown);
|
window.addEventListener('keydown', handleKeydown);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error setting up Sentry feedback:', error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import configRepository from '../service/config';
|
|||||||
import * as Sentry from '@sentry/vue';
|
import * as Sentry from '@sentry/vue';
|
||||||
|
|
||||||
export async function initSentry(app) {
|
export async function initSentry(app) {
|
||||||
|
try {
|
||||||
const enabled = await configRepository.getString(
|
const enabled = await configRepository.getString(
|
||||||
'VRCX_SentryEnabled',
|
'VRCX_SentryEnabled',
|
||||||
'false'
|
'false'
|
||||||
@@ -31,7 +32,6 @@ export async function initSentry(app) {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
const dsn = atob(response.data);
|
const dsn = atob(response.data);
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
app,
|
app,
|
||||||
|
|||||||
Reference in New Issue
Block a user