1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-04 01:37:47 +00:00

Merge pull request #957 from arieshi255/fix-clang-and-launcher

[3.x] Fix clang compilation and launcher script
This commit is contained in:
Adam 2024-06-20 18:41:19 +10:00 committed by GitHub
commit 80b11c75c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 126 additions and 55 deletions

View file

@ -3,6 +3,7 @@
#include <iomanip>
#include <sstream>
#include <vector>
#include <cstdint>
namespace xiv::utils::bparse
{

View file

@ -5,6 +5,7 @@
#include <iomanip>
#include <sstream>
#include <vector>
#include <cstdint>
namespace xivps3::utils::bparse
{

View file

@ -4,6 +4,7 @@
#include <list>
#include <map>
#include <iostream>
#include <cstdint>
namespace Mysql
{

View file

@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <iostream>
#include <sstream>
#include <cstdint>
#include <mysql.h>
//using MYSQL_FIELD = st_mysql_field;

View file

@ -1,6 +1,7 @@
#pragma once
#include <string>
#include <cstdint>
namespace Sapphire::Common::Util
{

View file

@ -85,7 +85,7 @@ void ActionResult::applyStatusEffectSelf( uint32_t id, int32_t duration, uint8_t
m_result.Flag = static_cast< uint8_t >( ActionResultFlag::EffectOnSource );
m_bOverrideStatus = shouldOverride;
m_pStatus = StatusEffect::make_StatusEffect( id, m_target, m_target, duration, 3000 );
m_pStatus = Sapphire::StatusEffect::make_StatusEffect( id, m_target, m_target, duration, 3000 );
m_pStatus->setParam( param );
}

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -8,11 +9,54 @@
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="stylesheet" href="assets/css/global.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
<script src="assets/js/login.js"></script>
<script>
function doLogin(){
var url = "sapphire-api/lobby/login";
var params = "{\"username\":\"" + document.getElementsByName('username')[0].value + "\",\"pass\":\"" + document.getElementsByName('password')[0].value + "\"}";
var xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
try {
var response = readBody(xhr);
var parsed = JSON.parse(response);
window.external.Boot(parsed.sId, parsed.lobbyHost, parsed.frontierHost);
} catch(err) {
document.getElementById("Error").innerHTML = "Login failed.";
}
}
}
xhr.send(params);
}
function readBody(xhr) {
var data;
if (!xhr.responseType || xhr.responseType === "text") {
data = xhr.responseText;
} else if (xhr.responseType === "document") {
data = xhr.responseXML;
} else {
data = xhr.response;
}
return data;
}
function keypressing(e) {
if (!e) e = window.event;
var keyCode = e.keyCode || e.which;
if (keyCode == '13'){
doLogin();
return false;
}
}
</script>
</head>
<body scroll="no">
<div class="s-full-split s-left-half col-xs-7">
<div class="clearfix s-link-badge-wrapper">
<a href="https://discord.gg/KfrZCkx" class="s-link-badge s-link-badge-discord col-xs-5">
@ -23,7 +67,9 @@
</a>
</div>
<h2>Recent Activity</h2>
<ul id="commit-log" class="commit-history"></ul>
<ul id="commit-log" class="commit-history">
</ul>
</div>
<div class="s-full-split s-right-half col-xs-5">
<div class="s-logo">
@ -41,10 +87,10 @@
<div class="input-control">
<label class="s-login-input-wrapper">
Password
<input type="password" name="password">
<input type="password" name="password" onkeypress="return keypressing(event)">
</label>
</div>
<button class="btn btn-default s-login-btn pull-right" id="submitButton">Login</button>
<button class="btn btn-default s-login-btn pull-right" id="submitButton" onclick="doLogin()">Login</button>
<p id="Error" class="s-error-text"></p>
</div>
<a class="btn btn-default s-acc-btn" href="createUser.html">Create Account</a>
@ -58,6 +104,26 @@
<script src="assets/js/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/github.js"></script>
<script>
fetch( "https://api.github.com/repos/SapphireMordred/Sapphire/events" ).then( function( resp ) {
return resp.json();
}).then( function( data ) {
data = data.filter( function( e ) {
return e.type == "PushEvent";
});
let commitContainer = document.getElementById( 'commit-log' );
for ( var evnt of data ) {
for ( var commit of evnt.payload.commits ) {
let e = document.createElement( 'li' );
e.innerHTML = '<a href="https://github.com/SapphireMordred/Sapphire/commit/' + commit.sha + '">' + commit.message + '</a>';
commitContainer.appendChild( e );
}
}
});
</script>
</body>
</html>