chore: tweak (#333)

This commit is contained in:
ntnyq 2022-04-18 23:27:36 +08:00 committed by GitHub
parent 168fe35609
commit 225d10511e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -8,10 +8,7 @@ import { type UserModule } from '~/types'
const messages = Object.fromEntries(
Object.entries(
import.meta.globEager('../../locales/*.y(a)?ml'))
.map(([key, value]) => {
const yaml = key.endsWith('.yaml')
return [key.slice(14, yaml ? -5 : -4), value.default]
}),
.map(([key, value]) => [key.split('/').at(-1)?.replace(/\.ya?ml$/, ''), value.default]),
)
export const install: UserModule = ({ app }) => {

View File

@ -12,7 +12,7 @@ import {
export default defineConfig({
shortcuts: [
['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
['icon-btn', 'text-[0.9em] inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
],
presets: [
presetUno(),