@@ -26,53 +26,53 @@ const sections = computed<{
2626 getValue: (blocks : Netmask ) => string | undefined
2727 undefinedFallback? : string
2828}[]>(() => [
29- {
30- label: t (' tools.ipv4-subnet-calculator.netmask' ),
31- getValue : block => block .toString (),
32- },
33- {
34- label: t (' tools.ipv4-subnet-calculator.networkAddress' ),
35- getValue : ({ base }) => base ,
36- },
37- {
38- label: t (' tools.ipv4-subnet-calculator.networkMask' ),
39- getValue : ({ mask }) => mask ,
40- },
41- {
42- label: t (' tools.ipv4-subnet-calculator.networkMaskInBinary' ),
43- getValue : ({ bitmask }) => (' 1' .repeat (bitmask ) + ' 0' .repeat (32 - bitmask )).match (/ . {8} / g )?.join (' .' ) ?? ' ' ,
44- },
45- {
46- label: t (' tools.ipv4-subnet-calculator.cidrNotation' ),
47- getValue : ({ bitmask }) => ` /${bitmask } ` ,
48- },
49- {
50- label: t (' tools.ipv4-subnet-calculator.wildcardMask' ),
51- getValue : ({ hostmask }) => hostmask ,
52- },
53- {
54- label: t (' tools.ipv4-subnet-calculator.networkSize' ),
55- getValue : ({ size }) => String (size ),
56- },
57- {
58- label: t (' tools.ipv4-subnet-calculator.firstAddress' ),
59- getValue : ({ first }) => first ,
60- },
61- {
62- label: t (' tools.ipv4-subnet-calculator.lastAddress' ),
63- getValue : ({ last }) => last ,
64- },
65- {
66- label: t (' tools.ipv4-subnet-calculator.broadcastAddress' ),
67- getValue : ({ broadcast }) => broadcast ,
68- undefinedFallback: t (' tools.ipv4-subnet-calculator.noBroadcastAddress' ),
69- },
70- {
71- label: t (' tools.ipv4-subnet-calculator.ipClass' ),
72- getValue : ({ base : ip }) => getIPClass ({ ip }),
73- undefinedFallback: t (' tools.ipv4-subnet-calculator.unknownClassType' ),
74- },
75- ]);
29+ {
30+ label: t (' tools.ipv4-subnet-calculator.netmask' ),
31+ getValue : block => block .toString (),
32+ },
33+ {
34+ label: t (' tools.ipv4-subnet-calculator.networkAddress' ),
35+ getValue : ({ base }) => base ,
36+ },
37+ {
38+ label: t (' tools.ipv4-subnet-calculator.networkMask' ),
39+ getValue : ({ mask }) => mask ,
40+ },
41+ {
42+ label: t (' tools.ipv4-subnet-calculator.networkMaskInBinary' ),
43+ getValue : ({ bitmask }) => (' 1' .repeat (bitmask ) + ' 0' .repeat (32 - bitmask )).match (/ . {8} / g )?.join (' .' ) ?? ' ' ,
44+ },
45+ {
46+ label: t (' tools.ipv4-subnet-calculator.cidrNotation' ),
47+ getValue : ({ bitmask }) => ` /${bitmask } ` ,
48+ },
49+ {
50+ label: t (' tools.ipv4-subnet-calculator.wildcardMask' ),
51+ getValue : ({ hostmask }) => hostmask ,
52+ },
53+ {
54+ label: t (' tools.ipv4-subnet-calculator.networkSize' ),
55+ getValue : ({ size }) => String (size ),
56+ },
57+ {
58+ label: t (' tools.ipv4-subnet-calculator.firstAddress' ),
59+ getValue : ({ first }) => first ,
60+ },
61+ {
62+ label: t (' tools.ipv4-subnet-calculator.lastAddress' ),
63+ getValue : ({ last }) => last ,
64+ },
65+ {
66+ label: t (' tools.ipv4-subnet-calculator.broadcastAddress' ),
67+ getValue : ({ broadcast }) => broadcast ,
68+ undefinedFallback: t (' tools.ipv4-subnet-calculator.noBroadcastAddress' ),
69+ },
70+ {
71+ label: t (' tools.ipv4-subnet-calculator.ipClass' ),
72+ getValue : ({ base : ip }) => getIPClass ({ ip }),
73+ undefinedFallback: t (' tools.ipv4-subnet-calculator.unknownClassType' ),
74+ },
75+ ]);
7676
7777function switchToBlock({ count = 1 }: { count? : number }) {
7878 const next = networkInfo .value ?.next (count );
0 commit comments