Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kerwin612/us-giteapanel
Gitea Quick Operation Panel
https://github.com/kerwin612/us-giteapanel
gitea panel userscript
Last synced: 3 days ago
JSON representation
Gitea Quick Operation Panel
- Host: GitHub
- URL: https://github.com/kerwin612/us-giteapanel
- Owner: kerwin612
- License: mit
- Created: 2023-07-13T08:54:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-05T09:03:55.000Z (over 1 year ago)
- Last Synced: 2024-12-06T09:42:01.562Z (2 months ago)
- Topics: gitea, panel, userscript
- Homepage: https://openuserjs.org/scripts/kerwin612/GiteaPanel
- Size: 182 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gitea - US/GiteaPanel - A Gitea shortcut panel built based on UserScript. (Applications / Panel)
README
# GiteaPanel
**A Gitea shortcut panel built based on UserScript; The configuration information of the panel is stored in the user-defined gitea repository in case of loss.**## Preparation
1. Create a repository on your Gitea instance to store GiteaPanel custom data.
You can add mirror repo from [https://github.com/kerwin612/us-giteapanel](https://github.com/kerwin612/us-giteapanel)
2. Create a PAT(Access Token) in your Gitea profile.
The current Gitea profile settings page link is: **GITEA_HOST/user/settings/applications**## Install
[https://openuserjs.org/install/kerwin612/GiteaPanel.min.user.js](https://openuserjs.org/install/kerwin612/GiteaPanel.min.user.js)## Configuration
* `gitea_host` **Your Gitea instance host**
* `owner` **Your username on Gitea**
* `token` **Your PAT(Access Token) on Gitea**
* `repo` **repo where data is stored**
* `ref` **branch where the data is stored****GiteaPanel will get the configured main.js in the following way**
`GET -H 'accept': 'application/json' -H 'authorization': 'token ${token}' '${gitea_host}/api/v1/repos/${owner}/${repo}/contents/main.js?ref=${ref}'`### default
> /owner/us-giteapanel/raw/branch/customization/main.js
> more complete example, see: [us-giteapanel/customization](https://github.com/kerwin612/us-giteapanel/blob/customization/main.js)
```js
function main(ctx) {function showToken() {
alert(ctx.config.token);
}return {
labels: [
{
label: 'profile',
click: () => {
window.location.href = `/${ctx.config.owner}`;
}
},
{
label: 'token',
click: showToken
}
]
};}
```## Screenshot
* **settings**
![](./imgs/settings.png)* **example**
![](./imgs/panel1.png)* **customization**
![](./imgs/panel2.png)