fix(frontend): hide downloads and views for now while they are broken, rewrite the whole system later

This commit is contained in:
MiniDigger | Martin 2022-12-22 12:57:23 +01:00
parent c89f388339
commit 00d48c562f

View File

@ -0,0 +1,51 @@
<template>
<span class="coming-soon" title="Coming soon">
<render />
</span>
</template>
<script lang="ts" setup>
import { VNode, computed, useSlots } from "vue";
const props = defineProps<{
short?: boolean;
}>();
const slot = useSlots();
const content = computed(() => {
const slotContent = slot?.default?.();
if (!slotContent) return;
for (const vnode of slotContent) {
replace(vnode);
}
return slotContent;
});
function replace(vnode: VNode) {
if (vnode.type.toString() === "Symbol(Text)") {
vnode.children = props.short ? "[R]" : "[REDACTED]";
}
}
const render = () => {
return content.value;
};
</script>
<style lang="scss">
.coming-soon {
--blur-color: #6695f2;
color: transparent;
display: inherit;
text-shadow: 0 0 12px var(--blur-color);
svg {
color: var(--blur-color);
filter: blur(4px);
}
}
.text-right .coming-soon {
float: right;
}
</style>