Merge remote-tracking branch 'misskey/release/2024.5.0' into future-2024-04-25-post
This commit is contained in:
commit
451b0ecc9b
81 changed files with 16594 additions and 13171 deletions
|
|
@ -432,7 +432,7 @@ async function assignRole() {
|
|||
if (canceled) return;
|
||||
|
||||
const { canceled: canceled2, result: period } = await os.select({
|
||||
title: i18n.ts.period,
|
||||
title: i18n.ts.period + ': ' + roles.find(r => r.id === roleId)!.name,
|
||||
items: [{
|
||||
value: 'indefinitely', text: i18n.ts.indefinitely,
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ async function assign() {
|
|||
const user = await os.selectUser({ includeSelf: true });
|
||||
|
||||
const { canceled: canceled2, result: period } = await os.select({
|
||||
title: i18n.ts.period,
|
||||
title: i18n.ts.period + ': ' + role.name,
|
||||
items: [{
|
||||
value: 'indefinitely', text: i18n.ts.indefinitely,
|
||||
}, {
|
||||
|
|
|
|||
24
packages/frontend/src/pages/contact.vue
Normal file
24
packages/frontend/src/pages/contact.vue
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkStickyContainer>
|
||||
<template #header><MkPageHeader/></template>
|
||||
<MkSpacer :contentMax="600" :marginMin="20">
|
||||
<div>{{ instance.maintainerEmail }}</div>
|
||||
</MkSpacer>
|
||||
</MkStickyContainer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { instance } from '@/instance.js';
|
||||
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.inquiry,
|
||||
icon: 'ti ti-help-circle',
|
||||
}));
|
||||
</script>
|
||||
|
|
@ -163,11 +163,11 @@ var cursor = 0
|
|||
text: "←"
|
||||
disabled: !(results.len > 1 && (results.len - cursor) > 1)
|
||||
onClick: back
|
||||
} {
|
||||
}, {
|
||||
text: "→"
|
||||
disabled: !(results.len > 1 && cursor > 0)
|
||||
onClick: forward
|
||||
} {
|
||||
}, {
|
||||
text: "引き直す"
|
||||
onClick: do
|
||||
}]
|
||||
|
|
@ -196,17 +196,17 @@ let qas = [{
|
|||
choices: ['シドニー', 'キャンベラ', 'メルボルン']
|
||||
a: 'キャンベラ'
|
||||
aDescription: '最大の都市はシドニーですが首都はキャンベラです。'
|
||||
} {
|
||||
}, {
|
||||
q: '国土面積2番目の国は?'
|
||||
choices: ['カナダ', 'アメリカ', '中国']
|
||||
a: 'カナダ'
|
||||
aDescription: '大きい順にロシア、カナダ、アメリカ、中国です。'
|
||||
} {
|
||||
}, {
|
||||
q: '二重内陸国ではないのは?'
|
||||
choices: ['リヒテンシュタイン', 'ウズベキスタン', 'レソト']
|
||||
a: 'レソト'
|
||||
aDescription: 'レソトは(一重)内陸国です。'
|
||||
} {
|
||||
}, {
|
||||
q: '閘門がない運河は?'
|
||||
choices: ['キール運河', 'スエズ運河', 'パナマ運河']
|
||||
a: 'スエズ運河'
|
||||
|
|
@ -244,9 +244,9 @@ each (let qa, qas) {
|
|||
})
|
||||
Ui:C:container({
|
||||
children: []
|
||||
} \`{qa.id}:a\`)
|
||||
}, \`{qa.id}:a\`)
|
||||
]
|
||||
} qa.id))
|
||||
}, qa.id))
|
||||
}
|
||||
|
||||
@finish() {
|
||||
|
|
|
|||
|
|
@ -15,11 +15,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkAsUi v-if="root" :component="root" :components="components"/>
|
||||
</div>
|
||||
<div class="actions _panel">
|
||||
<MkButton v-if="flash.isLiked" v-tooltip="i18n.ts.unlike" asLike class="button" rounded primary @click="unlike()"><i class="ph-heart ph-bold ph-lg"></i><span v-if="flash.likedCount > 0" style="margin-left: 6px;">{{ flash.likedCount }}</span></MkButton>
|
||||
<MkButton v-else v-tooltip="i18n.ts.like" asLike class="button" rounded @click="like()"><i class="ph-heart ph-bold ph-lg"></i><span v-if="flash.likedCount > 0" style="margin-left: 6px;">{{ flash.likedCount }}</span></MkButton>
|
||||
<MkButton v-tooltip="i18n.ts.shareWithNote" class="button" rounded @click="shareWithNote"><i class="ph-repeat ph-bold ph-lg ti-fw"></i></MkButton>
|
||||
<MkButton v-tooltip="i18n.ts.copyLink" class="button" rounded @click="copyLink"><i class="ph-share-network ph-bold ph-lg ti-fw"></i></MkButton>
|
||||
<MkButton v-if="isSupportShare()" v-tooltip="i18n.ts.share" class="button" rounded @click="share"><i class="ph-share-network ph-bold ph-lg ti-fw"></i></MkButton>
|
||||
<div class="items">
|
||||
<MkButton v-tooltip="i18n.ts.reload" class="button" rounded @click="reset"><i class="ti ti-reload"></i></MkButton>
|
||||
</div>
|
||||
<div class="items">
|
||||
<MkButton v-if="flash.isLiked" v-tooltip="i18n.ts.unlike" asLike class="button" rounded primary @click="unlike()"><i class="ph-heart ph-bold ph-lg"></i><span v-if="flash?.likedCount && flash.likedCount > 0" style="margin-left: 6px;">{{ flash.likedCount }}</span></MkButton>
|
||||
<MkButton v-else v-tooltip="i18n.ts.like" asLike class="button" rounded @click="like()"><i class="ph-heart ph-bold ph-lg"></i><span v-if="flash?.likedCount && flash.likedCount > 0" style="margin-left: 6px;">{{ flash.likedCount }}</span></MkButton>
|
||||
<MkButton v-tooltip="i18n.ts.copyLink" class="button" rounded @click="copyLink"><i class="ph-link ph-bold ph-lg ti-fw"></i></MkButton>
|
||||
<MkButton v-tooltip="i18n.ts.share" class="button" rounded @click="share"><i class="ph-share-network ph-bold ph-lg ti-fw"></i></MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else :class="$style.ready">
|
||||
|
|
@ -49,7 +53,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkA v-if="$i && $i.id === flash.userId" :to="`/play/${flash.id}/edit`" style="color: var(--accent);">{{ i18n.ts._play.editThisPage }}</MkA>
|
||||
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
||||
</div>
|
||||
<MkError v-else-if="error" @retry="fetchPage()"/>
|
||||
<MkError v-else-if="error" @retry="fetchFlash()"/>
|
||||
<MkLoading v-else/>
|
||||
</Transition>
|
||||
</MkSpacer>
|
||||
|
|
@ -94,12 +98,33 @@ function fetchFlash() {
|
|||
});
|
||||
}
|
||||
|
||||
function share(ev: MouseEvent) {
|
||||
if (!flash.value) return;
|
||||
|
||||
os.popupMenu([
|
||||
{
|
||||
text: i18n.ts.shareWithNote,
|
||||
icon: 'ph-repeat ph-bold ph-lg ti-fw',
|
||||
action: shareWithNote,
|
||||
},
|
||||
...(isSupportShare() ? [{
|
||||
text: i18n.ts.share,
|
||||
icon: 'ph-share-network ph-bold ph-lg ti-fw',
|
||||
action: shareWithNavigator,
|
||||
}] : []),
|
||||
], ev.currentTarget ?? ev.target);
|
||||
}
|
||||
|
||||
function copyLink() {
|
||||
if (!flash.value) return;
|
||||
|
||||
copyToClipboard(`${url}/play/${flash.value.id}`);
|
||||
os.success();
|
||||
}
|
||||
|
||||
function share() {
|
||||
function shareWithNavigator() {
|
||||
if (!flash.value) return;
|
||||
|
||||
navigator.share({
|
||||
title: flash.value.title,
|
||||
text: flash.value.summary,
|
||||
|
|
@ -108,21 +133,28 @@ function share() {
|
|||
}
|
||||
|
||||
function shareWithNote() {
|
||||
if (!flash.value) return;
|
||||
|
||||
os.post({
|
||||
initialText: `${flash.value.title} ${url}/play/${flash.value.id}`,
|
||||
initialText: `${flash.value.title}\n${url}/play/${flash.value.id}`,
|
||||
instant: true,
|
||||
});
|
||||
}
|
||||
|
||||
function like() {
|
||||
if (!flash.value) return;
|
||||
|
||||
os.apiWithDialog('flash/like', {
|
||||
flashId: flash.value.id,
|
||||
}).then(() => {
|
||||
flash.value.isLiked = true;
|
||||
flash.value.likedCount++;
|
||||
flash.value!.isLiked = true;
|
||||
flash.value!.likedCount++;
|
||||
});
|
||||
}
|
||||
|
||||
async function unlike() {
|
||||
if (!flash.value) return;
|
||||
|
||||
const confirm = await os.confirm({
|
||||
type: 'warning',
|
||||
text: i18n.ts.unlikeConfirm,
|
||||
|
|
@ -131,8 +163,8 @@ async function unlike() {
|
|||
os.apiWithDialog('flash/unlike', {
|
||||
flashId: flash.value.id,
|
||||
}).then(() => {
|
||||
flash.value.isLiked = false;
|
||||
flash.value.likedCount--;
|
||||
flash.value!.isLiked = false;
|
||||
flash.value!.likedCount--;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -152,6 +184,7 @@ function start() {
|
|||
|
||||
async function run() {
|
||||
if (aiscript.value) aiscript.value.abort();
|
||||
if (!flash.value) return;
|
||||
|
||||
aiscript.value = new Interpreter({
|
||||
...createAiScriptEnv({
|
||||
|
|
@ -193,12 +226,17 @@ async function run() {
|
|||
}
|
||||
}
|
||||
|
||||
onDeactivated(() => {
|
||||
function reset() {
|
||||
if (aiscript.value) aiscript.value.abort();
|
||||
started.value = false;
|
||||
}
|
||||
|
||||
onDeactivated(() => {
|
||||
reset();
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
if (aiscript.value) aiscript.value.abort();
|
||||
reset();
|
||||
});
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
|
@ -265,11 +303,19 @@ definePageMetadata(() => ({
|
|||
}
|
||||
|
||||
> .actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
padding: 16px;
|
||||
|
||||
> .items {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
padding: 16px;
|
||||
border-bottom: 1px solid var(--divider);
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
|||
import { deepClone } from '@/scripts/clone.js';
|
||||
import { useInterval } from '@/scripts/use-interval.js';
|
||||
import { signinRequired } from '@/account.js';
|
||||
import { url } from '@/config.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { userPage } from '@/filters/user.js';
|
||||
|
|
@ -442,7 +443,7 @@ function autoplay() {
|
|||
|
||||
function share() {
|
||||
os.post({
|
||||
initialText: `#MisskeyReversi ${location.href}`,
|
||||
initialText: `#MisskeyReversi\n${url}/reversi/g/${game.value.id}`,
|
||||
instant: true,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,11 +42,11 @@ import XTimeline from './welcome.timeline.vue';
|
|||
import MarqueeText from '@/components/MkMarquee.vue';
|
||||
import MkFeaturedPhotos from '@/components/MkFeaturedPhotos.vue';
|
||||
import misskeysvg from '/client-assets/sharkey.svg';
|
||||
import { misskeyApi, misskeyApiGet } from '@/scripts/misskey-api.js';
|
||||
import { misskeyApiGet } from '@/scripts/misskey-api.js';
|
||||
import MkVisitorDashboard from '@/components/MkVisitorDashboard.vue';
|
||||
import { getProxiedImageUrl } from '@/scripts/media-proxy.js';
|
||||
import { instance as meta } from '@/instance.js';
|
||||
|
||||
const meta = ref<Misskey.entities.MetaResponse>();
|
||||
const instances = ref<Misskey.entities.FederationInstance[]>();
|
||||
|
||||
function getInstanceIcon(instance: Misskey.entities.FederationInstance): string {
|
||||
|
|
@ -56,10 +56,6 @@ function getInstanceIcon(instance: Misskey.entities.FederationInstance): string
|
|||
return getProxiedImageUrl(instance.iconUrl, 'preview');
|
||||
}
|
||||
|
||||
misskeyApi('meta', { detail: true }).then(_meta => {
|
||||
meta.value = _meta;
|
||||
});
|
||||
|
||||
misskeyApiGet('federation/instances', {
|
||||
sort: '+pubSub',
|
||||
limit: 20,
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
-->
|
||||
|
||||
<template>
|
||||
<div v-if="meta">
|
||||
<XSetup v-if="meta.requireSetup"/>
|
||||
<div v-if="instance">
|
||||
<XSetup v-if="instance.requireSetup"/>
|
||||
<XEntrance v-else/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -16,13 +16,13 @@ import * as Misskey from 'misskey-js';
|
|||
import XSetup from './welcome.setup.vue';
|
||||
import XEntrance from './welcome.entrance.a.vue';
|
||||
import { instanceName } from '@/config.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { fetchInstance } from '@/instance.js';
|
||||
|
||||
const meta = ref<Misskey.entities.MetaResponse | null>(null);
|
||||
const instance = ref<Misskey.entities.MetaDetailed | null>(null);
|
||||
|
||||
misskeyApi('meta', { detail: true }).then(res => {
|
||||
meta.value = res;
|
||||
fetchInstance(true).then((res) => {
|
||||
instance.value = res;
|
||||
});
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue