88 'navbar relative shadow-[0_4px_4px_0_rgba(0,0,0,0.15)] border-b',
99 'z-[1001] h-[60px] overflow-hidden shrink-0 flex flex-row justify-between select-none',
1010 'bg-neutral-800 border-neutral-600 text-white',
11- windowWidth > 740 && 'gap-sm',
11+ gapInNav && 'gap-sm',
1212 )
1313 "
1414 >
@@ -170,7 +170,7 @@ import {
170170 startMouseEmitters ,
171171 startKeyEmitter ,
172172 startWindowResizeEmitter ,
173- windowResizeEmitter ,
173+ windowWidthReactive
174174} from " ./logic_composables/emitters" ;
175175import { getUserPkFromToken , tokensByWorkspacePk } from " ./logic_composables/tokens" ;
176176import ComponentPage from " ./ComponentDetails.vue" ;
@@ -426,6 +426,8 @@ startKeyEmitter(document);
426426startMouseEmitters (window );
427427startWindowResizeEmitter (window );
428428
429+ const gapInNav = computed (() => windowWidthReactive .value > 800 );
430+
429431provide (" CONTEXT" , ctx .value );
430432
431433// LOBBY AND ONBOARDING FLAGS
@@ -891,12 +893,6 @@ const connectionShouldBeEnabled = computed(() => {
891893 }
892894});
893895
894- const windowWidth = ref (window .innerWidth );
895-
896- const windowResizeHandler = () => {
897- windowWidth .value = window .innerWidth ;
898- };
899-
900896const openChangesetModal = () => {
901897 navbarPanelLeftRef .value ?.openCreateModal ();
902898};
@@ -921,11 +917,6 @@ const invalidatePaginatedFuncRuns = _.debounce(() => {
921917 queryClient .invalidateQueries ({ queryKey });
922918}, 250 );
923919
924- onMounted (() => {
925- windowResizeHandler ();
926- windowResizeEmitter .on (" resize" , windowResizeHandler );
927- });
928-
929920const invalidateOneFuncRun = _ .debounce ((funcRunId : string ) => {
930921 const queryKey = [ctx .value .changeSetId , " funcRunLogs" , funcRunId ];
931922 if (queryClient .isFetching ({ queryKey }) > 0 ) {
@@ -985,11 +976,6 @@ watch(
985976 },
986977 { immediate: true },
987978);
988-
989- onBeforeUnmount (() => {
990- windowResizeEmitter .off (" resize" , windowResizeHandler );
991- realtimeStore .unsubscribe (funcRunKey );
992- });
993979 </script >
994980
995981<style lang="less">
0 commit comments