mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
feat(new tool): Airport and Airline lookup
This commit is contained in:
1 parent
cb5b462e11
commit
071cd4c366
6 files changed
+106
-7
No files matched your search
Vendored
+4
@@ -11,6 +11,7 @@ declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
'404.page': typeof import('./src/pages/404.page.vue')['default']
|
||||
About: typeof import('./src/pages/About.vue')['default']
|
||||
AirCodes: typeof import('./src/tools/air-codes/air-codes.vue')['default']
|
||||
App: typeof import('./src/App.vue')['default']
|
||||
AsciiTextDrawer: typeof import('./src/tools/ascii-text-drawer/ascii-text-drawer.vue')['default']
|
||||
'Base.layout': typeof import('./src/layouts/base.layout.vue')['default']
|
||||
@@ -138,12 +139,14 @@ declare module '@vue/runtime-core' {
|
||||
NH1: typeof import('naive-ui')['NH1']
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NInput: typeof import('naive-ui')['NInput']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NLabel: typeof import('naive-ui')['NLabel']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NSpin: typeof import('naive-ui')['NSpin']
|
||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||
@@ -159,6 +162,7 @@ declare module '@vue/runtime-core' {
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
RsaKeyPairGenerator: typeof import('./src/tools/rsa-key-pair-generator/rsa-key-pair-generator.vue')['default']
|
||||
SafelinkDecoder: typeof import('./src/tools/safelink-decoder/safelink-decoder.vue')['default']
|
||||
SlugifyString: typeof import('./src/tools/slugify-string/slugify-string.vue')['default']
|
||||
SpanCopyable: typeof import('./src/components/SpanCopyable.vue')['default']
|
||||
SqlPrettify: typeof import('./src/tools/sql-prettify/sql-prettify.vue')['default']
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
"@vueuse/core": "^10.3.0",
|
||||
"@vueuse/head": "^1.0.0",
|
||||
"@vueuse/router": "^10.0.0",
|
||||
"aircodes": "^1.3.16",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"change-case": "^4.1.2",
|
||||
"colord": "^2.9.3",
|
||||
|
||||
Generated
+14
-6
@@ -41,6 +41,9 @@ dependencies:
|
||||
'@vueuse/router':
|
||||
specifier: ^10.0.0
|
||||
version: 10.0.0(vue-router@4.1.6)(vue@3.3.4)
|
||||
aircodes:
|
||||
specifier: ^1.3.16
|
||||
version: 1.3.16
|
||||
bcryptjs:
|
||||
specifier: ^2.4.3
|
||||
version: 2.4.3
|
||||
@@ -3351,7 +3354,7 @@ packages:
|
||||
dependencies:
|
||||
'@unhead/dom': 0.5.1
|
||||
'@unhead/schema': 0.5.1
|
||||
'@vueuse/shared': 10.7.2(vue@3.3.4)
|
||||
'@vueuse/shared': 10.9.0(vue@3.3.4)
|
||||
unhead: 0.5.1
|
||||
vue: 3.3.4
|
||||
transitivePeerDependencies:
|
||||
@@ -3993,10 +3996,10 @@ packages:
|
||||
- vue
|
||||
dev: false
|
||||
|
||||
/@vueuse/shared@10.7.2(vue@3.3.4):
|
||||
resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==}
|
||||
/@vueuse/shared@10.9.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==}
|
||||
dependencies:
|
||||
vue-demi: 0.14.6(vue@3.3.4)
|
||||
vue-demi: 0.14.7(vue@3.3.4)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
@@ -4051,6 +4054,10 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/aircodes@1.3.16:
|
||||
resolution: {integrity: sha512-ysPgP4iifjazWJfnfkywqpJMS+wVGzd9Z1t9oEeMjjbktavlxaJsFgmLl2OLdZru44sefc9/cCRUeeB7xKjxxQ==}
|
||||
dev: false
|
||||
|
||||
/ajv@6.12.6:
|
||||
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
|
||||
dependencies:
|
||||
@@ -9151,8 +9158,8 @@ packages:
|
||||
vue: 3.3.4
|
||||
dev: false
|
||||
|
||||
/vue-demi@0.14.6(vue@3.3.4):
|
||||
resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
|
||||
/vue-demi@0.14.7(vue@3.3.4):
|
||||
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
@@ -9442,6 +9449,7 @@ packages:
|
||||
|
||||
/workbox-google-analytics@7.0.0:
|
||||
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
|
||||
deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
|
||||
dependencies:
|
||||
workbox-background-sync: 7.0.0
|
||||
workbox-core: 7.0.0
|
||||
|
||||
@@ -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'),
|
||||
});
|
||||
+6
-1
@@ -14,6 +14,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';
|
||||
@@ -176,7 +177,11 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
},
|
||||
{
|
||||
name: 'Data',
|
||||
components: [phoneParserAndFormatter, ibanValidatorAndParser],
|
||||
components: [
|
||||
phoneParserAndFormatter,
|
||||
ibanValidatorAndParser,
|
||||
airCodes,
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user