Skip to content

Commit

Permalink
Update Type Checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 5, 2024
1 parent 35d41dc commit c2154b4
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 73 deletions.
54 changes: 28 additions & 26 deletions api/web/src/components/CloudTAK/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,6 @@
<Loading v-if='loading.main || !isLoaded' />

<template v-if='isLoaded && !loading.main'>
<div
v-if='mode === "Default"'
class='position-absolute top-0 end-0 text-white py-2'
style='z-index: 1; width: 60px; background-color: rgba(0, 0, 0, 0.5);'
>
<IconMenu2
v-if='noMenuShown'
tabindex='0'
role='button'
title='Open Menu Button'
:size='40'
:stroke='1'
class='mx-2 cursor-pointer hover-button'
@click='$router.push("/menu")'
/>
<IconX
v-else
tabindex='0'
title='Close Menu Button'
:size='40'
:stroke='1'
class='mx-2 cursor-pointer bg-dark'
@click='closeAllMenu'
/>
</div>

<WarnChannels
v-if='warnChannels'
@close='warnChannels = false'
Expand Down Expand Up @@ -137,6 +111,7 @@
>
<IconCircleArrowUp
v-tooltip='"Snap to North"'
tabindex='0'
:alt='`Map Rotated to ${humanBearing}`'
:transform='`rotate(${360 - bearing})`'
:size='40'
Expand Down Expand Up @@ -373,6 +348,33 @@
</TablerDropdown>
</div>

<div
v-if='mode === "Default"'
class='position-absolute top-0 end-0 text-white py-2'
style='z-index: 1; width: 60px; background-color: rgba(0, 0, 0, 0.5);'
>
<IconMenu2
v-if='noMenuShown'
tabindex='0'
role='button'
title='Open Menu Button'
:size='40'
:stroke='1'
class='mx-2 cursor-pointer hover-button'
@click='$router.push("/menu")'
/>
<IconX
v-else
tabindex='0'
title='Close Menu Button'
:size='40'
:stroke='1'
class='mx-2 cursor-pointer bg-dark'
@click='closeAllMenu'
/>
</div>


<SideMenu
v-if='
isLoaded
Expand Down
36 changes: 32 additions & 4 deletions api/web/src/components/CloudTAK/Menu.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div
class='position-absolute end-0 bottom-0 text-white'
role='menubar'
:class='{
"bg-dark": !compact
}'
Expand Down Expand Up @@ -36,8 +37,8 @@
style='height: calc(100% - 106px)'
>
<div
role='button'
class='cursor-pointer col-12 d-flex align-items-center'
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center justify-content-center'
:class='{
"py-2 px-3 hover-dark": !compact,
"py-1 px-2 hover-button": compact
Expand All @@ -49,9 +50,9 @@
content: "Display Settings",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Settings Panel'
:class='{ "mx-2": compact }'
:size='compact ? 40 : 32'
:size='32'
:stroke='1'
/>
<span
Expand All @@ -61,6 +62,7 @@
>Settings</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -73,6 +75,7 @@
content: "Overlays",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Overlays Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -85,6 +88,7 @@
>Overlays</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -97,6 +101,7 @@
content: "Contacts",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Contacts Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -109,6 +114,7 @@
>Contacts</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -121,6 +127,7 @@
content: "Basemaps",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Basemaps Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -133,6 +140,7 @@
>BaseMaps</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -145,6 +153,7 @@
content: "Data Sync",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Data Syncs Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -157,6 +166,7 @@
>Data Sync</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -169,6 +179,7 @@
content: "Data Packages",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Data Packages Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -181,6 +192,7 @@
>Data Package</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -193,6 +205,7 @@
content: "Channels",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Channels Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -205,6 +218,7 @@
>Channels</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -217,6 +231,7 @@
content: "Videos",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Videos Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -229,6 +244,7 @@
>Videos</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -241,6 +257,7 @@
content: "Chats",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Chats Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -253,6 +270,7 @@
>Chats</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -265,6 +283,7 @@
content: "Your Files",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Files Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -277,6 +296,7 @@
>Uploaded Files</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -289,6 +309,7 @@
content: "Imports",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Imports Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -301,6 +322,7 @@
>Imports</span>
</div>
<div
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -313,6 +335,7 @@
content: "Iconsets",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Iconsets Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -327,6 +350,7 @@

<div
v-if='profile.system_admin || profile.agency_admin.length'
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -339,6 +363,7 @@
content: "Connections",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Connections Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand All @@ -358,6 +383,7 @@
</div>
<div
v-if='profile.system_admin'
role='menuitem'
class='cursor-pointer col-12 d-flex align-items-center'
:class='{
"py-2 px-3 hover-dark": !compact,
Expand All @@ -370,6 +396,7 @@
content: "Server Settings",
placement: "left",
}'
:tabindex='compact ? 0 : undefined'
title='Open Server Admin Panel'
:class='{ "mx-2": compact }'
:size='32'
Expand Down Expand Up @@ -426,6 +453,7 @@
>
<IconLogout
v-tooltip='"Logout"'
tabindex='0'
title='Logout'
:size='32'
:stroke='1'
Expand Down
Loading

0 comments on commit c2154b4

Please sign in to comment.