-
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
倏昱
committed
Jun 21, 2023
1 parent
e116458
commit b9046f1
Showing
67 changed files
with
3,850 additions
and
2,901 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 100 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_CONTEXT=DEV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_CONTEXT=PROD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ logs | |
# add other ignore file below | ||
javascript | ||
style.css | ||
vite-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
const config = require('@lobehub/lint').eslint; | ||
|
||
config.rules['indent'] = ['off', 2]; | ||
|
||
module.exports = { | ||
...require('@lobehub/lint').eslint, | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
rules: { | ||
'no-undef': 0, | ||
'unicorn/prefer-add-event-listener': 0, | ||
}, | ||
}, | ||
], | ||
...config, | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
rules: { | ||
'no-undef': 0, | ||
'object-curly-spacing': 0, | ||
'unicorn/prefer-add-event-listener': 0, | ||
}, | ||
}, | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { memo, useEffect, useState } from 'react'; | ||
import { shallow } from 'zustand/shallow'; | ||
|
||
import Layout from '@/layouts'; | ||
import Index from '@/pages'; | ||
import formatPrompt from '@/script/formatPrompt'; | ||
import promptBracketChecker from '@/script/promptBracketChecker'; | ||
import setupHead from '@/script/setupHead'; | ||
import { useAppStore } from '@/store'; | ||
|
||
const App = memo(() => { | ||
const [loading, setLoading] = useState(true); | ||
const setCurrentTab = useAppStore((st) => st.setCurrentTab, shallow); | ||
useEffect(() => { | ||
setupHead(); | ||
onUiLoaded(() => { | ||
formatPrompt(); | ||
promptBracketChecker(); | ||
setLoading(false); | ||
}); | ||
onUiUpdate(() => { | ||
setCurrentTab(); | ||
}); | ||
}, []); | ||
|
||
return <Layout>{!loading && <Index />}</Layout>; | ||
}); | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import RefreshRuntime from '/@react-refresh'; | ||
|
||
const RefreshSig = (type) => type; | ||
|
||
RefreshRuntime.injectIntoGlobalHook(window); | ||
window.$RefreshReg$ = () => {}; | ||
window.$RefreshSig$ = () => RefreshSig; | ||
window.__vite_plugin_react_preamble_installed__ = true; | ||
|
||
console.log('🚧 Injecting React Refresh'); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.