mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-24 17:23:50 +02:00
Boops
This commit is contained in:
@@ -125,7 +125,16 @@
|
||||
|
||||
<el-table-column :label="t('table.notification.photo')" width="100" prop="photo">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.details && scope.row.details.imageUrl">
|
||||
<template v-if="scope.row.type === 'boop'">
|
||||
<img
|
||||
v-if="!scope.row.details.imageUrl.startsWith('default_')"
|
||||
class="x-link"
|
||||
:src="getSmallThumbnailUrl(scope.row.details.imageUrl)"
|
||||
style="flex: none; height: 50px; border-radius: 4px"
|
||||
@click="showFullscreenImageDialog(scope.row.details.imageUrl)"
|
||||
loading="lazy" />
|
||||
</template>
|
||||
<template v-else-if="scope.row.details && scope.row.details.imageUrl">
|
||||
<img
|
||||
class="x-link"
|
||||
:src="getSmallThumbnailUrl(scope.row.details.imageUrl)"
|
||||
@@ -224,7 +233,14 @@
|
||||
<template v-for="response in scope.row.responses" :key="response.text">
|
||||
<el-tooltip placement="top" :content="response.text">
|
||||
<el-button
|
||||
v-if="response.icon === 'check'"
|
||||
v-if="response.type === 'link'"
|
||||
type="text"
|
||||
:icon="Link"
|
||||
size="small"
|
||||
:class="['button-pd-0', 'ml-5']"
|
||||
@click="openNotificationLink(response.data)" />
|
||||
<el-button
|
||||
v-else-if="response.icon === 'check'"
|
||||
type="text"
|
||||
:icon="Check"
|
||||
size="small"
|
||||
@@ -259,13 +275,13 @@
|
||||
@click="
|
||||
sendNotificationResponse(scope.row.id, scope.row.responses, response.type)
|
||||
" />
|
||||
<!--//el-button(-->
|
||||
<!--// v-else-if='response.icon === "reply" && scope.row.type === "boop"'-->
|
||||
<!--// type='text'-->
|
||||
<!--// icon='el-icon-chat-line-square'-->
|
||||
<!--// size='mini'-->
|
||||
<!--// style='margin-left: 5px'-->
|
||||
<!--// @click='showSendBoopDialog(scope.row.senderUserId)')-->
|
||||
<el-button
|
||||
v-else-if="response.icon === 'reply' && scope.row.type === 'boop'"
|
||||
type="text"
|
||||
:icon="ChatLineSquare"
|
||||
size="small"
|
||||
:class="['button-pd-0', 'ml-5']"
|
||||
@click="showSendBoopDialog(scope.row.senderUserId)" />
|
||||
<el-button
|
||||
v-else-if="response.icon === 'reply'"
|
||||
type="text"
|
||||
@@ -384,6 +400,7 @@
|
||||
Close,
|
||||
CollectionTag,
|
||||
Delete,
|
||||
Link,
|
||||
Refresh
|
||||
} from '@element-plus/icons-vue';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
@@ -419,7 +436,7 @@
|
||||
import SendInviteResponseDialog from './dialogs/SendInviteResponseDialog.vue';
|
||||
import configRepository from '../../service/config';
|
||||
|
||||
const { showUserDialog } = useUserStore();
|
||||
const { showUserDialog, showSendBoopDialog } = useUserStore();
|
||||
const { showWorldDialog } = useWorldStore();
|
||||
const { showGroupDialog } = useGroupStore();
|
||||
const { lastLocation, lastLocationDestination } = storeToRefs(useLocationStore());
|
||||
|
||||
@@ -550,8 +550,14 @@
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import {
|
||||
extractFileId,
|
||||
formatDateFilter,
|
||||
generateEmojiStyle,
|
||||
getEmojiFileName,
|
||||
getPrintFileName
|
||||
} from '../../../shared/utils';
|
||||
import { inventoryRequest, miscRequest, userRequest, vrcPlusIconRequest, vrcPlusImageRequest } from '../../../api';
|
||||
import { extractFileId, formatDateFilter, getEmojiFileName, getPrintFileName } from '../../../shared/utils';
|
||||
import { useAdvancedSettingsStore, useAuthStore, useGalleryStore, useUserStore } from '../../../stores';
|
||||
import { emojiAnimationStyleList, emojiAnimationStyleUrl } from '../../../shared/constants';
|
||||
import { AppDebug } from '../../../service/appConfig';
|
||||
@@ -905,25 +911,6 @@
|
||||
document.getElementById('EmojiUploadButton').click();
|
||||
}
|
||||
|
||||
function generateEmojiStyle(url, fps, frameCount, loopStyle) {
|
||||
let framesPerLine = 2;
|
||||
if (frameCount > 4) framesPerLine = 4;
|
||||
if (frameCount > 16) framesPerLine = 8;
|
||||
const animationDurationMs = (1000 / fps) * frameCount;
|
||||
const frameSize = 1024 / framesPerLine;
|
||||
const scale = 100 / (frameSize / 200);
|
||||
const animStyle = loopStyle === 'pingpong' ? 'alternate' : 'none';
|
||||
const style = `
|
||||
transform: scale(${scale / 100});
|
||||
transform-origin: top left;
|
||||
width: ${frameSize}px;
|
||||
height: ${frameSize}px;
|
||||
background: url('${url}') 0 0;
|
||||
animation: ${animationDurationMs}ms steps(1) 0s infinite ${animStyle} running animated-emoji-${frameCount};
|
||||
`;
|
||||
return style;
|
||||
}
|
||||
|
||||
function deleteEmoji(fileId) {
|
||||
miscRequest.deleteFile(fileId).then((args) => {
|
||||
const array = emojiTable.value;
|
||||
|
||||
Reference in New Issue
Block a user