mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
Save feed/game log filters
This commit is contained in:
@@ -883,6 +883,9 @@ speechSynthesis.getVoices();
|
|||||||
watch: {
|
watch: {
|
||||||
imageurl() {
|
imageurl() {
|
||||||
this.parse();
|
this.parse();
|
||||||
|
},
|
||||||
|
userid() {
|
||||||
|
this.parse();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -6060,6 +6063,13 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$app.methods.saveFeedTableFilters = function () {
|
||||||
|
configRepository.setString('VRCX_feedTableFilters', JSON.stringify(this.feedTable.filters[0].value));
|
||||||
|
};
|
||||||
|
if (configRepository.getString('VRCX_feedTableFilters')) {
|
||||||
|
$app.data.feedTable.filters[0].value = JSON.parse(configRepository.getString('VRCX_feedTableFilters'));
|
||||||
|
}
|
||||||
|
|
||||||
API.$on('LOGIN', function (args) {
|
API.$on('LOGIN', function (args) {
|
||||||
$app.feedTable.data = VRCXStorage.GetArray(`${args.ref.id}_feedTable`);
|
$app.feedTable.data = VRCXStorage.GetArray(`${args.ref.id}_feedTable`);
|
||||||
$app.sweepFeed();
|
$app.sweepFeed();
|
||||||
@@ -6236,11 +6246,6 @@ speechSynthesis.getVoices();
|
|||||||
value: [],
|
value: [],
|
||||||
filterFn: (row, filter) => filter.value.some((v) => v === row.type)
|
filterFn: (row, filter) => filter.value.some((v) => v === row.type)
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'type',
|
|
||||||
value: true,
|
|
||||||
filterFn: (row, filter) => row.type !== 'Notification'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: 'data',
|
prop: 'data',
|
||||||
value: ''
|
value: ''
|
||||||
@@ -6249,6 +6254,11 @@ speechSynthesis.getVoices();
|
|||||||
prop: 'data',
|
prop: 'data',
|
||||||
value: true,
|
value: true,
|
||||||
filterFn: (row, filter) => row.data !== API.currentUser.displayName
|
filterFn: (row, filter) => row.data !== API.currentUser.displayName
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'type',
|
||||||
|
value: true,
|
||||||
|
filterFn: (row, filter) => row.type !== 'Notification'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
tableProps: {
|
tableProps: {
|
||||||
@@ -6272,6 +6282,13 @@ 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 () {
|
$app.methods.resetGameLog = async function () {
|
||||||
await gameLogService.reset();
|
await gameLogService.reset();
|
||||||
this.gameLogTable.data = [];
|
this.gameLogTable.data = [];
|
||||||
@@ -11181,10 +11198,13 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.data.friendsListSearch = '';
|
$app.data.friendsListSearch = '';
|
||||||
$app.data.friendsListSearchFilterVIP = false;
|
$app.data.friendsListSearchFilterVIP = false;
|
||||||
$app.data.friendsListSearchFilters = [ 'Display Name', 'User Name', 'Rank', 'Status', 'Bio', 'Memo' ];
|
$app.data.friendsListSearchFilters = [];
|
||||||
|
|
||||||
$app.methods.friendsListSearchChange = function () {
|
$app.methods.friendsListSearchChange = function () {
|
||||||
var filters = this.friendsListSearchFilters;
|
var filters = [...this.friendsListSearchFilters];
|
||||||
|
if (filters.length === 0) {
|
||||||
|
filters = [ 'Display Name', 'User Name', 'Rank', 'Status', 'Bio', 'Memo' ];
|
||||||
|
}
|
||||||
var results = [];
|
var results = [];
|
||||||
if (this.friendsListSearch) {
|
if (this.friendsListSearch) {
|
||||||
var query = this.friendsListSearch.toUpperCase();
|
var query = this.friendsListSearch.toUpperCase();
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ html
|
|||||||
div(style="flex:none;margin-right:10px")
|
div(style="flex:none;margin-right:10px")
|
||||||
el-tooltip(placement="bottom" content="Filter VIP only" :disabled="hideTooltips")
|
el-tooltip(placement="bottom" content="Filter VIP only" :disabled="hideTooltips")
|
||||||
el-switch(v-model="feedTable.filters[2].value" active-color="#13ce66")
|
el-switch(v-model="feedTable.filters[2].value" active-color="#13ce66")
|
||||||
el-select(v-model="feedTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
el-select(v-model="feedTable.filters[0].value" @change="saveFeedTableFilters" 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-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-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")
|
el-tooltip(placement="bottom" content="Clear feed" :disabled="hideTooltips")
|
||||||
@@ -176,7 +176,7 @@ html
|
|||||||
data-tables(v-bind="gameLogTable")
|
data-tables(v-bind="gameLogTable")
|
||||||
template(#tool)
|
template(#tool)
|
||||||
div(style="margin:0 0 10px;display:flex;align-items:center")
|
div(style="margin:0 0 10px;display:flex;align-items:center")
|
||||||
el-select(v-model="gameLogTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
|
el-select(v-model="gameLogTable.filters[0].value" @change="saveGameLogTableFilters" 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-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-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")
|
el-tooltip(placement="bottom" content="Reset game log" :disabled="hideTooltips")
|
||||||
|
|||||||
Reference in New Issue
Block a user