Skip to content

Commit

Permalink
Merge pull request #558 from nature-heart-software/dev
Browse files Browse the repository at this point in the history
Add a few quality-of-life improvements
  • Loading branch information
Wurielle authored Jan 29, 2023
2 parents afbedbd + 13874c2 commit 0682868
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha')}}

deploy:
needs: [ release ]
needs: [release]
strategy:
matrix:
os: [ windows-latest ]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Build
uses: borales/actions-yarn@v4
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: '--max_old_space_size=4096'
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
VUE_APP_ENCRYPTION_KEY: ${{ secrets.APP_ENCRYPTION_KEY }}
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@
import { NvSelect } from '@packages/ui'
import { computed } from 'vue'
import { useSpeechEngineManager } from '@/modules/speech-engine-manager'
import { orderBy } from 'lodash'
const { engines } = useSpeechEngineManager()
const options = computed(() =>
engines.value.map((engine) => {
const disabled = engine.hasCredentials ? !engine.hasCredentials() : false
return {
disabled,
label: engine.name,
value: engine.id,
attrs: {
title: disabled ? 'Requires credentials' : '',
},
}
}),
orderBy(
engines.value.map((engine) => {
const disabled = engine.hasCredentials ? !engine.hasCredentials() : false
return {
disabled,
label: engine.name,
value: engine.id,
attrs: {
title: disabled ? 'Requires credentials' : '',
},
}
}),
['disabled', 'label'],
['asc', 'asc'],
),
)
</script>
10 changes: 7 additions & 3 deletions apps/app/src/plugins/speech-engines/izabela/NvVoiceSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ const { data, isFetching } = useListVoicesQuery(computedParams, {
enabled: canFetch,
})
const voices = computed(() => data.value || [])
const options = computed(() =>
voices.value.map((voice: any) => ({
const options = computed(() => [
{
label: 'Default',
value: null,
},
...voices.value.map((voice: any) => ({
label: getVoiceName(voice),
value: voice,
})),
)
])
watch(
() => canFetch.value,
() => canFetch.value && queryClient.refetchQueries(LIST_VOICES_QUERY_KEY),
Expand Down
8 changes: 4 additions & 4 deletions apps/app/src/teams/messenger/components/NvHistoryMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
]"
>
<NvButton class="shrink-0" icon-name="ellipsis-v" size="sm" />
<NvButton class="shrink-0" icon-name="ellipsis-v" size="sm"/>
</NvContextMenu>
</NvGroup>
<div v-if="isPlaying" class="h-2 relative bg-gray-10">
Expand Down Expand Up @@ -113,14 +113,14 @@ const downloadMessageLocally = async () => {
})
IzabelaMessage(completeMessage)
.downloadAudio()
.then(({ data }) => {
.then((data) => {
const reader = new FileReader()
reader.onload = () => {
ElectronFilesystem.downloadMessagePrompt(
completeMessage,
`${formatedCreatedAt.value} - ${engine.value?.name} - ${engine.value?.getVoiceName(
`${ formatedCreatedAt.value } - ${ engine.value?.name } - ${ engine.value?.getVoiceName(
message.value?.voice,
)} - ${message.value?.message}`.replace(/([^a-z0-9\s-]+)/gi, '_'),
) } - ${ message.value?.message }`.replace(/([^a-z0-9\s-]+)/gi, '_'),
reader.result as string,
).finally(() => {
downloading.value = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@
</NvStack>
</div>
<template #reference>
<NvButton icon-name="direction" size="sm">Outputs</NvButton>
<NvButton icon-name="direction" size="sm"
>Outputs ({{
settingsStore.audioOutputs.length +
(settingsStore.playSpeechOnDefaultPlaybackDevice ? 1 : 0)
}})
</NvButton>
</template>
</NvPopover>
<NvPopover :tippy-options="{ placement: 'top-start' }" size="sm">
Expand Down

0 comments on commit 0682868

Please sign in to comment.