mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
v2019.08.20
This commit is contained in:
@@ -24,7 +24,7 @@ namespace VRCX
|
|||||||
m_Connection.Dispose();
|
m_Connection.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Execute(string sql, IDictionary<string, object> param = null)
|
public int ExecuteNonQuery(string sql, IDictionary<string, object> param = null)
|
||||||
{
|
{
|
||||||
m_Lock.EnterWriteLock();
|
m_Lock.EnterWriteLock();
|
||||||
try
|
try
|
||||||
@@ -38,7 +38,7 @@ namespace VRCX
|
|||||||
C.Parameters.Add(new SQLiteParameter("@" + prop.Key, prop.Value));
|
C.Parameters.Add(new SQLiteParameter("@" + prop.Key, prop.Value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
C.ExecuteNonQuery();
|
return C.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -47,7 +47,7 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExecuteQuery(IJavascriptCallback callback, string sql, IDictionary<string, object> param = null)
|
public void Execute(IJavascriptCallback callback, string sql, IDictionary<string, object> param = null)
|
||||||
{
|
{
|
||||||
m_Lock.EnterReadLock();
|
m_Lock.EnterReadLock();
|
||||||
try
|
try
|
||||||
|
|||||||
+44
-36
@@ -4479,7 +4479,7 @@ if (window.CefSharp) {
|
|||||||
this.sweepGameLog();
|
this.sweepGameLog();
|
||||||
// sweepGameLog로 기록이 삭제되면
|
// sweepGameLog로 기록이 삭제되면
|
||||||
// 아무 것도 없는데 알림이 떠서 이상함
|
// 아무 것도 없는데 알림이 떠서 이상함
|
||||||
if (this.gameLogTable.length) {
|
if (this.gameLogTable.data.length) {
|
||||||
this.notifyMenu('gameLog');
|
this.notifyMenu('gameLog');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4948,8 +4948,8 @@ if (window.CefSharp) {
|
|||||||
confirmButtonText: 'Confirm',
|
confirmButtonText: 'Confirm',
|
||||||
cancelButtonText: 'Cancel',
|
cancelButtonText: 'Cancel',
|
||||||
type: 'info',
|
type: 'info',
|
||||||
callback: (action2) => {
|
callback: (action) => {
|
||||||
if (action2 === 'confirm') {
|
if (action === 'confirm') {
|
||||||
API.clearFavoriteGroup({
|
API.clearFavoriteGroup({
|
||||||
type: ctx.type,
|
type: ctx.type,
|
||||||
group: ctx.name
|
group: ctx.name
|
||||||
@@ -5052,6 +5052,7 @@ if (window.CefSharp) {
|
|||||||
$app.deleteFriendship(args.param.userId);
|
$app.deleteFriendship(args.param.userId);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FIXME: table에서 accept, decline 한 경우 제대로 안남을지도 모름
|
||||||
API.$on('FRIEND:REQUEST', (args) => {
|
API.$on('FRIEND:REQUEST', (args) => {
|
||||||
var ref = API.user[args.param.userId];
|
var ref = API.user[args.param.userId];
|
||||||
if (ref) {
|
if (ref) {
|
||||||
@@ -5065,6 +5066,7 @@ if (window.CefSharp) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 여기도 그럼
|
||||||
API.$on('FRIEND:REQUEST:CANCEL', (args) => {
|
API.$on('FRIEND:REQUEST:CANCEL', (args) => {
|
||||||
var ref = API.user[args.param.userId];
|
var ref = API.user[args.param.userId];
|
||||||
if (ref) {
|
if (ref) {
|
||||||
@@ -5097,9 +5099,14 @@ if (window.CefSharp) {
|
|||||||
} else {
|
} else {
|
||||||
this.friendLog = {};
|
this.friendLog = {};
|
||||||
ref.friends.forEach((id) => {
|
ref.friends.forEach((id) => {
|
||||||
this.friendLog[id] = {
|
var ctx = {
|
||||||
id
|
id
|
||||||
};
|
};
|
||||||
|
var user = API.user[id];
|
||||||
|
if (user) {
|
||||||
|
ctx.displayName = user.displayName;
|
||||||
|
}
|
||||||
|
this.friendLog[id] = ctx;
|
||||||
});
|
});
|
||||||
this.friendLogTable.data = [];
|
this.friendLogTable.data = [];
|
||||||
this.saveFriendLog();
|
this.saveFriendLog();
|
||||||
@@ -5789,8 +5796,8 @@ if (window.CefSharp) {
|
|||||||
D.avatars.push(ref);
|
D.avatars.push(ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$app.sortUserDialogWorlds();
|
this.sortUserDialogWorlds();
|
||||||
$app.sortUserDialogAvatars();
|
this.sortUserDialogAvatars();
|
||||||
API.getFriendStatus({
|
API.getFriendStatus({
|
||||||
userId: D.id
|
userId: D.id
|
||||||
});
|
});
|
||||||
@@ -6228,36 +6235,37 @@ if (window.CefSharp) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
D.rooms = [];
|
D.rooms = [];
|
||||||
Object.values(map).sort((a, b) => b.users.length - a.users.length || b.occupants - a.occupants).forEach((v) => {
|
Object.values(map).sort((a, b) => b.users.length - a.users.length ||
|
||||||
var L = API.parseLocation(`${D.id}:${v.id}`);
|
b.occupants - a.occupants).forEach((v) => {
|
||||||
v.location_ = L;
|
var L = API.parseLocation(`${D.id}:${v.id}`);
|
||||||
v.location = L.tag;
|
v.location_ = L;
|
||||||
if (L.userId) {
|
v.location = L.tag;
|
||||||
ref = API.user[L.userId];
|
if (L.userId) {
|
||||||
if (ref) {
|
ref = API.user[L.userId];
|
||||||
L.user = ref;
|
if (ref) {
|
||||||
} else {
|
L.user = ref;
|
||||||
API.getUser({
|
} else {
|
||||||
userId: L.userId
|
API.getUser({
|
||||||
}).then((args) => {
|
userId: L.userId
|
||||||
this.$set(L, 'user', args.ref);
|
}).then((args) => {
|
||||||
return args;
|
this.$set(L, 'user', args.ref);
|
||||||
});
|
return args;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
v.users.sort((a, b) => {
|
||||||
v.users.sort((a, b) => {
|
var A = String(a.displayName).toUpperCase();
|
||||||
var A = String(a.displayName).toUpperCase();
|
var B = String(b.displayName).toUpperCase();
|
||||||
var B = String(b.displayName).toUpperCase();
|
if (A < B) {
|
||||||
if (A < B) {
|
return -1;
|
||||||
return -1;
|
}
|
||||||
}
|
if (A > B) {
|
||||||
if (A > B) {
|
return 1;
|
||||||
return 1;
|
}
|
||||||
}
|
return 0;
|
||||||
return 0;
|
});
|
||||||
|
D.rooms.push(v);
|
||||||
});
|
});
|
||||||
D.rooms.push(v);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -6665,7 +6673,7 @@ if (window.CefSharp) {
|
|||||||
$app.newInstanceDialog.visible = false;
|
$app.newInstanceDialog.visible = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$app.methods.buildInstanceTag = function () {
|
$app.methods.buildInstance = function () {
|
||||||
var D = this.newInstanceDialog;
|
var D = this.newInstanceDialog;
|
||||||
var tags = [];
|
var tags = [];
|
||||||
tags.push((99999 * Math.random() + 1).toFixed(0));
|
tags.push((99999 * Math.random() + 1).toFixed(0));
|
||||||
@@ -6712,7 +6720,7 @@ if (window.CefSharp) {
|
|||||||
var D = this.newInstanceDialog;
|
var D = this.newInstanceDialog;
|
||||||
D.worldId = L.worldId;
|
D.worldId = L.worldId;
|
||||||
D.accessType = 'public';
|
D.accessType = 'public';
|
||||||
this.buildInstanceTag();
|
this.buildInstance();
|
||||||
D.visible = true;
|
D.visible = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user