mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
Merge branch 'feat/air-codes' into chore/all-my-stuffs
# Conflicts: # components.d.ts # package.json # pnpm-lock.yaml # src/tools/index.ts
This commit is contained in:
commit
2a985b6d2d
5 files changed
+93
-1
No files matched your search
@@ -104,6 +104,7 @@
|
||||
"@zxing/library": "^0.21.0",
|
||||
"arr-diff": "^4.0.0",
|
||||
"@xmldom/xmldom": "^0.8.10",
|
||||
"aircodes": "^1.3.16",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"big.js": "^6.2.2",
|
||||
"change-case": "^4.1.2",
|
||||
|
||||
Generated
+9
-1
@@ -158,6 +158,9 @@ dependencies:
|
||||
'@zxing/library':
|
||||
specifier: ^0.21.0
|
||||
version: 0.21.3
|
||||
aircodes:
|
||||
specifier: ^1.3.16
|
||||
version: 1.3.16
|
||||
arr-diff:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
@@ -6350,7 +6353,7 @@ packages:
|
||||
/@vueuse/shared@10.0.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-Zh3LgJqvUBWVY3SiMvXanTcfAneGbt63QPczBRDNgQ6jd/ehodO9a1lCFzaA6SWJJoI+ugVTjHFYJdoR656DVQ==}
|
||||
dependencies:
|
||||
vue-demi: 0.14.5(vue@3.3.4)
|
||||
vue-demi: 0.14.10(vue@3.3.4)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
@@ -6455,6 +6458,10 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/aircodes@1.3.16:
|
||||
resolution: {integrity: sha512-ysPgP4iifjazWJfnfkywqpJMS+wVGzd9Z1t9oEeMjjbktavlxaJsFgmLl2OLdZru44sefc9/cCRUeeB7xKjxxQ==}
|
||||
dev: false
|
||||
|
||||
/ajv-errors@3.0.0(ajv@8.12.0):
|
||||
resolution: {integrity: sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==}
|
||||
peerDependencies:
|
||||
@@ -15916,6 +15923,7 @@ packages:
|
||||
|
||||
/yamljs@0.3.0:
|
||||
resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
argparse: 1.0.10
|
||||
glob: 7.2.3
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
<script setup lang="ts">
|
||||
import { findAirline, findAirport } from 'aircodes';
|
||||
import SpanCopyable from '@/components/SpanCopyable.vue';
|
||||
|
||||
const airlineQuery = ref('');
|
||||
const airportQuery = ref('');
|
||||
const resultAirline = computed(() => airlineQuery.value === '' ? [] : findAirline(airlineQuery.value));
|
||||
const resultAirport = computed(() => airportQuery.value === '' ? [] : findAirport(airportQuery.value));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-card title="Airline search" mb-1>
|
||||
<n-space>
|
||||
<n-form-item label="Airline query">
|
||||
<n-input v-model:value="airlineQuery" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<div v-for="airline in resultAirline" :key="airline.iata">
|
||||
<n-form-item label="IATA">
|
||||
<SpanCopyable :value="airline.iata" />
|
||||
</n-form-item>
|
||||
<n-form-item label="ICAO">
|
||||
<SpanCopyable :value="airline.icao" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Name">
|
||||
<SpanCopyable :value="airline.name" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Logo">
|
||||
<img width="100" :alt="airline.name" :src="airline.logo">
|
||||
</n-form-item>
|
||||
</div>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Airport search">
|
||||
<n-space>
|
||||
<n-form-item label="Airport query">
|
||||
<n-input v-model:value="airportQuery" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<div v-for="airport in resultAirport" :key="airport.iata">
|
||||
<n-form-item label="IATA">
|
||||
<SpanCopyable :value="airport.iata" />
|
||||
</n-form-item>
|
||||
<n-form-item label="ICAO">
|
||||
<SpanCopyable :value="airport.icao" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Name">
|
||||
<SpanCopyable :value="airport.name" />
|
||||
</n-form-item>
|
||||
<n-form-item label="City">
|
||||
<SpanCopyable :value="airport.city" />
|
||||
</n-form-item>
|
||||
<n-form-item label="State">
|
||||
<SpanCopyable :value="airport.state" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Country">
|
||||
<SpanCopyable :value="airport.country" />
|
||||
</n-form-item>
|
||||
</div>
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Plane } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Air Codes',
|
||||
path: '/air-codes',
|
||||
description: 'Get Airport and Airline info from name, ICAO code or IATA code',
|
||||
keywords: ['airport', 'airline', 'air', 'plane', 'icao', 'iata'],
|
||||
component: () => import('./air-codes.vue'),
|
||||
icon: Plane,
|
||||
createdAt: new Date('2024-04-20'),
|
||||
});
|
||||
@@ -108,6 +108,7 @@ import { tool as ulidGenerator } from './ulid-generator';
|
||||
import { tool as ibanValidatorAndParser } from './iban-validator-and-parser';
|
||||
import { tool as stringObfuscator } from './string-obfuscator';
|
||||
import { tool as textDiff } from './text-diff';
|
||||
import { tool as airCodes } from './air-codes';
|
||||
import { tool as emojiPicker } from './emoji-picker';
|
||||
import { tool as passwordStrengthAnalyser } from './password-strength-analyser';
|
||||
import { tool as yamlToToml } from './yaml-to-toml';
|
||||
@@ -446,6 +447,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
ibanValidatorAndParser,
|
||||
luhnValidator,
|
||||
vatValidator,
|
||||
airCodes,
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user