Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | 4x 4x 4x 44x 215x 1x 65x 65x 65x 65x 65x 80x 65x 80x 1x 1x | <template>
<v-app-bar
class="px-2"
color="background"
flat
density="comfortable"
>
<div class="title-box">
<v-icon
class="shark-400"
size="large"
icon="folder"
/>
<div class="file-name text-base-medium">
{{ options.fileName }}
</div>
<div class="title-box">
<v-hover v-slot="{ props, isHovering }">
<v-icon
v-bind="props"
class="save-icon shark-400"
:class="[state]"
:icon="icon"
size="small"
/>
<v-slide-x-transition>
<div
class="save-text text-sm-regular"
:class="[state]"
v-if="isHovering || showText"
>{{ text }}</div
>
</v-slide-x-transition>
</v-hover>
</div>
</div>
<v-spacer />
<v-btn
v-if="showUpgrade"
color="green-darken-1"
prepend-icon="diamond"
variant="tonal"
@click="upgrade"
>
<span>{{ t('labels.upgrade') }}</span>
</v-btn>
<!-- /* v8 ignore start -- @Preserve */ -->
<v-tooltip
location="bottom"
open-delay="1000"
>
<template #activator="{ props }">
<v-btn
v-bind="props"
v-if="showNotificationDropdown"
color="subtext"
data-testid="notifications"
icon="notifications"
size="40"
variant="text"
@click="options.onNotificationDropdown!(0, 0)"
/>
</template>
<span>{{ t('labels.notifications') }}</span>
</v-tooltip>
<!-- /* v8 ignore stop -- @Preserve */ -->
<settings-menu />
<avatar-dropdown-menu @close="emit('close')" />
</v-app-bar>
</template>
<script setup lang="ts">
import { storeToRefs } from 'pinia';
import { useViewerStore } from '@/stores/viewer.store';
import { computed } from 'vue';
import { useSaveStore } from '@/stores/save.store';
import { useI18n } from 'vue-i18n';
type Emits = {
close: [void];
};
const emit = defineEmits<Emits>();
const { t } = useI18n();
const { options } = storeToRefs(useViewerStore());
const { text, icon, showText, state } = storeToRefs(useSaveStore());
const showNotificationDropdown = computed(() => {
return !!options.value.onNotificationDropdown;
});
const showUpgrade = computed(() => {
return !!options.value.onUpgrade;
});
async function upgrade(): Promise<void> {
Eif (options.value.onUpgrade) {
await options.value.onUpgrade();
}
}
</script>
<style lang="scss">
.title-box {
display: flex;
align-items: center;
gap: 8px;
}
.file-name {
display: -webkit-box;
max-width: 352px;
-webkit-box-orient: vertical;
line-clamp: 1;
-webkit-line-clamp: 1;
overflow: hidden;
color: #5e5e6b;
text-overflow: ellipsis;
}
.save-icon {
transition: transform 1s;
&.UNSAVED {
color: rgb(var(--v-theme-lightning_600)) !important;
}
&.ERROR {
color: rgb(var(--v-theme-amaranth_600)) !important;
}
&.SAVING {
animation: activate 1s infinite ease-in-out;
}
}
.save-text {
color: #5e5e6b;
&.UNSAVED {
color: rgb(var(--v-theme-lightning_700)) !important;
}
&.ERROR {
color: rgb(var(--v-theme-amaranth_900)) !important;
}
}
@keyframes activate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(180deg);
}
}
</style>
|