mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-25 09:16:15 -04:00
chore(lint): switched to a better lint config
This commit is contained in:
parent
4d2b037dbe
commit
33c9b6643f
178 changed files with 4105 additions and 3371 deletions
|
@ -1,3 +1,16 @@
|
|||
<script setup lang="ts">
|
||||
import db from 'oui/oui.json';
|
||||
import { macAddressValidationRules } from '@/utils/macAddress';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
|
||||
const getVendorValue = (address: string) => address.trim().replace(/[.:-]/g, '').toUpperCase().substring(0, 6);
|
||||
|
||||
const macAddress = ref('20:37:06:12:34:56');
|
||||
const details = computed<string | undefined>(() => db[getVendorValue(macAddress.value)]);
|
||||
|
||||
const { copy } = useCopy({ source: details, text: 'Vendor info copied to the clipboard' });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-input-text
|
||||
|
@ -14,32 +27,25 @@
|
|||
mb-5
|
||||
/>
|
||||
|
||||
<div mb-5px>Vendor info:</div>
|
||||
<div mb-5px>
|
||||
Vendor info:
|
||||
</div>
|
||||
<c-card mb-5>
|
||||
<div v-if="details">
|
||||
<div v-for="(detail, index) of details.split('\n')" :key="index">{{ detail }}</div>
|
||||
<div v-for="(detail, index) of details.split('\n')" :key="index">
|
||||
{{ detail }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else italic op-60>Unknown vendor for this address</div>
|
||||
<div v-else italic op-60>
|
||||
Unknown vendor for this address
|
||||
</div>
|
||||
</c-card>
|
||||
|
||||
<div flex justify-center>
|
||||
<c-button :disabled="!details" @click="copy"> Copy vendor info </c-button>
|
||||
<c-button :disabled="!details" @click="copy">
|
||||
Copy vendor info
|
||||
</c-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import db from 'oui/oui.json';
|
||||
import { macAddressValidationRules } from '@/utils/macAddress';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
|
||||
const getVendorValue = (address: string) => address.trim().replace(/[.:-]/g, '').toUpperCase().substring(0, 6);
|
||||
|
||||
const macAddress = ref('20:37:06:12:34:56');
|
||||
const details = computed<string | undefined>(() => db[getVendorValue(macAddress.value)]);
|
||||
|
||||
const { copy } = useCopy({ source: details, text: 'Vendor info copied to the clipboard' });
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue