mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
Favorites action buttons clean up and tooltips
This commit is contained in:
@@ -44,15 +44,40 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="favorites-search-card__action">
|
||||
<el-tooltip placement="top" :content="inviteOrLaunchText">
|
||||
<el-button
|
||||
size="small"
|
||||
:icon="Message"
|
||||
class="favorites-search-card__action-btn"
|
||||
@click.stop="newInstanceSelfInvite(favorite.id)"
|
||||
circle />
|
||||
</el-tooltip>
|
||||
<div class="favorites-search-card__action-group">
|
||||
<div class="favorites-search-card__action">
|
||||
<el-tooltip placement="top" :content="inviteOrLaunchText">
|
||||
<el-button
|
||||
size="small"
|
||||
:icon="Message"
|
||||
class="favorites-search-card__action-btn"
|
||||
@click.stop="newInstanceSelfInvite(favorite.id)"
|
||||
circle />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="favorites-search-card__action">
|
||||
<el-tooltip
|
||||
v-if="showDangerUnfavorite"
|
||||
placement="top"
|
||||
:content="t('view.favorite.unfavorite_tooltip')">
|
||||
<el-button
|
||||
size="small"
|
||||
:icon="Close"
|
||||
circle
|
||||
class="favorites-search-card__action-btn"
|
||||
type="danger"
|
||||
@click.stop="handleDeleteFavorite" />
|
||||
</el-tooltip>
|
||||
<el-tooltip v-else placement="top" :content="t('view.favorite.edit_favorite_tooltip')">
|
||||
<el-button
|
||||
type="default"
|
||||
:icon="Star"
|
||||
size="small"
|
||||
circle
|
||||
class="favorites-search-card__action-btn"
|
||||
@click.stop="showFavoriteDialog('world', favorite.id)" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -76,7 +101,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Message } from '@element-plus/icons-vue';
|
||||
import { Close, Message, Star } from '@element-plus/icons-vue';
|
||||
import { computed } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
@@ -120,6 +145,10 @@
|
||||
: t('dialog.world.actions.new_instance_and_self_invite');
|
||||
});
|
||||
|
||||
const showDangerUnfavorite = computed(() => {
|
||||
return shiftHeld.value;
|
||||
});
|
||||
|
||||
function handlePrimaryDeleteAction() {
|
||||
if (shiftHeld.value) {
|
||||
emit('remove-local-world-favorite', props.favorite.id, props.group);
|
||||
|
||||
Reference in New Issue
Block a user