#1589 : add quick button in home page to publish
This commit is contained in:
41
src/components/Home/QuickPublish.vue
Normal file
41
src/components/Home/QuickPublish.vue
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<template>
|
||||||
|
<div class="quick-publish">
|
||||||
|
<o-button @click="$router.push({ name: ActorRouteName.MY_GROUPS })">
|
||||||
|
{{ t("Publish from a group") }}
|
||||||
|
</o-button>
|
||||||
|
<o-dropdown :teleport="teleport" position="bottom-right">
|
||||||
|
<template #trigger="{ active }">
|
||||||
|
<o-button
|
||||||
|
:title="t('Choose publishing')"
|
||||||
|
:icon-right="active ? 'menu-up' : 'menu-down'"
|
||||||
|
>
|
||||||
|
</o-button>
|
||||||
|
</template>
|
||||||
|
<o-dropdown-item
|
||||||
|
:label="t('Publish from a group')"
|
||||||
|
@click="$router.push({ name: ActorRouteName.MY_GROUPS })"
|
||||||
|
/>
|
||||||
|
<o-dropdown-item
|
||||||
|
:label="t('Publish as individual')"
|
||||||
|
@click="$router.push({ name: EventRouteName.CREATE_EVENT })"
|
||||||
|
/>
|
||||||
|
</o-dropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { ActorRouteName } from "@/router/actor";
|
||||||
|
import { EventRouteName } from "@/router/event";
|
||||||
|
const { t } = useI18n({ useScope: "global" });
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.quick-publish {
|
||||||
|
display: flex;
|
||||||
|
position: fixed;
|
||||||
|
right: 5%;
|
||||||
|
}
|
||||||
|
.quick-publish > div.o-drop {
|
||||||
|
left: -5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <o-loading v-model:active="$apollo.loading" /> -->
|
<!-- <o-loading v-model:active="$apollo.loading" /> -->
|
||||||
|
|
||||||
|
<!-- Quick publish -->
|
||||||
|
<quick-publish></quick-publish>
|
||||||
|
|
||||||
<!-- Nice looking SVGs -->
|
<!-- Nice looking SVGs -->
|
||||||
<section class="mt-5 sm:mt-24">
|
<section class="mt-5 sm:mt-24">
|
||||||
<div class="-z-10 overflow-hidden">
|
<div class="-z-10 overflow-hidden">
|
||||||
@@ -25,6 +29,7 @@
|
|||||||
</section>
|
</section>
|
||||||
<!-- Unlogged introduction -->
|
<!-- Unlogged introduction -->
|
||||||
<unlogged-introduction :config="config" v-if="config && !isLoggedIn" />
|
<unlogged-introduction :config="config" v-if="config && !isLoggedIn" />
|
||||||
|
|
||||||
<!-- Search fields -->
|
<!-- Search fields -->
|
||||||
<search-fields
|
<search-fields
|
||||||
v-model:search="search"
|
v-model:search="search"
|
||||||
@@ -191,6 +196,7 @@ import {
|
|||||||
storeAddressInLocal,
|
storeAddressInLocal,
|
||||||
} from "@/utils/location";
|
} from "@/utils/location";
|
||||||
import { useServerProvidedLocation } from "@/composition/apollo/config";
|
import { useServerProvidedLocation } from "@/composition/apollo/config";
|
||||||
|
import QuickPublish from "@/components/Home/QuickPublish.vue";
|
||||||
import { ABOUT } from "@/graphql/config";
|
import { ABOUT } from "@/graphql/config";
|
||||||
import { IConfig } from "@/types/config.model";
|
import { IConfig } from "@/types/config.model";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
|||||||
Reference in New Issue
Block a user