summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2024-02-17 13:34:50 +0900
committerGitHub <noreply@github.com>2024-02-17 13:34:50 +0900
commitacba96c1d34572ed7bd454462c2462d2a32369f4 (patch)
tree9960987a3d6b39847bcf252514eca58650f9d59c /packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
parentfeat: add link to local note in initial comment of abuse note (#13347) (diff)
downloadsharkey-acba96c1d34572ed7bd454462c2462d2a32369f4.tar.gz
sharkey-acba96c1d34572ed7bd454462c2462d2a32369f4.tar.bz2
sharkey-acba96c1d34572ed7bd454462c2462d2a32369f4.zip
feat: license violation protection (#13285)
* spec(frontend): aboutページにリポジトリ・フィードバックのURLを表示させる Cherry-picked from MisskeyIO#441 Cherry-picked from MisskeyIO#438 * feat: license violation protection * build: fix typo * build: fix typo * fix: farewell to the static type land * fix: key typo * fix: import typo * fix: properly interpret `prominently` * docs: add disclaimer * docs: update CHANGELOG * chore: add gap --------- Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/components/MkSourceCodeAvailablePopup.vue')
-rw-r--r--packages/frontend/src/components/MkSourceCodeAvailablePopup.vue112
1 files changed, 112 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue b/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
new file mode 100644
index 0000000000..80f3a6709c
--- /dev/null
+++ b/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
@@ -0,0 +1,112 @@
+<!--
+SPDX-FileCopyrightText: syuilo and misskey-project
+SPDX-License-Identifier: AGPL-3.0-only
+-->
+
+<template>
+<div class="_panel _shadow" :class="$style.root">
+ <div :class="$style.icon">
+ <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-open-source" 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 d="M12 3a9 9 0 0 1 3.618 17.243l-2.193 -5.602a3 3 0 1 0 -2.849 0l-2.193 5.603a9 9 0 0 1 3.617 -17.244z"/>
+ </svg>
+ </div>
+ <div :class="$style.main">
+ <div :class="$style.title">
+ <I18n :src="i18n.ts.aboutX" tag="span">
+ <template #x>
+ {{ instance.name ?? host }}
+ </template>
+ </I18n>
+ </div>
+ <div :class="$style.text">
+ <I18n :src="i18n.ts._aboutMisskey.thisIsModifiedVersion" tag="span">
+ <template #name>
+ {{ instance.name ?? host }}
+ </template>
+ </I18n>
+ <I18n :src="i18n.ts.correspondingSourceIsAvailable" tag="span">
+ <template #anchor>
+ <MkA to="/about-misskey" class="_link">{{ i18n.ts.aboutMisskey }}</MkA>
+ </template>
+ </I18n>
+ </div>
+ <div class="_buttons">
+ <MkButton @click="close">{{ i18n.ts.gotIt }}</MkButton>
+ </div>
+ </div>
+ <button class="_button" :class="$style.close" @click="close"><i class="ti ti-x"></i></button>
+</div>
+</template>
+
+<script lang="ts" setup>
+import MkButton from '@/components/MkButton.vue';
+import { host } from '@/config.js';
+import { i18n } from '@/i18n.js';
+import { instance } from '@/instance.js';
+import { miLocalStorage } from '@/local-storage.js';
+import * as os from '@/os.js';
+
+const emit = defineEmits<{
+ (ev: 'closed'): void;
+}>();
+
+const zIndex = os.claimZIndex('low');
+
+function close() {
+ miLocalStorage.setItem('modifiedVersionMustProminentlyOfferInAgplV3Section13Read', 'true');
+ emit('closed');
+}
+</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;
+}
+
+.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>