mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-11 10:53:52 +02:00
Fix opening group dialog
This commit is contained in:
@@ -15,7 +15,6 @@ export default class extends baseClass {
|
||||
_methods = {
|
||||
async migrateMemos() {
|
||||
var json = JSON.parse(await VRCXStorage.GetAll());
|
||||
database.begin();
|
||||
for (var line in json) {
|
||||
if (line.substring(0, 8) === 'memo_usr') {
|
||||
var userId = line.substring(5);
|
||||
@@ -26,7 +25,6 @@ export default class extends baseClass {
|
||||
}
|
||||
}
|
||||
}
|
||||
database.commit();
|
||||
},
|
||||
|
||||
onUserMemoChange() {
|
||||
@@ -47,15 +45,15 @@ export default class extends baseClass {
|
||||
}
|
||||
},
|
||||
|
||||
saveUserMemo(id, memo) {
|
||||
async saveUserMemo(id, memo) {
|
||||
if (memo) {
|
||||
database.setUserMemo({
|
||||
await database.setUserMemo({
|
||||
userId: id,
|
||||
editedAt: new Date().toJSON(),
|
||||
memo
|
||||
});
|
||||
} else {
|
||||
database.deleteUserMemo(id);
|
||||
await database.deleteUserMemo(id);
|
||||
}
|
||||
var ref = this.friends.get(id);
|
||||
if (ref) {
|
||||
|
||||
@@ -169,7 +169,7 @@ export default class extends baseClass {
|
||||
if (!L.groupId) {
|
||||
return;
|
||||
}
|
||||
this.showGroupDialog(L.groupId);
|
||||
$app.showGroupDialog(L.groupId);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<i v-if="isTraveling" class="el-icon el-icon-loading" style="display: inline-block"></i>
|
||||
<span>{{ text }}</span>
|
||||
</span>
|
||||
<span v-if="groupName" :class="{ 'x-link': link }" @click="showGroupDialog">({{ groupName }})</span>
|
||||
<span v-if="groupName" :class="{ 'x-link': link }" @click="handleShowGroupDialog">({{ groupName }})</span>
|
||||
<span v-if="region" class="flags" :class="region" style="display: inline-block; margin-left: 5px"></span>
|
||||
<i v-if="strict" class="el-icon el-icon-lock" style="display: inline-block; margin-left: 5px"></i>
|
||||
</span>
|
||||
@@ -27,7 +27,8 @@
|
||||
API: { default: window.API },
|
||||
getWorldName: { default: window.$app?.getWorldName },
|
||||
getGroupName: { default: window.$app?.getGroupName },
|
||||
showWorldDialog: { default: window.$app?.showWorldDialog }
|
||||
showWorldDialog: { default: window.$app?.showWorldDialog },
|
||||
showGroupDialog: { default: window.$app?.showGroupDialog }
|
||||
},
|
||||
props: {
|
||||
location: String,
|
||||
@@ -141,7 +142,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
showGroupDialog() {
|
||||
handleShowGroupDialog(){
|
||||
let location = this.location;
|
||||
if (this.isTraveling) {
|
||||
location = this.traveling;
|
||||
|
||||
@@ -220,8 +220,8 @@ class Database {
|
||||
return memos;
|
||||
}
|
||||
|
||||
setUserMemo(entry) {
|
||||
sqliteService.executeNonQuery(
|
||||
async setUserMemo(entry) {
|
||||
await sqliteService.executeNonQuery(
|
||||
`INSERT OR REPLACE INTO memos (user_id, edited_at, memo) VALUES (@user_id, @edited_at, @memo)`,
|
||||
{
|
||||
'@user_id': entry.userId,
|
||||
@@ -231,8 +231,8 @@ class Database {
|
||||
);
|
||||
}
|
||||
|
||||
deleteUserMemo(userId) {
|
||||
sqliteService.executeNonQuery(
|
||||
async deleteUserMemo(userId) {
|
||||
await sqliteService.executeNonQuery(
|
||||
`DELETE FROM memos WHERE user_id = @user_id`,
|
||||
{
|
||||
'@user_id': userId
|
||||
|
||||
Reference in New Issue
Block a user