mirror of
https://github.com/artegoser/AnoPaper.git
synced 2024-11-23 20:36:21 +03:00
Compare commits
2 commits
f3138d70f5
...
687abb318e
Author | SHA1 | Date | |
---|---|---|---|
687abb318e | |||
1542768e25 |
10 changed files with 4228 additions and 1116 deletions
17
.eslintrc.cjs
Normal file
17
.eslintrc.cjs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
module.exports = {
|
||||||
|
env: { browser: true, es2020: true },
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:react/recommended",
|
||||||
|
"plugin:react/jsx-runtime",
|
||||||
|
"plugin:react-hooks/recommended",
|
||||||
|
],
|
||||||
|
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
|
||||||
|
settings: { react: { version: "18.2" } },
|
||||||
|
plugins: ["react-refresh"],
|
||||||
|
rules: {
|
||||||
|
"react-refresh/only-export-components": "warn",
|
||||||
|
"react/prop-types": 0,
|
||||||
|
"no-undef": 0,
|
||||||
|
},
|
||||||
|
};
|
5290
package-lock.json
generated
5290
package-lock.json
generated
File diff suppressed because it is too large
Load diff
18
package.json
18
package.json
|
@ -40,12 +40,16 @@
|
||||||
"unified": "^10.1.2"
|
"unified": "^10.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react": "^18.0.17",
|
"@types/react": "^18.0.28",
|
||||||
"@types/react-dom": "^18.0.6",
|
"@types/react-dom": "^18.0.11",
|
||||||
"@vitejs/plugin-react": "^2.1.0",
|
"@vitejs/plugin-react": "^4.0.0-beta.0",
|
||||||
"autoprefixer": "^10.4.12",
|
"autoprefixer": "^10.4.14",
|
||||||
"postcss": "^8.4.18",
|
"eslint": "^8.38.0",
|
||||||
"tailwindcss": "^3.1.8",
|
"eslint-plugin-react": "^7.32.2",
|
||||||
"vite": "^3.1.0"
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
|
"eslint-plugin-react-refresh": "^0.3.4",
|
||||||
|
"postcss": "^8.4.23",
|
||||||
|
"tailwindcss": "^3.3.1",
|
||||||
|
"vite": "^4.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,14 +48,15 @@ function CodeBlock(props) {
|
||||||
function RenderMarkdown(props) {
|
function RenderMarkdown(props) {
|
||||||
return (
|
return (
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
children={props.children}
|
|
||||||
remarkPlugins={[remarkMath, remarkGfm]}
|
remarkPlugins={[remarkMath, remarkGfm]}
|
||||||
rehypePlugins={[rehypeMathjax]}
|
rehypePlugins={[rehypeMathjax]}
|
||||||
components={{
|
components={{
|
||||||
code: CodeBlock,
|
code: CodeBlock,
|
||||||
pre: Pre,
|
pre: Pre,
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
|
{props.children}
|
||||||
|
</ReactMarkdown>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,6 @@ let en = {
|
||||||
Search: "Search",
|
Search: "Search",
|
||||||
NoNotesFound: "No notes found",
|
NoNotesFound: "No notes found",
|
||||||
LocalNote: "Local",
|
LocalNote: "Local",
|
||||||
PublicNote: "Public",
|
|
||||||
Menu: "Menu",
|
Menu: "Menu",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ let eo = {
|
||||||
Search: "Serĉo",
|
Search: "Serĉo",
|
||||||
NoNotesFound: "Neniuj notoj trovitaj",
|
NoNotesFound: "Neniuj notoj trovitaj",
|
||||||
LocalNote: "Loka",
|
LocalNote: "Loka",
|
||||||
PublicNote: "Publika",
|
PublishNote: "Publika",
|
||||||
Menu: "Menuo",
|
Menu: "Menuo",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ let es = {
|
||||||
Search: "Buscar",
|
Search: "Buscar",
|
||||||
NoNotesFound: "No se encontraron notas",
|
NoNotesFound: "No se encontraron notas",
|
||||||
LocalNote: "Local",
|
LocalNote: "Local",
|
||||||
PublicNote: "Pública",
|
PublishNote: "Pública",
|
||||||
Menu: "Menú",
|
Menu: "Menú",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ let ja = {
|
||||||
Search: "検索",
|
Search: "検索",
|
||||||
NoNotesFound: "メモが見つかりません",
|
NoNotesFound: "メモが見つかりません",
|
||||||
LocalNote: "地元",
|
LocalNote: "地元",
|
||||||
PublicNote: "公共",
|
PublishNote: "公共",
|
||||||
Menu: "メニュー",
|
Menu: "メニュー",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ let zh = {
|
||||||
Search: "搜索",
|
Search: "搜索",
|
||||||
NoNotesFound: "找不到笔记",
|
NoNotesFound: "找不到笔记",
|
||||||
LocalNote: "当地的",
|
LocalNote: "当地的",
|
||||||
PublicNote: "民众",
|
PublishNote: "民众",
|
||||||
Menu: "菜单",
|
Menu: "菜单",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,6 @@ function CreateNote() {
|
||||||
const [text, setText] = useState(localStorage.getItem("NoteText"));
|
const [text, setText] = useState(localStorage.getItem("NoteText"));
|
||||||
const [name, setName] = useState(localStorage.getItem("NoteName"));
|
const [name, setName] = useState(localStorage.getItem("NoteName"));
|
||||||
|
|
||||||
const [date, setDate] = useState(Date.now());
|
|
||||||
|
|
||||||
async function previewChange(val) {
|
async function previewChange(val) {
|
||||||
let md = await unified()
|
let md = await unified()
|
||||||
.use(remarkGfm)
|
.use(remarkGfm)
|
||||||
|
@ -106,7 +104,7 @@ function CreateNote() {
|
||||||
localStorage.setItem("NoteName", data.name);
|
localStorage.setItem("NoteName", data.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on("roomJoined", (data) => {
|
socket.on("roomJoined", () => {
|
||||||
nameUpdate(localStorage.getItem("NoteName"), true);
|
nameUpdate(localStorage.getItem("NoteName"), true);
|
||||||
textUpdate(localStorage.getItem("NoteText"), true);
|
textUpdate(localStorage.getItem("NoteText"), true);
|
||||||
});
|
});
|
||||||
|
@ -124,7 +122,6 @@ function CreateNote() {
|
||||||
id="preview"
|
id="preview"
|
||||||
onClick={(val) => {
|
onClick={(val) => {
|
||||||
setText(localStorage.getItem("NoteText"));
|
setText(localStorage.getItem("NoteText"));
|
||||||
setDate(Date.now());
|
|
||||||
setPreview(val.target.checked);
|
setPreview(val.target.checked);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Add table
Reference in a new issue