mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
open external link
This commit is contained in:
7
VRCX.cs
7
VRCX.cs
@@ -78,9 +78,12 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OpenRepository()
|
public void OpenLink(string url)
|
||||||
{
|
{
|
||||||
Process.Start("https://github.com/pypy-vrc/VRCX").Close();
|
if (url.StartsWith("http://") || url.StartsWith("https://"))
|
||||||
|
{
|
||||||
|
Process.Start(url).Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowVRForm()
|
public void ShowVRForm()
|
||||||
|
|||||||
15
html/app.js
15
html/app.js
@@ -3179,6 +3179,19 @@ CefSharp.BindObjectAsync(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$app.methods.openExternalLink = function (link) {
|
||||||
|
this.$confirm(`${link}`, 'Open External Link', {
|
||||||
|
confirmButtonText: 'Confirm',
|
||||||
|
cancelButtonText: 'Cancel',
|
||||||
|
type: 'info',
|
||||||
|
callback: (action) => {
|
||||||
|
if (action === 'confirm') {
|
||||||
|
VRCX.OpenLink(link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
$app.methods.languageClass = function (language) {
|
$app.methods.languageClass = function (language) {
|
||||||
var style = {};
|
var style = {};
|
||||||
var mapping = languageMappings[language];
|
var mapping = languageMappings[language];
|
||||||
@@ -3201,7 +3214,7 @@ CefSharp.BindObjectAsync(
|
|||||||
text: `Update available!!<br>${this.latestAppVersion}`,
|
text: `Update available!!<br>${this.latestAppVersion}`,
|
||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
callbacks: {
|
callbacks: {
|
||||||
onClick: () => VRCX.OpenRepository()
|
onClick: () => VRCX.OpenLink('https://github.com/pypy-vrc/VRCX/releases')
|
||||||
}
|
}
|
||||||
}).show();
|
}).show();
|
||||||
this.notifyMenu('more');
|
this.notifyMenu('more');
|
||||||
|
|||||||
@@ -553,7 +553,7 @@
|
|||||||
<span v-else class="extra">Click to refresh</span>
|
<span v-else class="extra">Click to refresh</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x-friend-item" @click="VRCX.OpenRepository()">
|
<div class="x-friend-item" @click="openExternalLink('https://github.com/pypy-vrc/VRCX')">
|
||||||
<div class="detail">
|
<div class="detail">
|
||||||
<span class="name">Repository URL</span>
|
<span class="name">Repository URL</span>
|
||||||
<span class="extra">https://github.com/pypy-vrc/VRCX</span>
|
<span class="extra">https://github.com/pypy-vrc/VRCX</span>
|
||||||
@@ -609,7 +609,7 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<span v-text="link"></span>
|
<span v-text="link"></span>
|
||||||
</template>
|
</template>
|
||||||
<img :src="getFaviconUrl(link)" style="width:16px;height:16px;vertical-align:middle;margin-right:5px">
|
<img :src="getFaviconUrl(link)" style="width:16px;height:16px;vertical-align:middle;margin-right:5px" @click.stop="openExternalLink(link)">
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1034,7 +1034,7 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<span v-text="link"></span>
|
<span v-text="link"></span>
|
||||||
</template>
|
</template>
|
||||||
<img :src="getFaviconUrl(link)" style="width:16px;height:16px;vertical-align:middle;margin-right:5px">
|
<img :src="getFaviconUrl(link)" style="width:16px;height:16px;vertical-align:middle;margin-right:5px" @click.stop="openExternalLink(link)">>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user