Skip to content

Commit

Permalink
Refine toolbox wording
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed Mar 5, 2024
1 parent 97c5b75 commit 03072a2
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 21 deletions.
29 changes: 21 additions & 8 deletions frontend/src/lib/components/toolbox/toolbox-help-dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { ref } from "vue";
import DropdownMenu from "../ui/dropdown-menu.vue";
import { injectContextRequired } from "../facil-map-context-provider/facil-map-context-provider.vue";
import Icon from "../ui/icon.vue";
const context = injectContextRequired();
Expand All @@ -26,38 +27,50 @@
>
<li>
<a
class="dropdown-item"
class="dropdown-item fm-toolbox-new-window-item"
href="https://docs.facilmap.org/users/"
target="_blank"
draggable="false"
>Documentation</a>
>
<span>Documentation</span>
<Icon icon="new-window"></Icon>
</a>
</li>

<li>
<a
class="dropdown-item"
class="dropdown-item fm-toolbox-new-window-item"
href="https://matrix.to/#/#facilmap:rankenste.in"
target="_blank"
draggable="false"
>Matrix chat room</a>
>
<span>Matrix chat room</span>
<Icon icon="new-window"></Icon>
</a>
</li>

<li>
<a
class="dropdown-item"
class="dropdown-item fm-toolbox-new-window-item"
href="https://github.com/FacilMap/facilmap/issues"
target="_blank"
draggable="false"
>Report a problem</a>
>
<span>Report a problem</span>
<Icon icon="new-window"></Icon>
</a>
</li>

<li>
<a
class="dropdown-item"
class="dropdown-item fm-toolbox-new-window-item"
href="https://github.com/FacilMap/facilmap/discussions"
target="_blank"
draggable="false"
>Ask a question</a>
>
<span>Ask a question</span>
<Icon icon="new-window"></Icon>
</a>
</li>

<li>
Expand Down
31 changes: 22 additions & 9 deletions frontend/src/lib/components/toolbox/toolbox-map-style-dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { computed } from "vue";
import DropdownMenu from "../ui/dropdown-menu.vue";
import { injectContextRequired, requireMapContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
import Icon from "../ui/icon.vue";
const context = injectContextRequired();
const mapContext = requireMapContext(context);
Expand Down Expand Up @@ -47,7 +48,7 @@
<template>
<DropdownMenu
tag="li"
class="nav-item"
class="nav-item fm-toolbox-map-style-dropdown"
isLink
buttonClass="nav-link"
menuClass="dropdown-menu-end"
Expand Down Expand Up @@ -83,38 +84,50 @@

<li>
<a
class="dropdown-item"
class="dropdown-item fm-toolbox-new-window-item"
:href="links.osm"
target="_blank"
draggable="false"
>Open this on OpenStreetMap</a>
>
<span>OpenStreetMap</span>
<Icon icon="new-window"></Icon>
</a>
</li>

<li v-if="!context.hideCommercialMapLinks">
<a
class="dropdown-item"
class="dropdown-item fm-toolbox-new-window-item"
:href="links.google"
target="_blank"
draggable="false"
>Open this on Google Maps</a>
>
<span>Google Maps</span>
<Icon icon="new-window"></Icon>
</a>
</li>

<li v-if="!context.hideCommercialMapLinks">
<a
class="dropdown-item"
class="dropdown-item fm-toolbox-new-window-item"
:href="links.googleSatellite"
target="_blank"
draggable="false"
>Open this on Google Maps (Satellite)</a>
>
<span>Google Maps (Satellite)</span>
<Icon icon="new-window"></Icon>
</a>
</li>

<li v-if="!context.hideCommercialMapLinks">
<a
class="dropdown-item"
class="dropdown-item fm-toolbox-new-window-item"
:href="links.bing"
target="_blank"
draggable="false"
>Open this on Bing Maps</a>
>
<span>Bing Maps</span>
<Icon icon="new-window"></Icon>
</a>
</li>
</DropdownMenu>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
href="javascript:"
@click="dialog = 'history'; emit('hide-sidebar')"
draggable="false"
>Show edit history</a>
>History</a>
</li>
</DropdownMenu>

Expand Down
14 changes: 14 additions & 0 deletions frontend/src/lib/components/toolbox/toolbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@
}
}
.fm-toolbox-new-window-item {
display: flex;
align-items: center;
> span:nth-child(1) {
flex-grow: 1;
}
> span:nth-child(2) {
display: inline-flex;
margin-left: 0.5rem;
}
}
@media print {
display: none;
}
Expand Down
1 change: 1 addition & 0 deletions leaflet/assets/icons/glyphicons/new-window.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions leaflet/rollup-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const require = createRequire(import.meta.url);

const coreIcons = [
"arrow-left", "arrow-right", "car", "check", "circle-info", "cog", "copy", "info-sign",
"menu-hamburger", "minus", "person-biking", "person-walking", "plus", "question-sign", "qrcode",
"remove", "resize-horizontal", "resize-vertical", "screenshot", "search", "slash",
"triangle-bottom", "triangle-top", "unchecked", "zoom-in"
"menu-hamburger", "minus", "new-window", "person-biking", "person-walking", "plus",
"question-sign", "qrcode", "remove", "resize-horizontal", "resize-vertical", "screenshot",
"search", "slash", "triangle-bottom", "triangle-top", "unchecked", "zoom-in"
];

async function getIconFilenames(): Promise<Record<string, Record<string, string>>> {
Expand Down

0 comments on commit 03072a2

Please sign in to comment.