toggle streaming
This commit is contained in:
parent
02d934758b
commit
8c1d15aaae
2 changed files with 9 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
|||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useUsersStore } from 'src/stores/users.js'
|
||||
import { useStreamingStore } from 'src/stores/streaming.js'
|
||||
|
||||
import { updateProfile } from 'src/api/user.js'
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
|
@ -70,6 +71,13 @@ const GeneralTab = {
|
|||
updateFont(path, value) {
|
||||
useLocalConfigStore().set({ path, value })
|
||||
},
|
||||
toggleStreaming(value) {
|
||||
if (value) {
|
||||
useStreamingStore().initSocket()
|
||||
} else {
|
||||
useStreamingStore().stopSocket()
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@
|
|||
path="useStreamingApi"
|
||||
:local="true"
|
||||
expert="1"
|
||||
@update:model-value="toggleStreaming"
|
||||
>
|
||||
{{ $t('settings.useStreamingApi') }}
|
||||
</BooleanSetting>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue