Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
fix: small updates for keeper and menu on site
Browse files Browse the repository at this point in the history
  • Loading branch information
villetakanen committed Dec 8, 2021
1 parent fc10832 commit 2949686
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
19 changes: 15 additions & 4 deletions src/components/page/PageToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
{{ title }}
</ViewTitle>
<SpacerDiv />
<Button
v-if="site.usePlayers"
class="hideOnMobile"
text
@click="reroute('/site/' + site.id + '/keeper')"
>
<Icon
name="keeper"
small
/>
<span class="onlyForDesktop">{{ $t('keeper.title') }}</span>
</Button>
<ShareButton />
<MaterialMenu v-model="menu" />
<Dialog v-model="toggleDelete">
Expand Down Expand Up @@ -57,10 +69,10 @@ import ViewTitle from '../layout/ViewTitle.vue'
import SpacerDiv from '../layout/SpacerDiv.vue'
import ShareButton from '../actions/ShareButton.vue'
import { useAuth } from '@/state/authz'
import { useMeta } from '@/state/meta'
import Icon from '../material/Icon.vue'
export default defineComponent({
components: { MaterialMenu, Dialog, Textfield, Button, Header, ViewTitle, SpacerDiv, ShareButton },
components: { MaterialMenu, Dialog, Textfield, Button, Header, ViewTitle, SpacerDiv, ShareButton, Icon },
props: {
title: {
type: String,
Expand All @@ -74,7 +86,6 @@ export default defineComponent({
const i18n = useI18n()
const { reroute } = useUxActions()
const { user } = useAuth()
const { admins } = useMeta()
const toggleDelete = ref(false)
const deleteConfirm = ref('')
Expand Down Expand Up @@ -124,7 +135,7 @@ export default defineComponent({
return menuItems
})
return { site, copyLink, menu, toggleDelete, deleteConfirm, deletePageFromFirestore }
return { site, copyLink, menu, toggleDelete, deleteConfirm, deletePageFromFirestore, reroute }
}
})
</script>
Expand Down
21 changes: 19 additions & 2 deletions src/components/site/header/SiteToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@

<SpacerDiv />

<Button
v-if="site.usePlayers"
class="hideOnMobile"
text
@click="reroute('/site/' + site.id + '/keeper')"
>
<Icon
name="keeper"
small
/>
<span class="onlyForDesktop">{{ $t('keeper.title') }}</span>
</Button>

<ShareButton />
<SiteHeaderMenu />
</Header>
Expand All @@ -25,12 +38,16 @@ import ViewTitle from '../../layout/ViewTitle.vue'
import ShareButton from '../../actions/ShareButton.vue'
import { useSite } from '@/state/site'
import SiteHeaderMenu from './SiteHeaderMenu.vue'
import Button from '@/components/form/Button.vue'
import Icon from '@/components/material/Icon.vue'
import { useUxActions } from '@/composables/useUxActions'
export default defineComponent({
components: { Header, SpacerDiv, ViewTitle, ShareButton, SiteHeaderMenu },
components: { Header, SpacerDiv, ViewTitle, ShareButton, SiteHeaderMenu, Button, Icon },
setup () {
const { site } = useSite()
return { site }
const { reroute } = useUxActions()
return { site, reroute }
}
})
</script>

0 comments on commit 2949686

Please sign in to comment.