Skip to content

Commit

Permalink
Merge pull request #115 from mebtte/beta
Browse files Browse the repository at this point in the history
bugfix
  • Loading branch information
MEBTTE authored Jan 16, 2024
2 parents 3d5c6a8 + 9df03b9 commit 9a4a693
Show file tree
Hide file tree
Showing 14 changed files with 613 additions and 422 deletions.
79 changes: 0 additions & 79 deletions .eslintrc.cjs

This file was deleted.

24 changes: 24 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
env:
browser: true
node: true
jest/globals: true
extends:
- standard-with-typescript
- plugin:react/recommended
- plugin:react-hooks/recommended
- prettier
parserOptions:
ecmaVersion: latest
sourceType: module
plugins:
- react
- jest
rules:
"no-void": off

"@typescript-eslint/no-confusing-void-expression": off
"@typescript-eslint/no-unsafe-argument": off
"@typescript-eslint/explicit-function-return-type": off
"@typescript-eslint/promise-function-async": off

"react/react-in-jsx-scope": off
7 changes: 0 additions & 7 deletions apps/cli/.eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions apps/cli/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extends: "../../.eslintrc.yml"
globals:
__VERSION__: "readonly"
2 changes: 1 addition & 1 deletion apps/cli/src/db/create_music.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ID_LENGTH, MusicType } from '#/constants/music';
import { ID_LENGTH, type MusicType } from '#/constants/music';
import generateRandomString from '#/utils/generate_random_string';
import { MUSIC_TABLE_NAME, MusicProperty } from '@/constants/db_definition';
import { getDB } from '.';
Expand Down
6 changes: 0 additions & 6 deletions apps/pwa/.eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions apps/pwa/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extends: "../../.eslintrc.yml"
rules:
"import/no-extraneous-dependencies": "off"
2 changes: 1 addition & 1 deletion apps/pwa/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './polyfill'; // 需要保证 polyfill 在第一个
import './polyfill'; // make sure that polyfill is first
import './updater';
import './devtool';
import { createRoot } from 'react-dom/client';
Expand Down
2 changes: 1 addition & 1 deletion apps/pwa/src/pages/player/lyric_panel/lyric_panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function LyricPanel({ style }: { style: unknown }) {
const queueMusic = playqueue[currentPlayqueuePosition];

return (
// @ts-expect-error
// @ts-expect-error: style is known
<Style style={style}>
<Backdrop cover={queueMusic.cover} />
<Lyric queueMusic={queueMusic} />
Expand Down
3 changes: 2 additions & 1 deletion apps/pwa/src/pages/player/pages/search/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import parseSearch from '@/utils/parse_search';
import { useState } from 'react';
import { useLocation } from 'react-router-dom';
import { t } from '@/i18n';
import upperCaseFirstLetter from '#/utils/upper_case_first_letter';

function Wrapper() {
const navigate = useNavigate();
Expand All @@ -17,7 +18,7 @@ function Wrapper() {
<Input
className="input"
type="search"
placeholder={t('search')}
placeholder={upperCaseFirstLetter(t('search'))}
value={keyword}
autoFocus
onChange={(e) => setKeyword(e.target.value)}
Expand Down
7 changes: 6 additions & 1 deletion apps/pwa/src/service_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,12 @@ registerRoute(
* API 网络优先
* @author mebtte<[email protected]>
*/
const PREVNET_CACHE_PATHS: string[] = ['/api/captcha', '/api/profile'];
const PREVNET_CACHE_PATHS: string[] = [
'/base/metadata',
'/base/captcha',

'/api/profile',
];
registerRoute(
({ request }) => {
const url = new URL(request.url);
Expand Down
Loading

0 comments on commit 9a4a693

Please sign in to comment.