2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2023-01-07 02:49:00 +00:00
|
|
|
<template>
|
|
|
|
<div class="_panel _shadow" :class="$style.root">
|
|
|
|
<!-- TODO: インスタンス運営者が任意のテキストとリンクを設定できるようにする -->
|
|
|
|
<div :class="$style.icon">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-pig-money" width="40" height="40" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
|
|
<path d="M15 11v.01"></path>
|
|
|
|
<path d="M5.173 8.378a3 3 0 1 1 4.656 -1.377"></path>
|
|
|
|
<path d="M16 4v3.803a6.019 6.019 0 0 1 2.658 3.197h1.341a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-1.342c-.336 .95 -.907 1.8 -1.658 2.473v2.027a1.5 1.5 0 0 1 -3 0v-.583a6.04 6.04 0 0 1 -1 .083h-4a6.04 6.04 0 0 1 -1 -.083v.583a1.5 1.5 0 0 1 -3 0v-2l.001 -.027a6 6 0 0 1 3.999 -10.473h2.5l4.5 -3h.001z"></path>
|
|
|
|
</svg>
|
|
|
|
</div>
|
|
|
|
<div :class="$style.main">
|
|
|
|
<div :class="$style.title">{{ i18n.ts.didYouLikeMisskey }}</div>
|
|
|
|
<div :class="$style.text">
|
|
|
|
<I18n :src="i18n.ts.pleaseDonate" tag="span">
|
|
|
|
<template #host>
|
2023-04-01 04:46:04 +00:00
|
|
|
{{ instance.name ?? host }}
|
2023-01-07 02:49:00 +00:00
|
|
|
</template>
|
|
|
|
</I18n>
|
|
|
|
<div style="margin-top: 0.2em;">
|
2023-09-23 19:03:59 +00:00
|
|
|
<MkLink target="_blank" url="https://ko-fi.com/transfem">{{ i18n.ts.learnMore }}</MkLink>
|
2023-01-07 02:49:00 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-01-09 20:32:47 +00:00
|
|
|
<div v-if="instance.donationUrl" :class="$style.text">
|
|
|
|
<I18n :src="i18n.ts.pleaseDonateInstance" tag="span">
|
|
|
|
<template #host>
|
|
|
|
{{ instance.name ?? host }}
|
|
|
|
</template>
|
|
|
|
</I18n>
|
|
|
|
<div style="margin-top: 0.2em;">
|
|
|
|
<MkLink target="_blank" :url="instance.donationUrl">{{ i18n.ts.learnMore }}</MkLink>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-07 02:49:00 +00:00
|
|
|
<div class="_buttons">
|
|
|
|
<MkButton @click="close">{{ i18n.ts.remindMeLater }}</MkButton>
|
|
|
|
<MkButton @click="neverShow">{{ i18n.ts.neverShow }}</MkButton>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-30 19:53:52 +00:00
|
|
|
<button class="_button" :class="$style.close" @click="close"><i class="ph-x ph-bold ph-lg"></i></button>
|
2023-01-07 02:49:00 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import MkButton from '@/components/MkButton.vue';
|
|
|
|
import MkLink from '@/components/MkLink.vue';
|
2023-09-19 07:37:43 +00:00
|
|
|
import { host } from '@/config.js';
|
|
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
import * as os from '@/os.js';
|
|
|
|
import { miLocalStorage } from '@/local-storage.js';
|
|
|
|
import { instance } from '@/instance.js';
|
2023-01-07 02:49:00 +00:00
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
|
(ev: 'closed'): void;
|
|
|
|
}>();
|
|
|
|
|
|
|
|
const zIndex = os.claimZIndex('low');
|
|
|
|
|
|
|
|
function close() {
|
|
|
|
miLocalStorage.setItem('latestDonationInfoShownAt', Date.now().toString());
|
|
|
|
emit('closed');
|
|
|
|
}
|
|
|
|
|
|
|
|
function neverShow() {
|
2023-02-17 01:56:23 +00:00
|
|
|
miLocalStorage.setItem('neverShowDonationInfo', 'true');
|
2023-01-07 02:49:00 +00:00
|
|
|
close();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
|
|
|
position: fixed;
|
|
|
|
z-index: v-bind(zIndex);
|
|
|
|
bottom: var(--margin);
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
margin: auto;
|
|
|
|
box-sizing: border-box;
|
|
|
|
width: calc(100% - (var(--margin) * 2));
|
|
|
|
max-width: 500px;
|
|
|
|
display: flex;
|
2023-10-21 11:51:07 +00:00
|
|
|
backdrop-filter: var(--blur, blur(15px));
|
2023-01-07 02:49:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
text-align: center;
|
|
|
|
padding-top: 25px;
|
|
|
|
width: 100px;
|
|
|
|
color: var(--accent);
|
|
|
|
}
|
|
|
|
@media (max-width: 500px) {
|
|
|
|
.icon {
|
|
|
|
width: 80px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@media (max-width: 450px) {
|
|
|
|
.icon {
|
|
|
|
width: 70px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.main {
|
|
|
|
padding: 25px 25px 25px 0;
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.close {
|
|
|
|
position: absolute;
|
|
|
|
top: 8px;
|
|
|
|
right: 8px;
|
|
|
|
padding: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.text {
|
|
|
|
margin: 0.7em 0 1em 0;
|
|
|
|
}
|
|
|
|
</style>
|