From ae4baa358b24ae830a9175773ff743a99fe6fc96 Mon Sep 17 00:00:00 2001 From: ShareVB Date: Sun, 15 Dec 2024 13:47:01 +0100 Subject: [PATCH] fix: better description and use of units --- src/tools/hdd-calculator/hdd-calculator.vue | 17 ++++++++++++----- src/tools/hdd-calculator/index.ts | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/tools/hdd-calculator/hdd-calculator.vue b/src/tools/hdd-calculator/hdd-calculator.vue index 4c293641..b5fcba2f 100644 --- a/src/tools/hdd-calculator/hdd-calculator.vue +++ b/src/tools/hdd-calculator/hdd-calculator.vue @@ -3,13 +3,20 @@ import InputCopyable from '../../components/InputCopyable.vue'; import type { Units } from './hdd-calculator.service'; import { getRealSize } from './hdd-calculator.service'; -const units = [ - { value: 'kb', label: 'KB' }, +const dec_units = [ + { value: 'kb', label: 'kB' }, { value: 'mb', label: 'MB' }, { value: 'gb', label: 'GB' }, { value: 'tb', label: 'TB' }, { value: 'pb', label: 'PB' }, ]; +const bin_units = [ + { value: 'kb', label: 'KiB' }, + { value: 'mb', label: 'MiB' }, + { value: 'gb', label: 'GiB' }, + { value: 'tb', label: 'TiB' }, + { value: 'pb', label: 'PiB' }, +]; const claimedCapacity = ref(1); const claimedUnit = ref('tb'); @@ -23,15 +30,15 @@ const claimedUnit = ref('tb'); diff --git a/src/tools/hdd-calculator/index.ts b/src/tools/hdd-calculator/index.ts index 8b3071ff..e3b1e765 100644 --- a/src/tools/hdd-calculator/index.ts +++ b/src/tools/hdd-calculator/index.ts @@ -4,7 +4,7 @@ import { defineTool } from '../tool'; export const tool = defineTool({ name: 'HDD calculator', path: '/hdd-calculator', - description: 'Compute real storage space (binary) from HDD Capacity (decimal)', + description: 'Storage device manufacturers report capacities in decimal form (like GB), while operating systems and other software uses binary form (GiB), although still incorrectly using the decimal unit (GiB). This tool converts decimal form capacity into various binary forms.', keywords: ['hdd', 'calculator', 'size', 'conversion', 'binary', 'decimal', 'gb', 'mb', 'tb', 'gigabyte', 'gibibyte', 'megabyte', 'mebibyte', 'terabyte', 'tebibyte'],