Skip to content

Commit

Permalink
Make language switcher more visible, fix #90
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Apr 2, 2024
1 parent b455ab7 commit 56dcea6
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ As this project is a user-facing application, the places in the semantic version

- Use the new Språkbanken Text logo
- Unallowed file format sometimes saved to local config [#153](https://github.com/spraakbanken/mink-frontend/issues/153)
- Make language switcher more visible [#90](https://github.com/spraakbanken/mink-frontend/issues/90)
- Show hint if parsing config fails

## [1.4.0] (2024-03-11)
Expand Down
6 changes: 6 additions & 0 deletions src/assets/dropdown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/fontawesome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
faCircleInfo,
faDownload,
faGears,
faLanguage,
faPen,
faPersonRunning,
faRightToBracket,
Expand All @@ -27,6 +28,7 @@ library.add(
faDownload,
faFile,
faGears,
faLanguage,
faLightbulb,
faPen,
faPersonRunning,
Expand Down
29 changes: 21 additions & 8 deletions src/i18n/LocaleSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,26 @@ import { languageNames, type LocaleId } from "./i18n";
</script>

<template>
<select v-model="$i18n.locale" class="bg-transparent border-0">
<option
v-for="locale in $i18n.availableLocales"
:key="locale"
:value="locale"
<div>
<icon icon="language" />
<select
v-model="$i18n.locale"
class="bg-transparent border-0 appearance-none"
>
{{ languageNames[locale as LocaleId] }}
</option>
</select>
<option
v-for="locale in $i18n.availableLocales"
:key="locale"
:value="locale"
>
{{ languageNames[locale as LocaleId] }}
</option>
</select>
</div>
</template>

<style scoped>
select.appearance-none {
padding-right: 1.4em;
background: url(@/assets/dropdown.svg) no-repeat 95% 50%;
}
</style>

0 comments on commit 56dcea6

Please sign in to comment.