Skip to content

Commit

Permalink
fix: nav controls in production
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 13, 2021
1 parent 869b946 commit 0ec3f21
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions packages/client/internals/NavControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ if (__SLIDEV_FEATURE_DRAWINGS__)

<template>
<nav ref="root" class="flex flex-col">
<div class="flex flex-wrap-reverse text-xl p-2 gap-1" :class="barStyle" @mouseleave="onMouseLeave">
<div
class="flex flex-wrap-reverse text-xl p-2 gap-1"
:class="barStyle"
@mouseleave="onMouseLeave"
>
<button v-if="!isEmbedded" class="icon-btn" @click="toggleFullscreen">
<carbon:minimize v-if="isFullscreen" />
<carbon:maximize v-else />
Expand Down Expand Up @@ -89,23 +93,20 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
<ph:cursor-duotone v-else class="opacity-50" />
</button>
</template>

<template v-if="__SLIDEV_FEATURE_DRAWINGS__ && !isEmbedded">
<template v-if="DrawingControls">
<button
class="icon-btn relative"
title="Drawing"
@click="drawingEnabled = !drawingEnabled"
>
<carbon:pen />
<div
v-if="drawingEnabled"
class="absolute left-1 right-1 bottom-0 h-0.7 rounded-full"
:style="{ background: brush.color }"
></div>
</button>
<VerticalDivider />
</template>
<button class="icon-btn relative" title="Drawing" @click="drawingEnabled = !drawingEnabled">
<carbon:pen />
<div
v-if="drawingEnabled"
class="absolute left-1 right-1 bottom-0 h-0.7 rounded-full"
:style="{ background: brush.color }"
></div>
</button>
<VerticalDivider />
</template>

<template v-if="__DEV__ && !isEmbedded">
<RouterLink v-if="isPresenter" :to="nonPresenterLink" class="icon-btn" title="Play Mode">
<carbon:presentation-file />
</RouterLink>
Expand All @@ -117,7 +118,7 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
<carbon:text-annotation-toggle />
</button>
</template>
<template v-else>
<template v-if="!__DEV__">
<button v-if="configs.download" class="icon-btn" @click="downloadPDF">
<carbon:download />
</button>
Expand Down

0 comments on commit 0ec3f21

Please sign in to comment.