mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 01:22:25 +02:00
Merge pull request #405 from kasenvr/v0.86.0-k2.1
Merge K2.1 into Master
This commit is contained in:
commit
8157be5b5a
12 changed files with 79 additions and 52 deletions
|
@ -1092,8 +1092,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
{
|
||||
// identify gpu as early as possible to help identify OpenGL initialization errors.
|
||||
auto gpuIdent = GPUIdent::getInstance();
|
||||
setCrashAnnotation("gpu_name", gpuIdent->getName().toStdString());
|
||||
setCrashAnnotation("gpu_driver", gpuIdent->getDriver().toStdString());
|
||||
setCrashAnnotation("sentry[contexts][gpu][name]", gpuIdent->getName().toStdString());
|
||||
setCrashAnnotation("sentry[contexts][gpu][version]", gpuIdent->getDriver().toStdString());
|
||||
setCrashAnnotation("gpu_memory", std::to_string(gpuIdent->getMemory()));
|
||||
}
|
||||
|
||||
|
@ -3177,7 +3177,7 @@ void Application::showLoginScreen() {
|
|||
#endif
|
||||
}
|
||||
|
||||
static const QUrl AUTHORIZED_EXTERNAL_QML_SOURCE { "https://content.highfidelity.com/Experiences/Releases" };
|
||||
static const QUrl AUTHORIZED_EXTERNAL_QML_SOURCE { "https://cdn.vircadia.com/community-apps/applications" };
|
||||
|
||||
void Application::initializeUi() {
|
||||
|
||||
|
@ -3196,14 +3196,16 @@ void Application::initializeUi() {
|
|||
safeURLS += settingsSafeURLS;
|
||||
|
||||
// END PULL SAFEURLS FROM INTERFACE.JSON Settings
|
||||
|
||||
bool isInWhitelist = false; // assume unsafe
|
||||
for (const auto& str : safeURLS) {
|
||||
if (!str.isEmpty() && str.endsWith(".qml") && url.toString().endsWith(".qml") &&
|
||||
url.toString().startsWith(str)) {
|
||||
qCDebug(interfaceapp) << "Found matching url!" << url.host();
|
||||
isInWhitelist = true;
|
||||
return true;
|
||||
|
||||
if (AUTHORIZED_EXTERNAL_QML_SOURCE.isParentOf(url)) {
|
||||
return true;
|
||||
} else {
|
||||
for (const auto& str : safeURLS) {
|
||||
if (!str.isEmpty() && str.endsWith(".qml") && url.toString().endsWith(".qml") &&
|
||||
url.toString().startsWith(str)) {
|
||||
qCDebug(interfaceapp) << "Found matching url!" << url.host();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7073,7 +7075,7 @@ void Application::updateWindowTitle() const {
|
|||
nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED)";
|
||||
QString username = accountManager->getAccountInfo().getUsername();
|
||||
|
||||
setCrashAnnotation("username", username.toStdString());
|
||||
setCrashAnnotation("sentry[user][username]", username.toStdString());
|
||||
|
||||
QString currentPlaceName;
|
||||
if (isServerlessMode()) {
|
||||
|
|
|
@ -84,10 +84,9 @@ bool startCrashHandler(std::string appPath) {
|
|||
std::vector<std::string> arguments;
|
||||
|
||||
std::map<std::string, std::string> annotations;
|
||||
annotations["token"] = BACKTRACE_TOKEN;
|
||||
annotations["format"] = "minidump";
|
||||
annotations["version"] = BuildInfo::VERSION.toStdString();
|
||||
annotations["build_number"] = BuildInfo::BUILD_NUMBER.toStdString();
|
||||
annotations["sentry[release]"] = BACKTRACE_TOKEN;
|
||||
annotations["sentry[contexts][app][app_version]"] = BuildInfo::VERSION.toStdString();
|
||||
annotations["sentry[contexts][app][app_build]"] = BuildInfo::BUILD_NUMBER.toStdString();
|
||||
annotations["build_type"] = BuildInfo::BUILD_TYPE_STRING.toStdString();
|
||||
|
||||
auto machineFingerPrint = uuidStringWithoutCurlyBraces(FingerprintUtils::getMachineFingerprint());
|
||||
|
|
|
@ -617,6 +617,12 @@ Menu::Menu() {
|
|||
false,
|
||||
&UserActivityLogger::getInstance(),
|
||||
SLOT(disable(bool)));
|
||||
addCheckableActionToQMenuAndActionHash(networkMenu,
|
||||
MenuOption::DisableCrashLogger,
|
||||
0,
|
||||
false,
|
||||
&UserActivityLogger::getInstance(),
|
||||
SLOT(crashMonitorDisable(bool)));
|
||||
addActionToQMenuAndActionHash(networkMenu, MenuOption::ShowDSConnectTable, 0,
|
||||
qApp, SLOT(loadDomainConnectionDialog()));
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ namespace MenuOption {
|
|||
const QString DeleteAvatarEntitiesBookmark = "Delete Avatar Entities Bookmark";
|
||||
const QString DeleteBookmark = "Delete Bookmark...";
|
||||
const QString DisableActivityLogger = "Disable Activity Logger";
|
||||
const QString DisableCrashLogger = "Disable Crash Logger";
|
||||
const QString DisableEyelidAdjustment = "Disable Eyelid Adjustment";
|
||||
const QString DisableLightEntities = "Disable Light Entities";
|
||||
const QString DisplayCrashOptions = "Display Crash Options";
|
||||
|
|
|
@ -218,12 +218,12 @@ int main(int argc, const char* argv[]) {
|
|||
}
|
||||
qDebug() << "UserActivityLogger is enabled:" << ual.isEnabled();
|
||||
|
||||
if (ual.isEnabled()) {
|
||||
qDebug() << "Crash handler logger is enabled:" << ual.isCrashMonitorEnabled();
|
||||
if (ual.isCrashMonitorEnabled()) {
|
||||
auto crashHandlerStarted = startCrashHandler(argv[0]);
|
||||
qDebug() << "Crash handler started:" << crashHandlerStarted;
|
||||
}
|
||||
|
||||
|
||||
const QString& applicationName = getInterfaceSharedMemoryName();
|
||||
bool instanceMightBeRunning = true;
|
||||
#ifdef Q_OS_WIN
|
||||
|
|
|
@ -254,7 +254,15 @@ void setupPreferences() {
|
|||
auto setter = [](bool value) { Menu::getInstance()->setIsOptionChecked(MenuOption::DisableActivityLogger, !value); };
|
||||
preferences->addPreference(new CheckPreference("Privacy", "Send data - High Fidelity uses information provided by your "
|
||||
"client to improve the product through the logging of errors, tracking of usage patterns, "
|
||||
"installation and system details, and crash events. By allowing High Fidelity to collect "
|
||||
"installation and system details. By allowing High Fidelity to collect this information "
|
||||
"you are helping to improve the product. ", getter, setter));
|
||||
}
|
||||
|
||||
{
|
||||
auto getter = []()->bool { return !Menu::getInstance()->isOptionChecked(MenuOption::DisableCrashLogger); };
|
||||
auto setter = [](bool value) { Menu::getInstance()->setIsOptionChecked(MenuOption::DisableCrashLogger, !value); };
|
||||
preferences->addPreference(new CheckPreference("Privacy", "Send crashes - Vircadia uses information provided by your "
|
||||
"client to improve the product through crash reports. By allowing Vircadia to collect "
|
||||
"this information you are helping to improve the product. ", getter, setter));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,10 @@ void UserActivityLogger::disable(bool disable) {
|
|||
_disabled.set(disable);
|
||||
}
|
||||
|
||||
void UserActivityLogger::crashMonitorDisable(bool disable) {
|
||||
_crashMonitorDisabled.set(disable);
|
||||
}
|
||||
|
||||
void UserActivityLogger::logAction(QString action, QJsonObject details, JSONCallbackParameters params) {
|
||||
// qCDebug(networking).nospace() << ">>> UserActivityLogger::logAction(" << action << "," << QJsonDocument(details).toJson();
|
||||
// This logs what the UserActivityLogger would normally send to centralized servers.
|
||||
|
|
|
@ -35,7 +35,11 @@ public slots:
|
|||
bool isEnabled() { return !_disabled.get(); }
|
||||
bool isDisabledSettingSet() const { return _disabled.isSet(); }
|
||||
|
||||
bool isCrashMonitorEnabled() { return !_crashMonitorDisabled.get(); }
|
||||
bool isCrashMonitorDisabledSettingSet() const { return _crashMonitorDisabled.isSet(); }
|
||||
|
||||
void disable(bool disable);
|
||||
void crashMonitorDisable(bool disable);
|
||||
void logAction(QString action, QJsonObject details = QJsonObject(), JSONCallbackParameters params = JSONCallbackParameters());
|
||||
|
||||
void launch(QString applicationVersion, bool previousSessionCrashed, int previousSessionRuntime);
|
||||
|
@ -55,6 +59,7 @@ private slots:
|
|||
private:
|
||||
UserActivityLogger();
|
||||
Setting::Handle<bool> _disabled { "UserActivityLoggerDisabled", true };
|
||||
Setting::Handle<bool> _crashMonitorDisabled { "CrashMonitorDisabled", false };
|
||||
|
||||
QElapsedTimer _timer;
|
||||
};
|
||||
|
|
|
@ -53,7 +53,7 @@ var settingsRoot = "FloofChat";
|
|||
var athenaGotoUrl = "https://metaverse.projectathena.io/interim/d-goto/app/goto.json";
|
||||
var gotoJSONUrl = Settings.getValue(settingsRoot + "/gotoJSONUrl", athenaGotoUrl);
|
||||
|
||||
var muted = Settings.getValue(settingsRoot + "/muted", {"Local": false, "Domain": false, "Grid": false});
|
||||
var muted = Settings.getValue(settingsRoot + "/muted", {"Local": false, "Domain": false, "Grid": true});
|
||||
|
||||
var ws;
|
||||
var wsReady = false;
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
//
|
||||
(function() {
|
||||
var ROOT = Script.resolvePath('').split("app-more.js")[0];
|
||||
var DEV_PARAMETER = Script.resolvePath('').split("?")[1];
|
||||
var APP_NAME = "MORE...";
|
||||
var APP_URL = ROOT + "more.html";
|
||||
var APP_URL = (ROOT + "more.html" + (DEV_PARAMETER === "dev" ? "?dev" : "")).replace(/%5C/g, "/");
|
||||
var APP_ICON_INACTIVE = ROOT + "appicon_i.png";
|
||||
var APP_ICON_ACTIVE = ROOT + "appicon_a.png";
|
||||
var appStatus = false;
|
||||
|
@ -31,7 +31,7 @@
|
|||
text: APP_NAME,
|
||||
icon: APP_ICON_INACTIVE,
|
||||
activeIcon: APP_ICON_ACTIVE
|
||||
});
|
||||
});
|
||||
|
||||
function clicked() {
|
||||
if (appStatus) {
|
||||
|
@ -56,7 +56,7 @@
|
|||
var runningScriptJson;
|
||||
for (var j = 0; j < currentlyRunningScripts.length; j++) {
|
||||
runningScriptJson = currentlyRunningScripts[j].url;
|
||||
if (runningScriptJson.indexOf("https://kasenvr.github.io/community-apps/applications") !== -1) {
|
||||
if (runningScriptJson.indexOf("https://cdn.vircadia.com/community-apps/applications") !== -1) {
|
||||
newMessage += "_" + runningScriptJson;
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,8 @@
|
|||
|
||||
if (instruction.action === "installScript") {
|
||||
if (lastProcessing.action !== instruction.action || lastProcessing.script !== instruction.script) {
|
||||
ScriptDiscoveryService.loadScript(instruction.script, true, false, false, true, false); // Force reload the script, do not use cache. lastProcessing.action = instruction.action;
|
||||
ScriptDiscoveryService.loadScript(instruction.script, true, false, false, true, false); // Force reload the script, do not use cache.
|
||||
lastProcessing.action = instruction.action;
|
||||
lastProcessing.script = instruction.script;
|
||||
Script.setTimeout(function() {
|
||||
sendRunningScriptList();
|
||||
|
|
2
scripts/system/more/jquery-3.5.1.min.js
vendored
Normal file
2
scripts/system/more/jquery-3.5.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -15,33 +15,12 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script id="metadataScriptTag" type="text/javascript" src="https://kasenvr.github.io/community-apps/applications/metadata.js"></script>
|
||||
<script src="jquery-3.5.1.min.js"></script>
|
||||
<script>
|
||||
//Defaults
|
||||
var DEFAULT_PER_PAGE = 3;
|
||||
var DEFAULT_OFFSET = 0;
|
||||
|
||||
//Paths
|
||||
var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||
var rootPath;
|
||||
var metadataScript = document.getElementById("metadataScriptTag");
|
||||
|
||||
if (currentPath.includes("kasenvr.github.io") || !currentPath.includes("file:/")) { // Loading app from repo or filesystem.
|
||||
rootPath = currentPath.replace("more/more.html", "applications/");
|
||||
if (metadataScript.src !== "../applications/metadata.js") {
|
||||
metadataScript.src = "../applications/metadata.js";
|
||||
console.info("Loading apps and metadata locally.");
|
||||
}
|
||||
} else {
|
||||
rootPath = "https://kasenvr.github.io/community-apps/applications/";
|
||||
if (metadataScript.src !== "https://kasenvr.github.io/community-apps/applications/metadata.js") {
|
||||
metadataScript.src = "https://kasenvr.github.io/community-apps/applications/metadata.js";
|
||||
console.info("Loading apps and metadata remotely.");
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementsByTagName("head")[0].appendChild(metadataScript);
|
||||
|
||||
|
||||
//Parameters
|
||||
function findGetParameter(parameterName) {
|
||||
var result = null,
|
||||
|
@ -70,7 +49,24 @@
|
|||
if (search === null) {
|
||||
search = "";
|
||||
}
|
||||
|
||||
|
||||
//Paths
|
||||
var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||
var developmentMode = window.location.toString().split("?")[1];
|
||||
var rootPath;
|
||||
var metadataScriptSrc = "https://cdn.vircadia.com/community-apps/applications/metadata.js";
|
||||
|
||||
if (developmentMode === "dev") { // Development mode loads locally, if not, load from repo.
|
||||
console.info("Setting applications to local.")
|
||||
rootPath = currentPath.replace("more/more.html", "applications/");
|
||||
console.info("Loading metadata locally.");
|
||||
metadataScriptSrc = "../applications/metadata.js";
|
||||
} else {
|
||||
console.info("Setting applications to remote URL.")
|
||||
console.info("Loading metadata remotely.");
|
||||
rootPath = "https://cdn.vircadia.com/community-apps/applications/";
|
||||
}
|
||||
|
||||
//Search
|
||||
function doSearch(keyword) {
|
||||
offset = 0;
|
||||
|
@ -172,7 +168,7 @@
|
|||
</div>
|
||||
<hr>
|
||||
<p class="mainDesc">Want to contribute and add your own app?<br>
|
||||
Read the <a href="https://kasenvr.github.io/community-apps/web/index.html">guide</a>!</p>
|
||||
Read the <a href="https://cdn.vircadia.com/community-apps/web/index.html">guide</a>!</p>
|
||||
<script>
|
||||
function monitorEnter(e) {
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
|
@ -268,8 +264,11 @@
|
|||
offset = offset + perpage;
|
||||
listBuilder(search, offset, perpage);
|
||||
}
|
||||
|
||||
$.getScript(metadataScriptSrc, function(data, textStatus, jqxhr) {
|
||||
|
||||
listBuilder(search, offset, perpage);
|
||||
listBuilder(search, offset, perpage);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue