generated from Nodarx/template
feat: lots more improvements
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -72,8 +72,24 @@ watch(
|
||||
return
|
||||
}
|
||||
|
||||
const nextService = createServiceObject(props.service)
|
||||
nextService.location = location ? LocationSocketSole.fromJson(location) : null
|
||||
const nextService = props.service ?? new ServiceObject()
|
||||
|
||||
if (location === null) {
|
||||
nextService.location = null
|
||||
emit('update:service', nextService)
|
||||
return
|
||||
}
|
||||
|
||||
if (nextService.location instanceof LocationSocketSole) {
|
||||
nextService.location.host = location.host
|
||||
nextService.location.port = location.port
|
||||
nextService.location.encryption = location.encryption
|
||||
nextService.location.verifyPeer = location.verifyPeer ?? true
|
||||
nextService.location.verifyHost = location.verifyHost ?? true
|
||||
} else {
|
||||
nextService.location = LocationSocketSole.fromJson(location)
|
||||
}
|
||||
|
||||
emit('update:service', nextService)
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
@@ -96,16 +112,6 @@ function syncFromLocation(location: ServiceLocation | null) {
|
||||
verifyHost.value = socketLocation?.verifyHost ?? true
|
||||
}
|
||||
|
||||
function createServiceObject(service?: ServiceObject): ServiceObject {
|
||||
const nextService = new ServiceObject()
|
||||
|
||||
if (service) {
|
||||
nextService.fromJson(service.toJson())
|
||||
}
|
||||
|
||||
return nextService
|
||||
}
|
||||
|
||||
function getSocketLocation(location?: ServiceLocation | null): ServiceLocationSocketSole | null {
|
||||
return location?.type === 'SOCKET_SOLE' ? location : null
|
||||
}
|
||||
@@ -201,13 +207,8 @@ function defaultPortFor(nextEncryption: ImapEncryption): number {
|
||||
</v-expansion-panel>
|
||||
</v-expansion-panels>
|
||||
|
||||
<v-alert type="info" variant="tonal" density="compact" class="mt-4">
|
||||
<template #prepend>
|
||||
<v-icon>mdi-information</v-icon>
|
||||
</template>
|
||||
<div class="text-caption">
|
||||
STARTTLS is accepted for compatibility, but the current IMAP client transport does not perform STARTTLS negotiation. Prefer TLS on port 993 when available.
|
||||
</div>
|
||||
<v-alert type="info" variant="tonal">
|
||||
STARTTLS is accepted for compatibility, but the current IMAP client transport does not perform STARTTLS negotiation. Prefer TLS on port 993 when available.
|
||||
</v-alert>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user