Skip to content

Commit

Permalink
- Fixed bug where show/hide menu icon tooltip was missing, causing an…
Browse files Browse the repository at this point in the history
… error in language texts and also causing the menu to be always shown on Linux.

- Aligned tooltip to the icons both when menu is hidden (toolbar mode) and when it's shown.
  • Loading branch information
PeterBlenessy committed Feb 4, 2024
1 parent cd3755e commit 5e39919
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

## v1.5.2 - 2024-02-04
- Fixed bug where show/hide menu icon tooltip was missing, causing an error in language texts and also causing the menu to be always shown on Linux.
- Aligned tooltip to the icons both when menu is hidden (toolbar mode) and when it's shown.

## v1.5.1 - 2024-02-04
- Added support for logs in production. Displayed in terminal, or stored in OS specific log folder. Linux: /home/alice/.config/com.tauri.dev; macOS: /Users/Alice/Library/Logs/com.tauri.dev; Windows: C:\Users\Alice\AppData\Roaming\com.tauri.dev

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "team-ai",
"private": true,
"version": "1.5.1",
"version": "1.5.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
24 changes: 15 additions & 9 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@
<OpenAI />

<!-- Left drawer -->
<q-drawer :model-value="true" :mini="miniDrawer" :width="250" :persistent="true" bordered :breakpoint="600" side="left"
:class="$q.dark.isActive ? 'bg-grey-10' : 'bg-grey-4'">
<q-drawer :model-value="true" :mini="miniDrawer" :width="250" :persistent="true" bordered :breakpoint="600"
side="left" :class="$q.dark.isActive ? 'bg-grey-10' : 'bg-grey-4'">
<q-list padding>
<div v-for="item in toolbar" :key="item.tooltip">
<div v-show="appMode === 'advanced' || item.appMode === appMode">

<q-item clickable v-ripple="item.tooltip != ''" @click="item.action">
<q-item-section avatar>
<q-item clickable v-ripple @click="item.action">
<q-item-section avatar>
<q-icon dense flat :name="item.icon" :color="iconColor" />
<q-tooltip :delay="750" transition-show="scale" transition-hide="scale">
{{ $t(item.tooltip) }}
</q-tooltip>
</q-item-section>
<q-item-section no-wrap>{{ $t(item.tooltip) }}</q-item-section>
<q-tooltip v-if="item.tooltip != ''" :delay="750" transition-show="scale" transition-hide="scale">
<q-item-section no-wrap
v-if="item.tooltip != 'toolbar.tooltip.showDrawer' && item.tooltip != 'toolbar.tooltip.hideDrawer'">
{{ $t(item.tooltip) }}
</q-tooltip>
</q-item-section>
</q-item>
</div>
</div>
Expand Down Expand Up @@ -127,13 +130,16 @@ export default {
const miniDrawer = ref(true);
// Watch miniDrawer changes and update the toolbar icon
watch(miniDrawer, () => { toolbar.value[0].icon = miniDrawer.value === true ? 'mdi-menu' : 'mdi-menu-open' });
watch(miniDrawer, () => {
toolbar.value[0].icon = miniDrawer.value === true ? 'mdi-menu' : 'mdi-menu-open'
toolbar.value[0].tooltip = miniDrawer.value === true ? 'toolbar.tooltip.showDrawer' : 'toolbar.tooltip.hideDrawer'
});
const toolbar = ref([
{
action: () => { miniDrawer.value = !miniDrawer.value },
icon: 'mdi-menu',
tooltip: '',
tooltip: 'toolbar.tooltip.showDrawer',
appMode: 'basic'
},
{
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ export default {

toolbar: {
tooltip: {
showDrawer: 'Show menu',
hideDrawer: 'Hide menu',
newConversation: 'New conversation',
clear: 'Clear messages',
personas: 'Show personas',
addTeam: 'Add a new team',
info: 'Info',
settings: 'Show settings',
history: 'Show conversations',
checkForUpdates: 'Check for updates...',
checkForUpdates: 'Check for updates...'
},
},
settings: {
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/hu.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ export default {

toolbar: {
tooltip: {
showDrawer: 'Menü megjelenitése',
hideDrawer: 'Menü elrejtése',
newConversation: 'Új beszélgetés',
clear: 'Üzenetek törlése',
personas: 'Személyek',
addTeam: 'Új csapat',
info: 'Információ',
settings: 'Beállítások',
history: 'Korábbi beszélgetések',
checkForUpdates: 'Frissítések ellenőrzése...',
checkForUpdates: 'Frissítések ellenőrzése...'
},
},

Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export default {

toolbar: {
tooltip: {
showDrawer: 'Visa meny',
hideDrawer: 'Dölj meny',
newConversation: 'Ny konversation',
clear: 'Rensa meddelanden',
personas: 'Visa personas',
Expand Down

0 comments on commit 5e39919

Please sign in to comment.