@@ -64,7 +64,7 @@ Discouraged implementations: | |||
Only mark a function as `async` if and only if there are `await` calls | |||
or `Promise` returns inside the function. | |||
It's not recommended to use `async` event listeners, which may lead to problems. | |||
It's not recommended to use `async` event listeners, which may lead to problems. | |||
The reason is that the code after await is executed outside the event dispatch. | |||
Reference: https://github.com/github/eslint-plugin-github/blob/main/docs/rules/async-preventdefault.md | |||
@@ -73,50 +73,6 @@ it's recommended to use `const _promise = asyncFoo()` to tell readers | |||
that this is done by purpose, we want to call the async function and ignore the Promise. | |||
Some lint rules and IDEs also have warnings if the returned Promise is not handled. | |||
#### DOM Event Listener | |||
```js | |||
el.addEventListener('click', (e) => { | |||
(async () => { | |||
await asyncFoo(); // recommended | |||
// then we shound't do e.preventDefault() after await, no effect | |||
})(); | |||
const _promise = asyncFoo(); // recommended | |||
e.preventDefault(); // correct | |||
}); | |||
el.addEventListener('async', async (e) => { // not recommended but acceptable | |||
e.preventDefault(); // acceptable | |||
await asyncFoo(); // skip out event dispatch | |||
e.preventDefault(); // WRONG | |||
}); | |||
``` | |||
#### jQuery Event Listener | |||
```js | |||
$('#el').on('click', (e) => { | |||
(async () => { | |||
await asyncFoo(); // recommended | |||
// then we shound't do e.preventDefault() after await, no effect | |||
})(); | |||
const _promise = asyncFoo(); // recommended | |||
e.preventDefault(); // correct | |||
return false; // correct | |||
}); | |||
$('#el').on('click', async (e) => { // not recommended but acceptable | |||
e.preventDefault(); // acceptable | |||
return false; // WRONG, jQuery expects the returned value is a boolean, not a Promise | |||
await asyncFoo(); // skip out event dispatch | |||
return false; // WRONG | |||
}); | |||
``` | |||
### HTML Attributes and `dataset` | |||
We forbid `dataset` usage, its camel-casing behaviour makes it hard to grep for attributes. However there are still some special cases, so the current guideline is: |
@@ -26,7 +26,7 @@ Gitea ist ein [Gogs](http://gogs.io)-Fork. | |||
- 2 CPU Kerne und 1GB RAM sind für kleine Teams/Projekte ausreichend. | |||
- Gitea sollte unter einem seperaten nicht-root Account auf UNIX-Systemen ausgeführt werden. | |||
- Achtung: Gitea verwaltet die `~/.ssh/authorized_keys` Datei. Gitea unter einem normalen Benutzer auszuführen könnte dazu führen, dass dieser sich nicht mehr anmelden kann. | |||
- [Git](https://git-scm.com/) Version 1.7.2 oder später wird benötigt. Version 1.9.0 oder später wird empfohlen. Außerdem zu beachten: | |||
- [Git](https://git-scm.com/) Version 2.0 oder später wird benötigt. | |||
- Wenn git >= 2.1.2. und [Git large file storage](https://git-lfs.github.com/) aktiviert ist, dann wird es auch in Gitea verwendbar sein. | |||
- Wenn git >= 2.18, dann wird das Rendern von Commit-Graphen automatisch aktiviert. | |||
@@ -249,6 +249,17 @@ Windows, on architectures like amd64, i386, ARM, PowerPC, and others. | |||
- Webhooks | |||
- Git Hooks | |||
- Deploy keys | |||
- Package Registries | |||
- Composer | |||
- Conan | |||
- Container | |||
- Generic | |||
- Helm | |||
- Maven | |||
- NPM | |||
- Nuget | |||
- PyPI | |||
- RubyGems | |||
## System Requirements | |||
@@ -256,7 +267,7 @@ Windows, on architectures like amd64, i386, ARM, PowerPC, and others. | |||
- 2 CPU cores and 1GB RAM is typically sufficient for small teams/projects. | |||
- Gitea should be run with a dedicated non-root system account on UNIX-type systems. | |||
- Note: Gitea manages the `~/.ssh/authorized_keys` file. Running Gitea as a regular user could break that user's ability to log in. | |||
- [Git](https://git-scm.com/) version 1.7.2 or later is required. Version 1.9.0 or later is recommended. Also please note: | |||
- [Git](https://git-scm.com/) version 2.0.0 or later is required. | |||
- [Git Large File Storage](https://git-lfs.github.com/) will be available if enabled when Git >= 2.1.2. | |||
- Git commit-graph rendering will be enabled automatically when Git >= 2.18. | |||
@@ -267,22 +278,21 @@ Windows, on architectures like amd64, i386, ARM, PowerPC, and others. | |||
## Components | |||
* Web framework: [Chi](http://github.com/go-chi/chi) | |||
* Web server framework: [Chi](http://github.com/go-chi/chi) | |||
* ORM: [XORM](https://xorm.io) | |||
* UI components: | |||
* [Semantic UI](http://semantic-ui.com/) | |||
* [GitHub Octicons](https://octicons.github.com/) | |||
* [Font Awesome](http://fontawesome.io/) | |||
* [DropzoneJS](http://www.dropzonejs.com/) | |||
* [Highlight](https://highlightjs.org/) | |||
* [Clipboard](https://zenorocha.github.io/clipboard.js/) | |||
* [CodeMirror](https://codemirror.net/) | |||
* [jQuery MiniColors](https://github.com/claviska/jquery-minicolors) | |||
* UI frameworks: | |||
* [jQuery](https://jquery.com) | |||
* [Fomantic UI](https://fomantic-ui.com) | |||
* [Vue2](https://vuejs.org) | |||
* and various components (see package.json) | |||
* Editors: | |||
* [CodeMirror](https://codemirror.net) | |||
* [EasyMDE](https://github.com/Ionaru/easy-markdown-editor) | |||
* [Monaco Editor](https://microsoft.github.io/monaco-editor) | |||
* Database drivers: | |||
* [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) | |||
* [github.com/lib/pq](https://github.com/lib/pq) | |||
* [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) | |||
* [github.com/pingcap/tidb](https://github.com/pingcap/tidb) | |||
* [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) | |||
## Software and Service Support |
@@ -249,27 +249,24 @@ Le but de ce projet est de fournir de la manière la plus simple, la plus rapide | |||
## Navigateurs supportés | |||
- Consultez [Semantic UI](https://github.com/Semantic-Org/Semantic-UI#browser-support) pour la liste des navigateurs supportés. | |||
- La taille minimale supportée officielement est de **1024*768**, l'interface utilisateur peut toujours fonctionner à une taille plus petite, mais ce n'est pas garanti et les problèmes remontés ne seront pas corrigés. | |||
- Chrome, Firefox, Safari, Edge | |||
## Composants | |||
* Framework web : [Chi](http://github.com/go-chi/chi) | |||
* ORM: [XORM](https://xorm.io) | |||
* Interface graphique : | |||
* [Semantic UI](http://semantic-ui.com/) | |||
* [GitHub Octicons](https://octicons.github.com/) | |||
* [Font Awesome](http://fontawesome.io/) | |||
* [DropzoneJS](http://www.dropzonejs.com/) | |||
* [Highlight](https://highlightjs.org/) | |||
* [Clipboard](https://zenorocha.github.io/clipboard.js/) | |||
* [CodeMirror](https://codemirror.net/) | |||
* [jQuery MiniColors](https://github.com/claviska/jquery-minicolors) | |||
* [jQuery](https://jquery.com) | |||
* [Fomantic UI](https://fomantic-ui.com) | |||
* [Vue2](https://vuejs.org) | |||
* [CodeMirror](https://codemirror.net) | |||
* [EasyMDE](https://github.com/Ionaru/easy-markdown-editor) | |||
* [Monaco Editor](https://microsoft.github.io/monaco-editor) | |||
* ... (package.json) | |||
* Connecteurs de base de données : | |||
* [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) | |||
* [github.com/lib/pq](https://github.com/lib/pq) | |||
* [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) | |||
* [github.com/pingcap/tidb](https://github.com/pingcap/tidb) | |||
* [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) | |||
## Logiciels et services |
@@ -34,6 +34,7 @@ Gitea的首要目标是创建一个极易安装,运行非常快速,安装和 | |||
- 支持后台管理面板 | |||
- 支持 MySQL、PostgreSQL、SQLite3、MSSQL 和 TiDB(MySQL) 数据库 | |||
- 支持多语言本地化(21 种语言) | |||
- 支持软件包注册中心(Composer/Conan/Container/Generic/Helm/Maven/NPM/Nuget/PyPI/RubyGems) | |||
## 系统要求 | |||
@@ -42,27 +43,25 @@ Gitea的首要目标是创建一个极易安装,运行非常快速,安装和 | |||
## 浏览器支持 | |||
- 请根据 [Semantic UI](https://github.com/Semantic-Org/Semantic-UI#browser-support) 查看具体支持的浏览器版本。 | |||
- 官方支持的最小 UI 尺寸为 **1024*768**,UI 不一定会在更小尺寸的设备上被破坏,但我们无法保证且不会修复。 | |||
- Chrome, Firefox, Safari, Edge | |||
## 组件 | |||
* Web框架: [Chi](http://github.com/go-chi/chi) | |||
* ORM: [XORM](https://xorm.io) | |||
* UI组件: | |||
* [Semantic UI](http://semantic-ui.com/) | |||
* [GitHub Octicons](https://octicons.github.com/) | |||
* [Font Awesome](http://fontawesome.io/) | |||
* [DropzoneJS](http://www.dropzonejs.com/) | |||
* [Highlight](https://highlightjs.org/) | |||
* [Clipboard](https://zenorocha.github.io/clipboard.js/) | |||
* [CodeMirror](https://codemirror.net/) | |||
* [jQuery MiniColors](https://github.com/claviska/jquery-minicolors) | |||
* UI 框架: | |||
* [jQuery](https://jquery.com) | |||
* [Fomantic UI](https://fomantic-ui.com) | |||
* [Vue2](https://vuejs.org) | |||
* 更多组件参见 package.json | |||
* 编辑器: | |||
* [CodeMirror](https://codemirror.net) | |||
* [EasyMDE](https://github.com/Ionaru/easy-markdown-editor) | |||
* [Monaco Editor](https://microsoft.github.io/monaco-editor) | |||
* 数据库驱动: | |||
* [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) | |||
* [github.com/lib/pq](https://github.com/lib/pq) | |||
* [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) | |||
* [github.com/pingcap/tidb](https://github.com/pingcap/tidb) | |||
* [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) | |||
## 软件及服务支持 |
@@ -255,7 +255,7 @@ Gitea 是從 [Gogs](http://gogs.io) Fork 出來的,請閱讀部落格文章 [G | |||
- 在類 UNIX 系統上, 應該以專用的非 root 系統帳號來執行 Gitea。 | |||
- 備註:Gitea 管理著 `~/.ssh/authorized_keys` 檔案。以一般身份使用者執行 Gitea 可能會破壞該使用者的登入能力。 | |||
- [Git](https://git-scm.com/) 的最低需求為 1.7.2 或更新版本。建議使用 1.9.0 或更新版本。並請留意: | |||
- [Git](https://git-scm.com/) 的最低需求為 2.0 或更新版本。 | |||
- 當 git 版本 >= 2.1.2 時,可啟用 Git [large file storage](https://git-lfs.github.com/)。 | |||
- 當 git 版本 >= 2.18 時,將自動啟用 Git 提交線圖渲染。 | |||
@@ -269,20 +269,19 @@ Gitea 是從 [Gogs](http://gogs.io) Fork 出來的,請閱讀部落格文章 [G | |||
- Web 框架: [Chi](http://github.com/go-chi/chi) | |||
- ORM: [XORM](https://xorm.io) | |||
- UI 元件: | |||
- [Semantic UI](http://semantic-ui.com/) | |||
- [GitHub Octicons](https://octicons.github.com/) | |||
- [Font Awesome](http://fontawesome.io/) | |||
- [DropzoneJS](http://www.dropzonejs.com/) | |||
- [Highlight](https://highlightjs.org/) | |||
- [Clipboard](https://zenorocha.github.io/clipboard.js/) | |||
- [CodeMirror](https://codemirror.net/) | |||
- [jQuery MiniColors](https://github.com/claviska/jquery-minicolors) | |||
* [jQuery](https://jquery.com) | |||
* [Fomantic UI](https://fomantic-ui.com) | |||
* [Vue2](https://vuejs.org) | |||
* [CodeMirror](https://codemirror.net) | |||
* [EasyMDE](https://github.com/Ionaru/easy-markdown-editor) | |||
* [Monaco Editor](https://microsoft.github.io/monaco-editor) | |||
* ... (package.json) | |||
- 資料庫驅動程式: | |||
- [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) | |||
- [github.com/lib/pq](https://github.com/lib/pq) | |||
- [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) | |||
- [github.com/pingcap/tidb](https://github.com/pingcap/tidb) | |||
- [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) | |||
* [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) | |||
* [github.com/lib/pq](https://github.com/lib/pq) | |||
* [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) | |||
* [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) | |||
## 軟體和服務支援 | |||