mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-22 14:01:42 +03:00
1 parent
e811a5b654
commit
05d25dac5a
2 files changed
+10420
-13167
No files matched your search
Generated
+10417
-13165
File diff suppressed because it is too large.
Load diff
@@ -4,10 +4,11 @@ import { getIPClass } from '../ipv4-subnet-calculator/ipv4-subnet-calculator.mod
|
|||||||
import { ipv4ToInt, ipv4ToIpv6, isValidIpv4 } from './ipv4-address-converter.service';
|
import { ipv4ToInt, ipv4ToIpv6, isValidIpv4 } from './ipv4-address-converter.service';
|
||||||
import { getIPNetworkType, to6to4Prefix, toARPA, toIPv4MappedAddressDecimal } from '@/utils/ip';
|
import { getIPNetworkType, to6to4Prefix, toARPA, toIPv4MappedAddressDecimal } from '@/utils/ip';
|
||||||
import { useValidation } from '@/composable/validation';
|
import { useValidation } from '@/composable/validation';
|
||||||
|
import { withDefaultOnError } from '@/utils/defaults';
|
||||||
|
|
||||||
const rawIpAddress = useStorage('ipv4-converter:ip', '192.168.1.1'); // NOSONAR
|
const rawIpAddress = useStorage('ipv4-converter:ip', '192.168.1.1'); // NOSONAR
|
||||||
|
|
||||||
const convertedSections = computed(() => {
|
const convertedSections = computed(() => withDefaultOnError(() => {
|
||||||
const ipInDecimal = ipv4ToInt({ ip: rawIpAddress.value });
|
const ipInDecimal = ipv4ToInt({ ip: rawIpAddress.value });
|
||||||
|
|
||||||
return [
|
return [
|
||||||
@@ -56,7 +57,7 @@ const convertedSections = computed(() => {
|
|||||||
value: getIPNetworkType(rawIpAddress.value),
|
value: getIPNetworkType(rawIpAddress.value),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
});
|
}, []));
|
||||||
|
|
||||||
const { attrs: validationAttrs } = useValidation({
|
const { attrs: validationAttrs } = useValidation({
|
||||||
source: rawIpAddress,
|
source: rawIpAddress,
|
||||||
|
|||||||
Reference in new issue
Block a user