FreeDATA/gui_vue/src/components/settings_chat.vue

107 lines
3.5 KiB
Vue
Raw Normal View History

2023-09-06 10:23:20 +00:00
<script setup lang="ts">
2023-09-06 19:03:23 +00:00
import {saveSettingsToFile} from '../js/settingsHandler'
2023-09-06 10:23:20 +00:00
import { setActivePinia } from 'pinia';
import pinia from '../store/index';
setActivePinia(pinia);
import { useSettingsStore } from '../store/settingsStore.js';
const settings = useSettingsStore(pinia);
2023-09-06 19:03:23 +00:00
function saveSettings(){
saveSettingsToFile()
}
2023-09-06 10:23:20 +00:00
</script>
<template>
<div class="input-group input-group-sm mb-1">
<label class="input-group-text w-50">Enable "is typing"</label>
<label class="input-group-text w-50">
<div class="form-check form-switch form-check-inline">
<input
class="form-check-input"
type="checkbox"
id="enable_is_writing"
2023-09-06 12:48:45 +00:00
@change="saveSettings" v-model="settings.enable_is_writing" true-value="True" false-value="False"
2023-09-06 10:23:20 +00:00
/>
<label class="form-check-label" for="GraphicsSwitch"
>Additional broadcast burst</label
>
</div>
</label>
</div>
<div class="input-group input-group-sm mb-1">
<label class="input-group-text w-50"
>Allow requesting "user profile"</label
>
<label class="input-group-text w-50">
<div class="form-check form-switch form-check-inline">
<input
class="form-check-input"
type="checkbox"
id="enable_request_profile"
2023-09-06 12:48:45 +00:00
@change="saveSettings" v-model="settings.enable_request_profile" true-value="True" false-value="False"
2023-09-06 10:23:20 +00:00
/>
</div>
</label>
</div>
<div class="input-group input-group-sm mb-1">
<label class="input-group-text w-50"
>Allow requesting "shared folder"</label
>
<label class="input-group-text w-50">
<div class="form-check form-switch form-check-inline">
<input
class="form-check-input"
type="checkbox"
id="enable_request_shared_folder"
2023-09-06 12:48:45 +00:00
@change="saveSettings" v-model="settings.enable_request_shared_folder" true-value="True" false-value="False"
2023-09-06 10:23:20 +00:00
/>
</div>
</label>
</div>
<div class="input-group input-group-sm mb-1">
<label class="input-group-text w-50">Shared folder path</label>
2023-09-06 19:03:23 +00:00
<input type="text" class="form-control w-50" id="shared_folder_path" @change="saveSettings"
v-model="settings.shared_folder_path" />
2023-09-06 10:23:20 +00:00
</div>
<div class="input-group input-group-sm mb-1">
<label class="input-group-text w-50"
>Enable auto retry on Beacon or Ping
</label>
<label class="input-group-text w-50">
<div class="form-check form-switch form-check-inline">
<input
class="form-check-input"
type="checkbox"
id="enable_auto_retry"
2023-09-06 12:48:45 +00:00
@change="saveSettings" v-model="settings.enable_auto_retry" true-value="True" false-value="False"
2023-09-06 10:23:20 +00:00
/>
</div>
</label>
</div>
<div class="input-group input-group-sm mb-1">
<span class="input-group-text w-50">message retry attempts</span>
2023-09-06 19:03:23 +00:00
<select class="form-select form-select-sm w-50" id="max_retry_attempts" @change="saveSettings"
v-model="settings.max_retry_attempts">
2023-09-06 10:23:20 +00:00
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</div>
</template>