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