mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Sort playerlist icons
This commit is contained in:
@@ -697,7 +697,13 @@
|
|||||||
<span v-text="scope.row.photonId"></span>
|
<span v-text="scope.row.photonId"></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="t('table.playerList.icon')" prop="isMaster" width="70" align="center">
|
<el-table-column
|
||||||
|
:label="t('table.playerList.icon')"
|
||||||
|
prop="isMaster"
|
||||||
|
width="80"
|
||||||
|
align="center"
|
||||||
|
sortable
|
||||||
|
:sort-method="sortInstanceIcon">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip v-if="scope.row.isMaster" placement="left" content="Instance Master">
|
<el-tooltip v-if="scope.row.isMaster" placement="left" content="Instance Master">
|
||||||
<span>👑</span>
|
<span>👑</span>
|
||||||
@@ -929,4 +935,19 @@
|
|||||||
await saveChatboxUserBlacklist();
|
await saveChatboxUserBlacklist();
|
||||||
getCurrentInstanceUserList();
|
getCurrentInstanceUserList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sortInstanceIcon(a, b) {
|
||||||
|
const getValue = (item) => {
|
||||||
|
let value = 0;
|
||||||
|
if (item.isMaster) value += 1000;
|
||||||
|
if (item.isModerator) value += 500;
|
||||||
|
if (item.isFriend) value += 200;
|
||||||
|
if (item.isBlocked) value -= 100;
|
||||||
|
if (item.isMuted) value -= 50;
|
||||||
|
if (item.isAvatarInteractionDisabled) value -= 20;
|
||||||
|
if (item.isChatBoxMuted) value -= 10;
|
||||||
|
return value;
|
||||||
|
};
|
||||||
|
return getValue(b) - getValue(a);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user