ripple on renote
This commit is contained in:
parent
9c8b280c2f
commit
e6f36eb126
|
@ -16,6 +16,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as misskey from 'misskey-js';
|
||||||
|
import Ripple from '@/components/MkRipple.vue';
|
||||||
import XDetails from '@/components/MkUsersTooltip.vue';
|
import XDetails from '@/components/MkUsersTooltip.vue';
|
||||||
import { pleaseLogin } from '@/scripts/please-login';
|
import { pleaseLogin } from '@/scripts/please-login';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -58,6 +59,13 @@ const renote = (viaKeyboard = false) => {
|
||||||
renoteId: props.note.id,
|
renoteId: props.note.id,
|
||||||
visibility: props.note.visibility,
|
visibility: props.note.visibility,
|
||||||
});
|
});
|
||||||
|
const el = ev && (ev.currentTarget ?? ev.target) as HTMLElement | null | undefined;
|
||||||
|
if (el) {
|
||||||
|
const rect = el.getBoundingClientRect();
|
||||||
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
const y = rect.top + (el.offsetHeight / 2);
|
||||||
|
os.popup(Ripple, { x, y }, {}, 'end');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
os.popupMenu([{
|
os.popupMenu([{
|
||||||
text: i18n.ts.renote,
|
text: i18n.ts.renote,
|
||||||
|
|
|
@ -74,7 +74,7 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
const particles = [];
|
const particles = [];
|
||||||
const origin = 64;
|
const origin = 64;
|
||||||
const colors = ['#FF1493', '#00FFFF', '#FFE202'];
|
const colors = ['#eb6f92', '#9ccfd8', '#f6c177'];
|
||||||
const zIndex = os.claimZIndex('high');
|
const zIndex = os.claimZIndex('high');
|
||||||
|
|
||||||
if (props.particle) {
|
if (props.particle) {
|
||||||
|
|
|
@ -120,7 +120,6 @@ function onSlideChange() {
|
||||||
|
|
||||||
function syncSlide(index) {
|
function syncSlide(index) {
|
||||||
swiperRef.slideTo(index);
|
swiperRef.slideTo(index);
|
||||||
tab = tabs[index];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue