Files
AlgerMusicPlayer/src/renderer/components/Coffee.vue
T

93 lines
2.5 KiB
Vue
Raw Normal View History

2024-12-07 23:20:31 +08:00
<template>
<div class="relative inline-block">
<n-popover trigger="hover" placement="top" :show-arrow="true" :raw="true" :delay="100">
<template #trigger>
<slot>
<n-button
quaternary
class="inline-flex items-center gap-2 px-4 py-2 transition-all duration-300 hover:-translate-y-0.5"
>
2025-02-19 01:01:43 +08:00
{{ t('comp.coffee.title') }}
2024-12-07 23:20:31 +08:00
</n-button>
</slot>
</template>
<div class="p-6 rounded-lg shadow-lg bg-light dark:bg-gray-800">
2024-12-15 14:13:13 +08:00
<div class="flex gap-10">
2024-12-07 23:20:31 +08:00
<div class="flex flex-col items-center gap-2">
<n-image
:src="alipayQR"
2025-02-19 01:01:43 +08:00
:alt="t('comp.coffee.alipayQR')"
class="w-32 h-32 rounded-lg cursor-none"
preview-disabled
/>
2025-02-19 01:01:43 +08:00
<span class="text-sm text-gray-700 dark:text-gray-200">{{
t('comp.coffee.alipay')
}}</span>
2024-12-07 23:20:31 +08:00
</div>
<div class="flex flex-col items-center gap-2">
<n-image
:src="wechatQR"
2025-02-19 01:01:43 +08:00
:alt="t('comp.coffee.wechatQR')"
class="w-32 h-32 rounded-lg cursor-none"
preview-disabled
/>
2025-02-19 01:01:43 +08:00
<span class="text-sm text-gray-700 dark:text-gray-200">{{
t('comp.coffee.wechat')
}}</span>
2024-12-07 23:20:31 +08:00
</div>
</div>
2024-12-25 19:55:24 +08:00
<div class="mt-4">
<p
class="text-sm text-gray-700 dark:text-gray-200 text-center cursor-pointer hover:text-green-500"
@click="copyQQ"
>
2025-02-19 01:01:43 +08:00
{{ t('comp.coffee.qqGroup') }}
2024-12-25 19:55:24 +08:00
</p>
</div>
2025-03-08 23:22:56 +08:00
<div class="mt-4">
<!-- 赞赏列表地址 -->
<p
class="text-sm text-green-600 dark:text-gray-200 text-center cursor-pointer hover:text-green-500"
@click="toDonateList"
>
{{ t('comp.coffee.donateList') }}
</p>
</div>
2024-12-07 23:20:31 +08:00
</div>
</n-popover>
</div>
</template>
<script setup>
2025-02-19 01:01:43 +08:00
import { NButton, NImage, NPopover, useMessage } from 'naive-ui';
import { useI18n } from 'vue-i18n';
2025-01-10 22:49:55 +08:00
2025-01-01 22:42:25 +08:00
import alipay from '@/assets/alipay.png';
import wechat from '@/assets/wechat.png';
2025-01-10 22:49:55 +08:00
2025-02-19 01:01:43 +08:00
const { t } = useI18n();
2024-12-25 19:55:24 +08:00
const message = useMessage();
const copyQQ = () => {
navigator.clipboard.writeText('algermusic');
message.success(t('common.copySuccess'));
2024-12-25 19:55:24 +08:00
};
2025-03-08 23:22:56 +08:00
const toDonateList = () => {
window.open('http://donate.alger.fun', '_blank');
};
2024-12-07 23:20:31 +08:00
defineProps({
alipayQR: {
type: String,
2025-01-01 22:42:25 +08:00
default: alipay
2024-12-07 23:20:31 +08:00
},
wechatQR: {
type: String,
2025-01-01 22:42:25 +08:00
default: wechat
}
2024-12-07 23:20:31 +08:00
});
</script>