2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2020-01-29 19:37:25 +00:00
|
|
|
<template>
|
2022-07-24 06:41:06 +00:00
|
|
|
<MkStickyContainer>
|
|
|
|
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
2023-05-19 07:20:53 +00:00
|
|
|
<MkSpacer :contentMax="800">
|
2023-05-26 05:47:31 +00:00
|
|
|
<MkNotes ref="notes" class="" :pagination="pagination"/>
|
2022-07-24 06:41:06 +00:00
|
|
|
</MkSpacer>
|
2023-05-26 05:47:31 +00:00
|
|
|
<template v-if="$i" #footer>
|
|
|
|
<div :class="$style.footer">
|
|
|
|
<MkSpacer :contentMax="800" :marginMin="16" :marginMax="16">
|
|
|
|
<MkButton rounded primary :class="$style.button" @click="post()"><i class="ti ti-pencil"></i>{{ i18n.ts.postToHashtag }}</MkButton>
|
|
|
|
</MkSpacer>
|
|
|
|
</div>
|
|
|
|
</template>
|
2022-07-24 06:41:06 +00:00
|
|
|
</MkStickyContainer>
|
2020-01-29 19:37:25 +00:00
|
|
|
</template>
|
|
|
|
|
2022-01-12 17:21:43 +00:00
|
|
|
<script lang="ts" setup>
|
2023-05-26 05:47:31 +00:00
|
|
|
import { computed, ref } from 'vue';
|
2023-02-22 02:00:34 +00:00
|
|
|
import MkNotes from '@/components/MkNotes.vue';
|
2023-05-26 05:47:31 +00:00
|
|
|
import MkButton from '@/components/MkButton.vue';
|
2022-06-20 08:38:49 +00:00
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
2023-05-26 05:47:31 +00:00
|
|
|
import { i18n } from '@/i18n';
|
|
|
|
import { $i } from '@/account';
|
|
|
|
import { defaultStore } from '@/store';
|
|
|
|
import * as os from '@/os';
|
2020-01-29 19:37:25 +00:00
|
|
|
|
2022-01-12 17:21:43 +00:00
|
|
|
const props = defineProps<{
|
|
|
|
tag: string;
|
|
|
|
}>();
|
2020-01-29 19:37:25 +00:00
|
|
|
|
2022-01-12 17:21:43 +00:00
|
|
|
const pagination = {
|
2022-01-12 17:26:10 +00:00
|
|
|
endpoint: 'notes/search-by-tag' as const,
|
2022-01-12 17:21:43 +00:00
|
|
|
limit: 10,
|
|
|
|
params: computed(() => ({
|
|
|
|
tag: props.tag,
|
|
|
|
})),
|
|
|
|
};
|
2023-05-26 05:47:31 +00:00
|
|
|
const notes = ref<InstanceType<typeof MkNotes>>();
|
|
|
|
|
|
|
|
async function post() {
|
|
|
|
defaultStore.set('postFormHashtags', props.tag);
|
|
|
|
defaultStore.set('postFormWithHashtags', true);
|
|
|
|
await os.post();
|
|
|
|
defaultStore.set('postFormHashtags', '');
|
|
|
|
defaultStore.set('postFormWithHashtags', false);
|
|
|
|
notes.value?.pagingComponent?.reload();
|
|
|
|
}
|
2020-10-24 16:21:41 +00:00
|
|
|
|
2022-06-20 08:38:49 +00:00
|
|
|
const headerActions = $computed(() => []);
|
|
|
|
|
|
|
|
const headerTabs = $computed(() => []);
|
|
|
|
|
|
|
|
definePageMetadata(computed(() => ({
|
|
|
|
title: props.tag,
|
2022-12-19 10:01:30 +00:00
|
|
|
icon: 'ti ti-hash',
|
2022-06-20 08:38:49 +00:00
|
|
|
})));
|
2020-01-29 19:37:25 +00:00
|
|
|
</script>
|
2023-05-26 05:47:31 +00:00
|
|
|
|
|
|
|
<style lang="scss" module>
|
|
|
|
.footer {
|
|
|
|
-webkit-backdrop-filter: var(--blur, blur(15px));
|
|
|
|
backdrop-filter: var(--blur, blur(15px));
|
|
|
|
border-top: solid 0.5px var(--divider);
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.button {
|
|
|
|
margin: 0 auto var(--margin) auto;
|
|
|
|
}
|
|
|
|
</style>
|