mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-14 04:13:52 +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()
|
||||
|
||||
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) {
|
||||
var style = {};
|
||||
var mapping = languageMappings[language];
|
||||
@@ -3201,7 +3214,7 @@ CefSharp.BindObjectAsync(
|
||||
text: `Update available!!<br>${this.latestAppVersion}`,
|
||||
timeout: 60000,
|
||||
callbacks: {
|
||||
onClick: () => VRCX.OpenRepository()
|
||||
onClick: () => VRCX.OpenLink('https://github.com/pypy-vrc/VRCX/releases')
|
||||
}
|
||||
}).show();
|
||||
this.notifyMenu('more');
|
||||
|
||||
@@ -553,7 +553,7 @@
|
||||
<span v-else class="extra">Click to refresh</span>
|
||||
</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">
|
||||
<span class="name">Repository URL</span>
|
||||
<span class="extra">https://github.com/pypy-vrc/VRCX</span>
|
||||
@@ -609,7 +609,7 @@
|
||||
<template #content>
|
||||
<span v-text="link"></span>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1034,7 +1034,7 @@
|
||||
<template #content>
|
||||
<span v-text="link"></span>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user