Skip to content

Commit 22cdc82

Browse files
committed
feat(new tool): Implement JSON sorter, addressing issue CorentinTh#941
1 parent d3b32cc commit 22cdc82

File tree

12 files changed

+215
-1
lines changed

12 files changed

+215
-1
lines changed

components.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ declare module '@vue/runtime-core' {
8989
HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default']
9090
IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default']
9191
'IconMdi:brushVariant': typeof import('~icons/mdi/brush-variant')['default']
92+
'IconMdi:contentCopy': typeof import('~icons/mdi/content-copy')['default']
9293
'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default']
94+
IconMdiArrowDown: typeof import('~icons/mdi/arrow-down')['default']
9395
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
9496
IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
9597
IconMdiClose: typeof import('~icons/mdi/close')['default']
@@ -108,6 +110,7 @@ declare module '@vue/runtime-core' {
108110
Ipv6UlaGenerator: typeof import('./src/tools/ipv6-ula-generator/ipv6-ula-generator.vue')['default']
109111
JsonDiff: typeof import('./src/tools/json-diff/json-diff.vue')['default']
110112
JsonMinify: typeof import('./src/tools/json-minify/json-minify.vue')['default']
113+
JsonSortMaster: typeof import('./src/tools/json-sort-master/json-sort-master.vue')['default']
111114
JsonToCsv: typeof import('./src/tools/json-to-csv/json-to-csv.vue')['default']
112115
JsonToToml: typeof import('./src/tools/json-to-toml/json-to-toml.vue')['default']
113116
JsonToYaml: typeof import('./src/tools/json-to-yaml-converter/json-to-yaml.vue')['default']
@@ -126,25 +129,38 @@ declare module '@vue/runtime-core' {
126129
MenuLayout: typeof import('./src/components/MenuLayout.vue')['default']
127130
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
128131
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
132+
NAlert: typeof import('naive-ui')['NAlert']
129133
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
134+
NCheckbox: typeof import('naive-ui')['NCheckbox']
130135
NCode: typeof import('naive-ui')['NCode']
131136
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
137+
NColorPicker: typeof import('naive-ui')['NColorPicker']
132138
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
139+
NDatePicker: typeof import('naive-ui')['NDatePicker']
133140
NDivider: typeof import('naive-ui')['NDivider']
134141
NEllipsis: typeof import('naive-ui')['NEllipsis']
142+
NForm: typeof import('naive-ui')['NForm']
135143
NFormItem: typeof import('naive-ui')['NFormItem']
136144
NGi: typeof import('naive-ui')['NGi']
137145
NGrid: typeof import('naive-ui')['NGrid']
138146
NH1: typeof import('naive-ui')['NH1']
139147
NH3: typeof import('naive-ui')['NH3']
140148
NIcon: typeof import('naive-ui')['NIcon']
149+
NImage: typeof import('naive-ui')['NImage']
150+
NInputGroup: typeof import('naive-ui')['NInputGroup']
151+
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
141152
NInputNumber: typeof import('naive-ui')['NInputNumber']
142153
NLabel: typeof import('naive-ui')['NLabel']
143154
NLayout: typeof import('naive-ui')['NLayout']
144155
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
145156
NMenu: typeof import('naive-ui')['NMenu']
146157
NScrollbar: typeof import('naive-ui')['NScrollbar']
158+
NSlider: typeof import('naive-ui')['NSlider']
147159
NSpin: typeof import('naive-ui')['NSpin']
160+
NStatistic: typeof import('naive-ui')['NStatistic']
161+
NSwitch: typeof import('naive-ui')['NSwitch']
162+
NTable: typeof import('naive-ui')['NTable']
163+
NTag: typeof import('naive-ui')['NTag']
148164
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
149165
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
150166
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
@@ -159,6 +175,7 @@ declare module '@vue/runtime-core' {
159175
RouterLink: typeof import('vue-router')['RouterLink']
160176
RouterView: typeof import('vue-router')['RouterView']
161177
RsaKeyPairGenerator: typeof import('./src/tools/rsa-key-pair-generator/rsa-key-pair-generator.vue')['default']
178+
SafelinkDecoder: typeof import('./src/tools/safelink-decoder/safelink-decoder.vue')['default']
162179
SlugifyString: typeof import('./src/tools/slugify-string/slugify-string.vue')['default']
163180
SpanCopyable: typeof import('./src/components/SpanCopyable.vue')['default']
164181
SqlPrettify: typeof import('./src/tools/sql-prettify/sql-prettify.vue')['default']

locales/en.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,10 @@ tools:
328328
title: PDF signature checker
329329
description: Verify the signatures of a PDF file. A signed PDF file contains one or more signatures that may be used to determine whether the contents of the file have been altered since the file was signed.
330330

331+
json-sort-master:
332+
title: JSON sort master
333+
description: Sort your JSON by keys and values.
334+
331335
json-minify:
332336
title: JSON minify
333337
description: Minify and compress your JSON by removing unnecessary white spaces.

locales/es.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,8 @@ tools:
6868
math: Math
6969
measurement: Measurement
7070
text: Text
71-
data: Data
71+
data: Data
72+
73+
json-sort-master:
74+
title: Maestro de clasificación JSON
75+
description: Ordena tu JSON por claves y valores.

locales/fr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,7 @@ tools:
7979
copied: Le token a été copié
8080
length: Longueur
8181
tokenPlaceholder: Le token...
82+
83+
json-sort-master:
84+
title: Maître de tri JSON
85+
description: Triez votre JSON par clés et valeurs.

locales/pt.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,7 @@ tools:
6969
measurement: 'Medidas'
7070
text: 'Texto'
7171
data: 'Dados'
72+
73+
json-sort-master:
74+
title: 'Mestre de classificação JSON'
75+
description: 'Ordene seu JSON por chaves e valores.'

locales/uk.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,7 @@ tools:
6969
measurement: Вимірювання
7070
text: Текст
7171
data: Дані
72+
73+
json-sort-master:
74+
title: JSON сортувальник
75+
description: Сортуйте ваш JSON за ключами та значеннями.

locales/vi.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ tools:
221221
title: Định dạng và làm đẹp JSON
222222
description: Định dạng chuỗi JSON của bạn thành một định dạng dễ đọc và thân thiện với con người.
223223

224+
json-sort-master:
225+
title: Sắp xếp JSON
226+
description: Sắp xếp JSON của bạn theo các khóa và giá trị.
227+
224228
docker-run-to-docker-compose-converter:
225229
title: Chuyển đổi lệnh docker run thành tệp docker-compose
226230
description: Chuyển đổi các lệnh docker run thành tệp docker-compose!

locales/zh.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ tools:
225225
title: JSON美化和格式化
226226
description: 将JSON字符串修饰为友好的可读格式。
227227

228+
json-sort-master:
229+
title: JSON排序大师
230+
description: 按键和值对您的JSON进行排序。
231+
228232
docker-run-to-docker-compose-converter:
229233
title: Docker Run 到 docker-compose 转换器
230234
description: 将 docker run 命令行转换为 docker-compose 文件!

src/tools/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { tool as base64FileConverter } from './base64-file-converter';
22
import { tool as base64StringConverter } from './base64-string-converter';
33
import { tool as basicAuthGenerator } from './basic-auth-generator';
4+
import { tool as jsonSortMaster } from './json-sort-master';
45

56
import { tool as asciiTextDrawer } from './ascii-text-drawer';
67

@@ -104,6 +105,7 @@ export const toolsByCategory: ToolCategory[] = [
104105
yamlToToml,
105106
jsonToYaml,
106107
jsonToToml,
108+
jsonSortMaster,
107109
listConverter,
108110
tomlToJson,
109111
tomlToYaml,

src/tools/json-sort-master/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { ArrowsSort } from '@vicons/tabler';
2+
import { defineTool } from '../tool';
3+
import { translate } from '@/plugins/i18n.plugin';
4+
5+
export const tool = defineTool({
6+
name: translate('tools.json-sort-master.title'),
7+
path: '/json-sort-master',
8+
description: translate('tools.json-sort-master.description'),
9+
keywords: ['json', 'sort'],
10+
component: () => import('./json-sort-master.vue'),
11+
icon: ArrowsSort,
12+
createdAt: new Date('2024-03-27'),
13+
});

0 commit comments

Comments
 (0)