Skip to content

Commit

Permalink
Disable css changes to site if option not selected
Browse files Browse the repository at this point in the history
  • Loading branch information
Excellify committed Oct 2, 2024
1 parent b741d90 commit c4972dd
Showing 1 changed file with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function toggle(hovering: boolean) {
const sidebarEl = ref<Element>();
const isHovering = useElementHover(sidebarEl);
watch(isHovering, toggle);
watch(isHovering, toggle, { immediate: true });
watch(
() => sidebar.instances.at(0)?.domNodes["root"],
Expand All @@ -76,23 +76,26 @@ export const config = [
path: ["Appearance", "Interface"],
label: "Sidebar Expand on Hover",
hint: "Expand the sidebar when hovering over it.",
effect: (v) => document.body.classList.toggle("seventv-sidebar-hover", v),
defaultValue: false,
}),
];
</script>
<style lang="scss">
/* stylelint-disable */
.side-nav-card__link__tooltip-arrow {
display: none !important;
}
/* stylelint-enable */
.side-nav {
position: absolute;
z-index: 3;
}
.twilight-main {
margin-left: 5rem;
.seventv-sidebar-hover {
/* stylelint-disable */
.side-nav-card__link__tooltip-arrow {
display: none !important;
}
/* stylelint-enable */
.side-nav {
position: absolute;
z-index: 3;
}
.twilight-main {
margin-left: 5rem;
}
}
</style>

0 comments on commit c4972dd

Please sign in to comment.