mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 06:13:52 +02:00
Make all table filters persistent
This commit is contained in:
@@ -6246,15 +6246,6 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
};
|
||||
|
||||
$app.methods.saveFeedTableFilters = function () {
|
||||
configRepository.setString('VRCX_feedTableFilters', JSON.stringify(this.feedTable.filters[0].value));
|
||||
configRepository.setBool('VRCX_feedTableVIPFilter', this.feedTable.filters[2].value);
|
||||
};
|
||||
if (configRepository.getString('VRCX_feedTableFilters')) {
|
||||
$app.data.feedTable.filters[0].value = JSON.parse(configRepository.getString('VRCX_feedTableFilters'));
|
||||
$app.data.feedTable.filters[2].value = configRepository.getBool('VRCX_feedTableVIPFilter');
|
||||
}
|
||||
|
||||
API.$on('LOGIN', async function (args) {
|
||||
$app.friendLogInitStatus = false;
|
||||
await database.init(args.json.id);
|
||||
@@ -6506,13 +6497,6 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
};
|
||||
|
||||
$app.methods.saveGameLogTableFilters = function () {
|
||||
configRepository.setString('VRCX_gameLogTableFilters', JSON.stringify(this.gameLogTable.filters[0].value));
|
||||
};
|
||||
if (configRepository.getString('VRCX_gameLogTableFilters')) {
|
||||
$app.data.gameLogTable.filters[0].value = JSON.parse(configRepository.getString('VRCX_gameLogTableFilters'));
|
||||
}
|
||||
|
||||
$app.methods.resetGameLog = async function () {
|
||||
await gameLogService.reset();
|
||||
await gameLogService.poll();
|
||||
@@ -7640,6 +7624,32 @@ speechSynthesis.getVoices();
|
||||
});
|
||||
};
|
||||
|
||||
// Save Table Filters
|
||||
$app.methods.saveTableFilters = function () {
|
||||
configRepository.setString('VRCX_feedTableFilters', JSON.stringify(this.feedTable.filters[0].value));
|
||||
configRepository.setBool('VRCX_feedTableVIPFilter', this.feedTable.filters[2].value);
|
||||
configRepository.setString('VRCX_gameLogTableFilters', JSON.stringify(this.gameLogTable.filters[0].value));
|
||||
configRepository.setString('VRCX_friendLogTableFilters', JSON.stringify(this.friendLogTable.filters[0].value));
|
||||
configRepository.setString('VRCX_playerModerationTableFilters', JSON.stringify(this.playerModerationTable.filters[0].value));
|
||||
configRepository.setString('VRCX_notificationTableFilters', JSON.stringify(this.notificationTable.filters[0].value));
|
||||
};
|
||||
if (configRepository.getString('VRCX_feedTableFilters')) {
|
||||
$app.data.feedTable.filters[0].value = JSON.parse(configRepository.getString('VRCX_feedTableFilters'));
|
||||
$app.data.feedTable.filters[2].value = configRepository.getBool('VRCX_feedTableVIPFilter');
|
||||
}
|
||||
if (configRepository.getString('VRCX_gameLogTableFilters')) {
|
||||
$app.data.gameLogTable.filters[0].value = JSON.parse(configRepository.getString('VRCX_gameLogTableFilters'));
|
||||
}
|
||||
if (configRepository.getString('VRCX_friendLogTableFilters')) {
|
||||
$app.data.friendLogTable.filters[0].value = JSON.parse(configRepository.getString('VRCX_friendLogTableFilters'));
|
||||
}
|
||||
if (configRepository.getString('VRCX_playerModerationTableFilters')) {
|
||||
$app.data.playerModerationTable.filters[0].value = JSON.parse(configRepository.getString('VRCX_playerModerationTableFilters'));
|
||||
}
|
||||
if (configRepository.getString('VRCX_notificationTableFilters')) {
|
||||
$app.data.notificationTable.filters[0].value = JSON.parse(configRepository.getString('VRCX_notificationTableFilters'));
|
||||
}
|
||||
|
||||
// App: Profile + Settings
|
||||
|
||||
$app.data.configTreeData = [];
|
||||
|
||||
@@ -77,8 +77,8 @@ html
|
||||
div(style="margin:0 0 10px;display:flex;align-items:center")
|
||||
div(style="flex:none;margin-right:10px")
|
||||
el-tooltip(placement="bottom" content="Filter VIP only" :disabled="hideTooltips")
|
||||
el-switch(v-model="feedTable.filters[2].value" @change="saveFeedTableFilters" active-color="#13ce66")
|
||||
el-select(v-model="feedTable.filters[0].value" @change="saveFeedTableFilters" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
||||
el-switch(v-model="feedTable.filters[2].value" @change="saveTableFilters" active-color="#13ce66")
|
||||
el-select(v-model="feedTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
||||
el-option(v-once v-for="type in ['GPS', 'Online', 'Offline', 'Status', 'Avatar']" :key="type" :label="type" :value="type")
|
||||
el-input(v-model="feedTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px")
|
||||
el-tooltip(placement="bottom" content="Clear feed" :disabled="hideTooltips")
|
||||
@@ -184,7 +184,7 @@ html
|
||||
data-tables(v-bind="gameLogTable")
|
||||
template(#tool)
|
||||
div(style="margin:0 0 10px;display:flex;align-items:center")
|
||||
el-select(v-model="gameLogTable.filters[0].value" @change="saveGameLogTableFilters" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
||||
el-select(v-model="gameLogTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
||||
el-option(v-once v-for="type in ['Location', 'OnPlayerJoined', 'OnPlayerLeft', 'PortalSpawn', 'Event', 'VideoPlay']" :key="type" :label="type" :value="type")
|
||||
el-input(v-model="gameLogTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px")
|
||||
el-tooltip(placement="bottom" content="Reset game log" :disabled="hideTooltips")
|
||||
@@ -376,7 +376,7 @@ html
|
||||
data-tables(v-bind="friendLogTable")
|
||||
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-select(v-model="friendLogTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
||||
el-option(v-once v-for="type in ['Friend', 'Unfriend', 'FriendRequest', 'CancelFriendRequest', 'DisplayName', 'TrustLevel']" :key="type" :label="type" :value="type")
|
||||
el-input(v-model="friendLogTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin-left:10px")
|
||||
el-table-column(label="Date" prop="created_at" sortable="custom" width="100")
|
||||
@@ -403,7 +403,7 @@ html
|
||||
data-tables(v-bind="playerModerationTable" v-loading="API.isPlayerModerationsLoading")
|
||||
template(#tool)
|
||||
div(style="margin:0 0 10px;display:flex;align-items:center")
|
||||
el-select(v-model="playerModerationTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
||||
el-select(v-model="playerModerationTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
||||
el-option(v-once v-for="type in ['block', 'mute', 'unmute', 'hideAvatar', 'showAvatar']" :key="type" :label="type" :value="type")
|
||||
el-input(v-model="playerModerationTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px")
|
||||
el-tooltip(placement="bottom" content="Refresh" :disabled="hideTooltips")
|
||||
@@ -430,7 +430,7 @@ html
|
||||
data-tables(v-bind="notificationTable")
|
||||
template(#tool)
|
||||
div(style="margin:0 0 10px;display:flex;align-items:center")
|
||||
el-select(v-model="notificationTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
||||
el-select(v-model="notificationTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
||||
el-option(v-once v-for="type in ['requestInvite', 'invite', 'requestInviteResponse', 'inviteResponse', 'friendRequest', 'hiddenFriendRequest', 'message']" :key="type" :label="type" :value="type")
|
||||
el-input(v-model="notificationTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px")
|
||||
el-tooltip(placement="bottom" content="Refresh" :disabled="hideTooltips")
|
||||
|
||||
Reference in New Issue
Block a user