Skip to content

Commit

Permalink
v2019.10.31.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pypy committed Oct 30, 2019
1 parent b5cd4b3 commit 23c108c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 27 deletions.
64 changes: 42 additions & 22 deletions html/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3471,7 +3471,7 @@ if (window.CefSharp) {
VRCX,
nextRefresh: 0,
isGameRunning: false,
appVersion: '2019.10.31',
appVersion: '2019.10.31.1',
latestAppVersion: '',
ossDialog: false
},
Expand Down Expand Up @@ -5179,6 +5179,7 @@ if (window.CefSharp) {
var user = API.user[id];
if (user) {
ctx.displayName = user.displayName;
ctx.trustLevel = user.trustLevel_;
}
this.friendLog[id] = ctx;
});
Expand All @@ -5191,12 +5192,14 @@ if (window.CefSharp) {
if (!this.friendLog[id]) {
var ctx = {
id,
displayName: null
displayName: null,
trustLevel: null
};
this.$set(this.friendLog, id, ctx);
var ref = API.user[id];
if (ref) {
ctx.displayName = ref.displayName;
ctx.trustLevel = ref.trustLevel_;
this.friendLogTable.data.push({
created_at: new Date().toJSON(),
type: 'Friend',
Expand Down Expand Up @@ -5239,27 +5242,44 @@ if (window.CefSharp) {

$app.methods.updateFriendship = function (ref) {
var ctx = this.friendLog[ref.id];
if (ctx &&
ctx.displayName !== ref.displayName) {
if (ctx.displayName) {
this.friendLogTable.data.push({
created_at: new Date().toJSON(),
type: 'DisplayName',
userId: ref.id,
displayName: ref.displayName,
previousDisplayName: ctx.displayName
});
} else if (ctx.displayName === null) {
this.friendLogTable.data.push({
created_at: new Date().toJSON(),
type: 'Friend',
userId: ref.id,
displayName: ref.displayName
});
if (ctx) {
if (ctx.displayName !== ref.displayName) {
if (ctx.displayName) {
this.friendLogTable.data.push({
created_at: new Date().toJSON(),
type: 'DisplayName',
userId: ref.id,
displayName: ref.displayName,
previousDisplayName: ctx.displayName
});
} else if (ctx.displayName === null) {
this.friendLogTable.data.push({
created_at: new Date().toJSON(),
type: 'Friend',
userId: ref.id,
displayName: ref.displayName
});
}
ctx.displayName = ref.displayName;
this.saveFriendLog();
this.notifyMenu('friendLog');
}
if (ref.trustLevel_ &&
ctx.trustLevel !== ref.trustLevel_) {
if (ctx.trustLevel) {
this.friendLogTable.data.push({
created_at: new Date().toJSON(),
type: 'TrustLevel',
userId: ref.id,
displayName: ref.displayName,
trustLevel: ref.trustLevel_,
previousTrustLevel: ctx.trustLevel
});
}
ctx.trustLevel = ref.trustLevel_;
this.saveFriendLog();
this.notifyMenu('friendLog');
}
ctx.displayName = ref.displayName;
this.saveFriendLog();
this.notifyMenu('friendLog');
}
};

Expand Down
9 changes: 6 additions & 3 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@
<template #tool>
<div style="margin:0 0 10px;display:flex;align-items:center">
<el-select v-model="friendLogTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter">
<el-option v-once v-for="type in ['Friend', 'Unfriend', 'FriendRequest', 'CancelFriendRequest', 'DisplayName']" :key="type" :label="type" :value="type"></el-option>
<el-option v-once v-for="type in ['Friend', 'Unfriend', 'FriendRequest', 'CancelFriendRequest', 'DisplayName', 'TrustLevel']" :key="type" :label="type" :value="type"></el-option>
</el-select>
<el-input v-model="friendLogTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin-left:10px"></el-input>
</div>
Expand All @@ -430,6 +430,9 @@
<template v-once #default="scope">
<span v-if="scope.row.type === 'DisplayName'">{{ scope.row.previousDisplayName }}&nbsp;<i class="el-icon-right"></i>&nbsp;</span>
<span v-text="scope.row.displayName || scope.row.userId" @click="showUserDialog(scope.row.userId)" class="x-link"></span>
<template v-if="scope.row.type === 'TrustLevel'">
<br/><span>({{ scope.row.previousTrustLevel }}&nbsp;<i class="el-icon-right"></i>&nbsp;{{ scope.row.trustLevel }})</span>
</template>
</template>
</el-table-column>
<el-table-column label="Action" width="80" align="right">
Expand Down Expand Up @@ -1732,8 +1735,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-lazyload/1.3.3/vue-lazyload.js"></script>
<script src="https://unpkg.com/[email protected]/dist/data-tables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/locale/en.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.11.1/index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.11.1/locale/en.min.js"></script>
<script>
(() => {
var link = document.createElement('link');
Expand Down
4 changes: 2 additions & 2 deletions html/vr.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/noty/3.2.0-beta/noty.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/locale/en.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.11.1/index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.11.1/locale/en.min.js"></script>
<script>
(() => {
var link = document.createElement('link');
Expand Down

0 comments on commit 23c108c

Please sign in to comment.