Skip to content

Commit 47340c2

Browse files
author
Iori Ichinose
committed
chore: update dependencies and formatting
1 parent 178e9dc commit 47340c2

11 files changed

Lines changed: 2656 additions & 8806 deletions

File tree

package-lock.json

Lines changed: 0 additions & 8749 deletions
This file was deleted.

package.json

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,33 @@
88
"serve": "vite preview"
99
},
1010
"dependencies": {
11-
"dayjs": "^1.10.7",
12-
"marked": "^4.0.0",
13-
"vue": "^3.2.31",
11+
"dayjs": "^1.11.7",
12+
"marked": "^4.2.5",
13+
"vue": "^3.2.45",
1414
"vue-gtag": "^2.0.1",
15-
"vue-i18n": "^9.1.9",
16-
"vue-router": "^4.0.14",
17-
"vuex": "^4.0.2"
15+
"vue-i18n": "^9.2.2",
16+
"vue-router": "^4.1.6",
17+
"vuex": "^4.1.0"
1818
},
1919
"devDependencies": {
20-
"@intlify/vite-plugin-vue-i18n": "^3.2.1",
21-
"@types/marked": "^4.0.0",
22-
"@typescript-eslint/eslint-plugin": "^5.0.0",
23-
"@typescript-eslint/parser": "^5.0.0",
24-
"@vicons/ionicons5": "^0.11.0",
25-
"@vitejs/plugin-vue": "^1.9.3",
26-
"@vitejs/plugin-vue-jsx": "^1.2.0",
27-
"eslint": "^8.0.1",
28-
"eslint-plugin-vue": "^7.19.1",
29-
"eslint-plugin-prettier": "^4.0.0",
30-
"eslint-config-prettier": "^8.3.0",
31-
"less": "^4.1.2",
32-
"naive-ui": "^2.26.4",
33-
"rollup-plugin-visualizer": "^5.5.2",
34-
"typescript": "^4.4.3",
35-
"vfonts": "^0.1.0",
36-
"vite": "^2.6.4",
37-
"vue-tsc": "^0.3.0"
20+
"@intlify/unplugin-vue-i18n": "^0.8.1",
21+
"@types/marked": "^4.0.8",
22+
"@typescript-eslint/eslint-plugin": "^5.48.0",
23+
"@typescript-eslint/parser": "^5.48.0",
24+
"@vicons/ionicons5": "^0.12.0",
25+
"@vitejs/plugin-vue": "^4.0.0",
26+
"@vitejs/plugin-vue-jsx": "^3.0.0",
27+
"eslint": "^8.31.0",
28+
"eslint-plugin-vue": "^9.8.0",
29+
"eslint-plugin-prettier": "^4.2.1",
30+
"eslint-config-prettier": "^8.6.0",
31+
"less": "^4.1.3",
32+
"naive-ui": "^2.34.3",
33+
"rollup-plugin-visualizer": "^5.9.0",
34+
"typescript": "^4.9.4",
35+
"vfonts": "^0.0.3",
36+
"vite": "^4.0.4",
37+
"vue-tsc": "^1.0.22",
38+
"prettier": "^2.8.1"
3839
}
39-
}
40+
}

src/components/Card.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { CardItem } from '../models/cards';
77
88
import NamedIcon from './common/NamedIcon.vue';
99
10-
const { entry } = defineProps<{ entry: CardItem }>();
10+
defineProps<{ entry: CardItem }>();
1111
</script>
1212

1313
<template>

