Skip to content

Commit

Permalink
chore: tweak (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq authored Apr 18, 2022
1 parent 168fe35 commit 225d105
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/modules/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down
2 changes: 1 addition & 1 deletion unocss.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 225d105

Please sign in to comment.