Add profile 3D preferences and adapt DICOM preview resolution to memory budget
This commit is contained in:
1 parent
705762d57c
commit
7fd7ae6733
22 files changed
+500
-68
No files matched your search
@@ -46,7 +46,45 @@
|
||||
><input type="checkbox" v-model="redirectAfterCopyMove"
|
||||
/></label>
|
||||
</section>
|
||||
<section class="card settings-section settings-wide">
|
||||
<section class="card settings-section">
|
||||
<h2><AppIcon name="tune" />{{ t("preferences.dicom3D") }}</h2>
|
||||
<label class="settings-field"
|
||||
>{{ t("preferences.dicomQuality") }}
|
||||
<select v-model="dicom3D.quality" class="input">
|
||||
<option value="auto">{{ t("preferences.dicomAuto") }}</option>
|
||||
<option value="original">
|
||||
{{ t("preferences.dicomOriginal") }}
|
||||
</option>
|
||||
<option value="half">{{ t("preferences.dicomHalf") }}</option>
|
||||
<option value="quarter">{{ t("preferences.dicomQuarter") }}</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="settings-field"
|
||||
>{{ t("preferences.dicomMemory") }}
|
||||
<select v-model.number="dicom3D.memoryMiB" class="input">
|
||||
<option
|
||||
v-for="memory in [128, 256, 512, 1024, 1536]"
|
||||
:key="memory"
|
||||
:value="memory"
|
||||
>
|
||||
{{ memory }} MiB
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="settings-field"
|
||||
>{{ t("preferences.dicomOpacity") }} ({{ dicom3D.opacity }}%)
|
||||
<input
|
||||
v-model.number="dicom3D.opacity"
|
||||
class="input"
|
||||
type="range"
|
||||
min="5"
|
||||
max="100"
|
||||
step="5"
|
||||
/>
|
||||
</label>
|
||||
<p class="settings-hint">{{ t("preferences.dicomHint") }}</p>
|
||||
</section>
|
||||
<section class="card settings-section">
|
||||
<h2><AppIcon name="language" />{{ t("preferences.regional") }}</h2>
|
||||
<label class="settings-field"
|
||||
>{{ t("settings.language")
|
||||
@@ -73,6 +111,7 @@ import Languages from "@/components/settings/Languages.vue";
|
||||
import AccountAvatar from "@/components/AccountAvatar.vue";
|
||||
import { baseURL } from "@/utils/constants";
|
||||
import { getTheme, setTheme } from "@/utils/theme";
|
||||
import { dicomPreferences } from "@/utils/dicom-quality";
|
||||
import { inject, onMounted, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
@@ -91,6 +130,7 @@ const dateFormat = ref<boolean>(false);
|
||||
const locale = ref<string>("");
|
||||
const selectedTheme = ref<UserTheme>(getTheme());
|
||||
const saving = ref(false);
|
||||
const dicom3D = ref(dicomPreferences());
|
||||
|
||||
onMounted(async () => {
|
||||
layoutStore.loading = true;
|
||||
@@ -104,6 +144,7 @@ onMounted(async () => {
|
||||
singleClick.value = authStore.user.singleClick;
|
||||
redirectAfterCopyMove.value = authStore.user.redirectAfterCopyMove;
|
||||
dateFormat.value = authStore.user.dateFormat;
|
||||
dicom3D.value = dicomPreferences(authStore.user.dicom3D);
|
||||
layoutStore.loading = false;
|
||||
|
||||
return true;
|
||||
@@ -126,6 +167,7 @@ const updateSettings = async (event: Event) => {
|
||||
singleClick: singleClick.value,
|
||||
redirectAfterCopyMove: redirectAfterCopyMove.value,
|
||||
dateFormat: dateFormat.value,
|
||||
dicom3D: { ...dicom3D.value },
|
||||
};
|
||||
|
||||
await api.update(data, [
|
||||
@@ -135,6 +177,7 @@ const updateSettings = async (event: Event) => {
|
||||
"singleClick",
|
||||
"redirectAfterCopyMove",
|
||||
"dateFormat",
|
||||
"dicom3D",
|
||||
]);
|
||||
authStore.updateUser(data);
|
||||
$showSuccess(t("settings.settingsUpdated"));
|
||||
|
||||
Reference in new issue
Block a user