src/components/DownloadTile.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
import { defineProps, reactive } from 'vue';
33
import { NCard } from 'naive-ui';
44
5-
const { item } = defineProps<{
5+
const props = defineProps<{
66
item: {
77
title: string;
88
description: string;
99
url: string;
1010
};
1111
}>();
1212
13-
const { title, description, url } = reactive(item);
13+
const { title, description, url } = reactive(props.item);
1414
1515
const download = () => window.open(url);
1616
</script>

src/components/Panel.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ async function handleClick(link: NewsEntry) {
5151
>
5252
<n-tab-pane name="Mirror">
5353
<n-row v-for="link in news" :key="link.content">
54-
<n-button
55-
text
56-
tag="a"
57-
@click="handleClick(link)"
58-
>{{ convertTimestamp(link.time, locale as 'zh' | 'en') + ' - ' + link.name }}</n-button
59-
>
54+
<n-button text tag="a" @click="handleClick(link)">{{
55+
convertTimestamp(link.time, locale as 'zh' | 'en') +
56+
' - ' +
57+
link.name
58+
}}</n-button>
6059
</n-row>
6160
</n-tab-pane>
6261
<n-tab-pane name="LUG Jokes">

src/components/common/Markdown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { defineProps, computed } from 'vue';
33
import { useStore } from '../../store';
44
5-
const { content } = defineProps<{ content: string }>();
5+
defineProps<{ content: string }>();
66
77
const store = useStore();
88
const theme = computed(() =>

src/components/common/NamedIcon.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ const icons: Record<string, VNode> = {
2929
unknown: <ArrowForwardCircleOutline />
3030
};
3131
32-
const { name, size } = defineProps<{ name: string; size: number }>();
32+
const props = defineProps<{ name: string; size: number }>();
3333
34-
const MyIcon = () => icons[name] || <ArrowForwardCircleOutline />;
34+
const MyIcon = () => icons[props.name] || <ArrowForwardCircleOutline />;
3535
</script>
3636

3737
<template>

src/routes/docs.tsx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ import { State } from '../store';
55

66
export default function fetchDocRoutes(state: State, filter = '') {
77
return state.docItems
8-
.filter(item => item.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
9-
.map(item => ({
10-
key: '/help/' + item.name,
11-
label: () => {
12-
return item.redirect ? <a href={item.redirect}>{item.name}</a> :
13-
<RouterLink to={'/help/' + item.name}>{item.name}</RouterLink>;
14-
}
15-
} as MenuOption));
8+
.filter(item =>
9+
item.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase())
10+
)
11+
.map(
12+
item =>
13+
({
14+
key: '/help/' + item.name,
15+
label: () => {
16+
return item.redirect ? (
17+
<a href={item.redirect}>{item.name}</a>
18+
) : (
19+
<RouterLink to={'/help/' + item.name}>{item.name}</RouterLink>
20+
);
21+
}
22+
} as MenuOption)
23+
);
1624
}

src/routes/downloads.tsx

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,57 @@ import { State } from '../store';
1010
import { DownloadContent } from '../models/downloads';
1111

1212
function toOptions(items: DownloadContent[]) {
13-
return items.map(item => ({
14-
key: `/download/${item.distro}`,
15-
label: () => <RouterLink to={`/download/${item.distro}`}>
16-
{item.distro}
17-
</RouterLink>,
18-
}) as MenuOption);
13+
return items.map(
14+
item =>
15+
({
16+
key: `/download/${item.distro}`,
17+
label: () => (
18+
<RouterLink to={`/download/${item.distro}`}>{item.distro}</RouterLink>
19+
)
20+
} as MenuOption)
21+
);
1922
}
2023

2124
export default function fetchDownloadRoutes(state: State, filter = '') {
2225
const { t } = useI18n();
2326
const osText = t('sider.os');
2427
const appsText = t('sider.apps');
2528
const fontsText = t('sider.fonts');
26-
const contents = state.downloadContents
27-
.filter(value => value.distro.toLocaleLowerCase().includes(filter.toLocaleLowerCase()));
29+
const contents = state.downloadContents.filter(value =>
30+
value.distro.toLocaleLowerCase().includes(filter.toLocaleLowerCase())
31+
);
2832
const os = contents.filter(value => value.category == 'os');
2933
const apps = contents.filter(value => value.category == 'app');
3034
const fonts = contents.filter(value => value.category == 'font');
3135
return [
3236
{
3337
label: `${osText} ${os.length}`,
3438
key: 'OS',
35-
icon: () => <NIcon><DesktopOutline /></NIcon>,
39+
icon: () => (
40+
<NIcon>
41+
<DesktopOutline />
42+
</NIcon>
43+
),
3644
children: toOptions(os)
3745
},
3846
{
3947
label: `${appsText} ${apps.length}`,
4048
key: 'Apps',
41-
icon: () => <NIcon><AppsOutline /></NIcon>,
49+
icon: () => (
50+
<NIcon>
51+
<AppsOutline />
52+
</NIcon>
53+
),
4254
children: toOptions(apps)
4355
},
4456
{
4557
label: `${fontsText} ${fonts.length}`,
4658
key: 'Fonts',
47-
icon: () => <NIcon><ColorPaletteOutline /></NIcon>,
59+
icon: () => (
60+
<NIcon>
61+
<ColorPaletteOutline />
62+
</NIcon>
63+
),
4864
children: toOptions(fonts)
4965
}
5066
] as MenuOption[];

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineConfig } from 'vite';
22
import path from 'path';
33
import vue from '@vitejs/plugin-vue';
44
import vueJsx from '@vitejs/plugin-vue-jsx';
5-
import vueI18n from '@intlify/vite-plugin-vue-i18n';
5+
import vueI18n from '@intlify/unplugin-vue-i18n/vite';
66
import { visualizer } from 'rollup-plugin-visualizer';
77

88
// https://vitejs.dev/config/

0 commit comments

Comments
 (0)