2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
2024-02-13 15:59:27 +00:00
|
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 05:31:52 +00:00
|
|
|
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">
|
2024-02-05 11:39:15 +00:00
|
|
|
<MkButton rounded primary :class="$style.button" @click="post()"><i class="ph-pencil-simple ph-bold ph-lg"></i>{{ i18n.ts.postToHashtag }}</MkButton>
|
2023-05-26 05:47:31 +00:00
|
|
|
</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';
|
2023-09-19 07:37:43 +00:00
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
|
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
import { $i } from '@/account.js';
|
|
|
|
import { defaultStore } from '@/store.js';
|
|
|
|
import * as os from '@/os.js';
|
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
|
|
|
|
2023-12-07 05:42:09 +00:00
|
|
|
const headerActions = computed(() => []);
|
2022-06-20 08:38:49 +00:00
|
|
|
|
2023-12-07 05:42:09 +00:00
|
|
|
const headerTabs = computed(() => []);
|
2022-06-20 08:38:49 +00:00
|
|
|
|
2024-02-16 07:17:09 +00:00
|
|
|
definePageMetadata(() => ({
|
2022-06-20 08:38:49 +00:00
|
|
|
title: props.tag,
|
2023-09-30 19:53:52 +00:00
|
|
|
icon: 'ph-hash ph-bold ph-lg',
|
2024-02-16 07:17:09 +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));
|
2024-01-17 00:32:52 +00:00
|
|
|
background: var(--acrylicBg);
|
2023-05-26 05:47:31 +00:00
|
|
|
border-top: solid 0.5px var(--divider);
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.button {
|
2024-01-17 00:32:52 +00:00
|
|
|
margin: 0 auto;
|
2023-05-26 05:47:31 +00:00
|
|
|
}
|
|
|
|
</style>
|