!88 合并定制化logo、备案号和构建调试安装脚本
* 开发环境配置方法、CI脚本、安装脚本 * 备案号可配置BEIAN_NUMBER = 苏ICP备888888888号-1 in [server] of app.ini * custom logo feature in -/admin/config/settings
93
.gitea/workflows/devstar-studio-dev-ci.yaml
Normal file
@@ -0,0 +1,93 @@
|
||||
# devstar-studio-dev-ci.yaml
|
||||
# DevStar 测试并构建制品 CI 工作流定义
|
||||
#
|
||||
# Artifact命名规则:
|
||||
# 1. ${{ vars.DOCKER_REGISTRY_ADDRESS }}/${{ vars.DOCKER_REPOSITORY_ARTIFACT}}:latest
|
||||
# e.g., devstar.cn/devstar/devstar-studio:latest
|
||||
# 2. ${{ vars.DOCKER_REGISTRY_ADDRESS }}/${{ vars.DOCKER_REPOSITORY_ARTIFACT}}:rootless-dev-${{ gitea.sha }}
|
||||
# e.g., devstar.cn/devstar/devstar-studio:rootless-dev-0047d315a3f73cca0c18c641d24b0347456618d5
|
||||
# 其中,
|
||||
# - rootless 表示非 root 权限容器
|
||||
# - dev 表示开发版本
|
||||
# - ${{ gitea.sha }} 表示触发 CI Workflow 的 commit SHA
|
||||
#
|
||||
# 构建参数设置
|
||||
# 点击仓库 > 设置 > Actions > 密钥:
|
||||
# - ${{ secrets.DOCKER_REGISTRY_USERNAME }}: Docker Registry 用户名
|
||||
# - ${{ secrets.DOCKER_REGISTRY_PASSWORD }}: Docker Registry 密码
|
||||
# 点击仓库 > 设置 > Actions > 变量:
|
||||
# - ${{ vars.DOCKER_REGISTRY_ADDRESS }}: Docker Registry 域名, e.g., `devstar.cn`
|
||||
# - ${{ vars.DOCKER_REPOSITORY_ARTIFACT}}: 制品名称, e.g., `devstar/devstar-studio`
|
||||
#
|
||||
|
||||
name: DevStar Studio CI Pipeline
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-push-x86-64-docker-image:
|
||||
# Actual runs-on image: docker.io/library/gitea/runner_image:ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🔍 Check out repository code
|
||||
uses: https://devstar.cn/actions/checkout@v4
|
||||
with:
|
||||
ref: dev
|
||||
- name: 🔧 Test Codes and Build an Artifact
|
||||
run: |
|
||||
echo "Prepare to build repository code ${{ gitea.repository }}:${{ gitea.ref }}."
|
||||
make docker
|
||||
- name: 🚀 Push Artifact to devstar.cn and docker.io Registry
|
||||
run: |
|
||||
docker tag gitea/gitea:latest ${{ vars.DOCKER_REGISTRY_ADDRESS }}/${{ vars.DOCKER_REPOSITORY_ARTIFACT}}:rootless-dev-${{ gitea.sha }}
|
||||
docker tag gitea/gitea:latest ${{ vars.DOCKER_REGISTRY_ADDRESS }}/${{ vars.DOCKER_REPOSITORY_ARTIFACT}}:latest
|
||||
echo "${{ secrets.DOCKER_REGISTRY_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_REGISTRY_USERNAME }} ${{ vars.DOCKER_REGISTRY_ADDRESS }} --password-stdin
|
||||
docker push ${{ vars.DOCKER_REGISTRY_ADDRESS }}/${{ vars.DOCKER_REPOSITORY_ARTIFACT}}:rootless-dev-${{ gitea.sha }}
|
||||
docker push ${{ vars.DOCKER_REGISTRY_ADDRESS }}/${{ vars.DOCKER_REPOSITORY_ARTIFACT}}:latest
|
||||
GITHUB_TOKEN="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"; REPO="mengning/DevStar"; WORKFLOW_FILE="PushDevStarImage2DockerHub.yml"; BRANCH="main"; URL="https://api.github.com/repos/$REPO/actions/workflows/$WORKFLOW_FILE/dispatches"; response=$(curl -s -o /dev/null -w "%{http_code}" -X POST "$URL" -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" -d "{\"ref\":\"$BRANCH\"}"); if [ "$response" -eq 204 ]; then echo "将devstar-studio:latest同步到docker.io的Github工作流触发成功!"; else echo "将devstar-studio:latest同步到docker.io的Github工作流触发失败:HTTP 状态码 $response"; fi
|
||||
# docker tag devstar-controller-manager:latest ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-controller-manager:rootless-dev-${{ gitea.sha }}
|
||||
# docker tag devstar-controller-manager:latest ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-controller-manager:latest
|
||||
# echo "${{ secrets.DOCKER_REGISTRY_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_REGISTRY_USERNAME }} ${{ vars.DOCKER_REGISTRY_ADDRESS }} --password-stdin
|
||||
# docker push ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-controller-manager:rootless-dev-${{ gitea.sha }}
|
||||
# docker push ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-controller-manager:latest
|
||||
- name: 🍏 Job Status Report
|
||||
run: |
|
||||
echo "🍏 This job's status is ${{ job.status }}."
|
||||
echo "Output Artifact: ${{ vars.DOCKER_REGISTRY_ADDRESS }}/${{ vars.DOCKER_REPOSITORY_ARTIFACT}}:rootless-dev-${{ gitea.sha }}"
|
||||
echo "=> Artifact Tag: latest"
|
||||
echo "=> Artifact Tag: rootless-dev-${{ gitea.sha }}"
|
||||
# echo "Output Artifact: ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-controller-manager:rootless-dev-${{ gitea.sha }}"
|
||||
# echo "=> Artifact Tag: latest"
|
||||
# echo "=> Artifact Tag: rootless-dev-${{ gitea.sha }}"
|
||||
- name: 📝 Update dev.devstar.cn
|
||||
run: |
|
||||
curl -LO https://mirrors.ustc.edu.cn/kubernetes/core%3A/stable%3A/v1.28/deb/amd64/kubectl_1.28.0-1.1_amd64.deb
|
||||
sudo dpkg -i kubectl_1.28.0-1.1_amd64.deb
|
||||
kubectl config set-cluster remote-cluster --server=${{ secrets.K8S_URL }} --insecure-skip-tls-verify=true
|
||||
kubectl config set-credentials token-user --token=${{ secrets.K8S_TOKEN }}
|
||||
kubectl config set-context remote-context --cluster=remote-cluster --user=token-user
|
||||
kubectl config use-context remote-context
|
||||
kubectl set image deployment/dev-devstar-studio-gitea gitea=${{ vars.DOCKER_REGISTRY_ADDRESS }}/${{ vars.DOCKER_REPOSITORY_ARTIFACT}}:rootless-dev-${{ gitea.sha }} -n devstar-studio-ns
|
||||
|
||||
|
||||
#
|
||||
# P.S.:
|
||||
################################################################################
|
||||
# 1. How to config runner:
|
||||
# $ docker run \
|
||||
# --name gitea-act-runner-repo-devstar-studio \
|
||||
# -d \
|
||||
# -e GITEA_INSTANCE_URL=https://www.devstar.cn \
|
||||
# -e GITEA_RUNNER_REGISTRATION_TOKEN=${YOUR_GITEA_RUNNER_REGISTRATION_TOKEN} \
|
||||
# -v /var/run/docker.sock:/var/run/docker.sock \
|
||||
# gitea/act_runner:latest
|
||||
#
|
||||
# 2. To clean the docker cache:
|
||||
# $ docker builder prune --force
|
||||
# $ if [ "$(docker volume ls -qf dangling=true)" ]; then docker volume rm $(docker volume ls -qf dangling=true); fi
|
||||
#
|
||||
82
README.md
@@ -1,14 +1,14 @@
|
||||
# Gitea
|
||||
# DevStar
|
||||
|
||||
[](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml?query=branch%3Amain "Release Nightly")
|
||||
[](https://github.com/mengning/DevStar/actions/workflows/release-nightly.yml?query=branch%3Amain "Release Nightly")
|
||||
[](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea")
|
||||
[](https://goreportcard.com/report/code.gitea.io/gitea "Go Report Card")
|
||||
[](https://pkg.go.dev/code.gitea.io/gitea "GoDoc")
|
||||
[](https://github.com/go-gitea/gitea/releases/latest "GitHub release")
|
||||
[](https://github.com/mengning/DevStar/releases/latest "GitHub release")
|
||||
[](https://www.codetriage.com/go-gitea/gitea "Help Contribute to Open Source")
|
||||
[](https://opencollective.com/gitea "Become a backer/sponsor of gitea")
|
||||
[](https://opensource.org/licenses/MIT "License: MIT")
|
||||
[](https://gitpod.io/#https://github.com/go-gitea/gitea)
|
||||
[](https://gitpod.io/#https://github.com/mengning/DevStar)
|
||||
[](https://translate.gitea.com "Crowdin")
|
||||
|
||||
[繁體中文](./README.zh-tw.md) | [简体中文](./README.zh-cn.md)
|
||||
@@ -25,7 +25,7 @@ This project has been
|
||||
[forked](https://blog.gitea.com/welcome-to-gitea/) from
|
||||
[Gogs](https://gogs.io) since November of 2016, but a lot has changed.
|
||||
|
||||
For online demonstrations, you can visit [demo.gitea.com](https://demo.gitea.com).
|
||||
For online demonstrations, you can visit [DevStar.cn](https://DevStar.cn).
|
||||
|
||||
For accessing free Gitea service (with a limited number of repositories), you can visit [gitea.com](https://gitea.com/user/login).
|
||||
|
||||
@@ -47,7 +47,7 @@ From the root of the source tree, run:
|
||||
|
||||
or if SQLite support is required:
|
||||
|
||||
TAGS="bindata sqlite sqlite_unlock_notify" make build
|
||||
TAGS="bindata timetzdata sqlite sqlite_unlock_notify" make build
|
||||
|
||||
The `build` target is split into two sub-targets:
|
||||
|
||||
@@ -67,10 +67,72 @@ After building, a binary file named `gitea` will be generated in the root of the
|
||||
> [!NOTE]
|
||||
> If you're interested in using our APIs, we have experimental support with [documentation](https://docs.gitea.com/api).
|
||||
|
||||
Start from Container Image:
|
||||
|
||||
```
|
||||
make docker
|
||||
public/assets/install.sh start --image=gitea/gitea:latest
|
||||
|
||||
# 查看日志
|
||||
public/assets/install.sh logs
|
||||
# 停止并删除devstar-studio容器
|
||||
public/assets/install.sh clean
|
||||
# 删除所有容器
|
||||
sudo docker stop $(docker ps -aq) && sudo docker rm -f $(docker ps -aq)
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Expected workflow is: Fork -> Patch -> Push -> Pull Request
|
||||
|
||||
如果您是在Windows环境下,请在cmd命令行下先运行如下命令:
|
||||
|
||||
```
|
||||
wsl --install -d Ubuntu-20.04 && wsl --setdefault Ubuntu-20.04
|
||||
```
|
||||
|
||||
在Ubuntu-20.04下完成安装:
|
||||
|
||||
```bash
|
||||
# download and install go
|
||||
wget -c https://go.dev/dl/go1.23.3.linux-amd64.tar.gz
|
||||
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.23.3.linux-amd64.tar.gz
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
go version
|
||||
|
||||
# download and install Node.js
|
||||
wget -c https://nodejs.org/dist/v22.11.0/node-v22.11.0-linux-x64.tar.xz
|
||||
sudo tar -xf node-v22.11.0-linux-x64.tar.xz -C /usr/local/
|
||||
echo 'export PATH=/usr/local/node-v22.11.0-linux-x64/bin:$PATH' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
node -v # should print `v22.11.0`
|
||||
npm -v # should print `10.9.0`
|
||||
```
|
||||
|
||||
在DevStar Git仓库创建分支
|
||||
```
|
||||
git clone https://gitee.com/devstar/devstar.git
|
||||
git checkout -b YOUR_BRANCH
|
||||
code devstar
|
||||
|
||||
# in VS Code Terminal
|
||||
TAGS="timetzdata sqlite sqlite_unlock_notify" make watch # for debuging
|
||||
make test # testing
|
||||
TAGS="bindata timetzdata sqlite sqlite_unlock_notify" make build # 生成可执行文件
|
||||
./gitea
|
||||
|
||||
# 提交代码
|
||||
git add FILES
|
||||
git commit -m "commit log"
|
||||
git push
|
||||
```
|
||||
|
||||
在DevStar Git仓库发起Pull Request,合并代码后会自动触发CI流水线完成容器镜像的构建并上传到devstar.cn/devstar/devstar-studio:latest
|
||||
|
||||
```
|
||||
public/assets/install.sh start
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> 1. **YOU MUST READ THE [CONTRIBUTORS GUIDE](CONTRIBUTING.md) BEFORE STARTING TO WORK ON A PULL REQUEST.**
|
||||
@@ -101,7 +163,7 @@ If you have questions that are not covered by the [documentation](https://docs.g
|
||||
## Authors
|
||||
|
||||
- [Maintainers](https://github.com/orgs/go-gitea/people)
|
||||
- [Contributors](https://github.com/go-gitea/gitea/graphs/contributors)
|
||||
- [Contributors](https://github.com/mengning/DevStar/graphs/contributors)
|
||||
- [Translators](options/locale/TRANSLATORS)
|
||||
|
||||
## Backers
|
||||
@@ -133,16 +195,16 @@ Gitea is pronounced [/ɡɪ’ti:/](https://youtu.be/EM71-2uDAoY) as in "gi-tea"
|
||||
|
||||
**Why is this not hosted on a Gitea instance?**
|
||||
|
||||
We're [working on it](https://github.com/go-gitea/gitea/issues/1029).
|
||||
We're [working on it](https://github.com/mengning/DevStar/issues/1029).
|
||||
|
||||
**Where can I find the security patches?**
|
||||
|
||||
In the [release log](https://github.com/go-gitea/gitea/releases) or the [change log](https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md), search for the keyword `SECURITY` to find the security patches.
|
||||
In the [release log](https://github.com/mengning/DevStar/releases) or the [change log](https://github.com/mengning/DevStar/blob/main/CHANGELOG.md), search for the keyword `SECURITY` to find the security patches.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License.
|
||||
See the [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) file
|
||||
See the [LICENSE](https://github.com/mengning/DevStar/blob/main/LICENSE) file
|
||||
for the full license text.
|
||||
|
||||
## Further information
|
||||
|
||||
@@ -1,31 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" id="main_outline" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
||||
y="0px" viewBox="0 0 640 640" style="enable-background:new 0 0 640 640;" xml:space="preserve">
|
||||
<g>
|
||||
<path id="teabag" style="fill:#FFFFFF" d="M395.9,484.2l-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5,21.2-17.9,33.8-11.8
|
||||
c17.2,8.3,27.1,13,27.1,13l-0.1-109.2l16.7-0.1l0.1,117.1c0,0,57.4,24.2,83.1,40.1c3.7,2.3,10.2,6.8,12.9,14.4
|
||||
c2.1,6.1,2,13.1-1,19.3l-61,126.9C423.6,484.9,408.4,490.3,395.9,484.2z"/>
|
||||
<g>
|
||||
<g>
|
||||
<path style="fill:#609926" d="M622.7,149.8c-4.1-4.1-9.6-4-9.6-4s-117.2,6.6-177.9,8c-13.3,0.3-26.5,0.6-39.6,0.7c0,39.1,0,78.2,0,117.2
|
||||
c-5.5-2.6-11.1-5.3-16.6-7.9c0-36.4-0.1-109.2-0.1-109.2c-29,0.4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5
|
||||
c-9.8-0.6-22.5-2.1-39,1.5c-8.7,1.8-33.5,7.4-53.8,26.9C-4.9,212.4,6.6,276.2,8,285.8c1.7,11.7,6.9,44.2,31.7,72.5
|
||||
c45.8,56.1,144.4,54.8,144.4,54.8s12.1,28.9,30.6,55.5c25,33.1,50.7,58.9,75.7,62c63,0,188.9-0.1,188.9-0.1s12,0.1,28.3-10.3
|
||||
c14-8.5,26.5-23.4,26.5-23.4s12.9-13.8,30.9-45.3c5.5-9.7,10.1-19.1,14.1-28c0,0,55.2-117.1,55.2-231.1
|
||||
C633.2,157.9,624.7,151.8,622.7,149.8z M125.6,353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6,321.8,60,295.4
|
||||
c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5,38.5-30c13.8-3.7,31-3.1,31-3.1s7.1,59.4,15.7,94.2c7.2,29.2,24.8,77.7,24.8,77.7
|
||||
S142.5,359.9,125.6,353.9z M425.9,461.5c0,0-6.1,14.5-19.6,15.4c-5.8,0.4-10.3-1.2-10.3-1.2s-0.3-0.1-5.3-2.1l-112.9-55
|
||||
c0,0-10.9-5.7-12.8-15.6c-2.2-8.1,2.7-18.1,2.7-18.1L322,273c0,0,4.8-9.7,12.2-13c0.6-0.3,2.3-1,4.5-1.5c8.1-2.1,18,2.8,18,2.8
|
||||
l110.7,53.7c0,0,12.6,5.7,15.3,16.2c1.9,7.4-0.5,14-1.8,17.2C474.6,363.8,425.9,461.5,425.9,461.5z"/>
|
||||
<path style="fill:#609926" d="M326.8,380.1c-8.2,0.1-15.4,5.8-17.3,13.8c-1.9,8,2,16.3,9.1,20c7.7,4,17.5,1.8,22.7-5.4
|
||||
c5.1-7.1,4.3-16.9-1.8-23.1l24-49.1c1.5,0.1,3.7,0.2,6.2-0.5c4.1-0.9,7.1-3.6,7.1-3.6c4.2,1.8,8.6,3.8,13.2,6.1
|
||||
c4.8,2.4,9.3,4.9,13.4,7.3c0.9,0.5,1.8,1.1,2.8,1.9c1.6,1.3,3.4,3.1,4.7,5.5c1.9,5.5-1.9,14.9-1.9,14.9
|
||||
c-2.3,7.6-18.4,40.6-18.4,40.6c-8.1-0.2-15.3,5-17.7,12.5c-2.6,8.1,1.1,17.3,8.9,21.3c7.8,4,17.4,1.7,22.5-5.3
|
||||
c5-6.8,4.6-16.3-1.1-22.6c1.9-3.7,3.7-7.4,5.6-11.3c5-10.4,13.5-30.4,13.5-30.4c0.9-1.7,5.7-10.3,2.7-21.3
|
||||
c-2.5-11.4-12.6-16.7-12.6-16.7c-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3c4.7-9.7,9.4-19.3,14.1-29
|
||||
c-4.1-2-8.1-4-12.2-6.1c-4.8,9.8-9.7,19.7-14.5,29.5c-6.7-0.1-12.9,3.5-16.1,9.4c-3.4,6.3-2.7,14.1,1.9,19.8
|
||||
C343.2,346.5,335,363.3,326.8,380.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Creator: CorelDRAW X7 -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="41.7913mm" height="41.6859mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
|
||||
viewBox="0 0 1079 1076"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.fil1 {fill:#003CA8}
|
||||
.fil0 {fill:#FF8812}
|
||||
]]>
|
||||
</style>
|
||||
</defs>
|
||||
<g id="图层_x0020_1">
|
||||
<metadata id="CorelCorpID_0Corel-Layer"/>
|
||||
<path class="fil0" d="M825 432l0 0c12,-2 19,13 10,21l0 0c-58,48 -84,124 -68,198l0 0c3,12 -13,20 -21,10l0 0c-45,-54 -115,-81 -185,-70 -108,58 -231,135 -303,214 -86,92 -100,229 49,248 -427,118 -464,-256 244,-492 49,-48 70,-119 55,-187l0 0c-2,-12 13,-19 21,-10l0 0c48,58 124,84 198,68z"/>
|
||||
<path class="fil1" d="M636 0c102,0 187,30 253,80 75,55 127,135 158,226l0 0c11,32 19,65 24,98 5,35 8,70 7,105 0,34 -3,69 -8,103 -6,34 -14,67 -24,99 -32,94 -85,178 -160,236 -67,53 -150,84 -250,84l-267 0c-55,0 -91,-10 -112,-28 -19,-17 -25,-39 -22,-64 4,-24 15,-51 33,-78 60,-92 225,-230 320,-253 -101,59 -189,170 -231,243l279 0c57,0 105,-19 144,-51 44,-36 76,-88 95,-146 8,-23 14,-47 18,-71 4,-25 6,-50 6,-75 0,-25 -2,-50 -6,-74 -3,-24 -9,-48 -17,-70l0 0c-18,-55 -49,-103 -93,-136 -38,-30 -88,-47 -147,-47l0 0 -141 0 -68 0c-26,0 -51,4 -73,13 -22,9 -43,23 -61,42 -18,18 -32,38 -42,61 -9,22 -13,46 -13,72l0 213c135,-43 226,-51 307,-33 -160,29 -354,110 -474,221l-14 13 0 -19 0 -428 0 0 0 0c0,-94 38,-178 98,-238 61,-61 145,-98 238,-98l0 0 1 0 0 0 242 0 0 0z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 2.5 KiB repo.diff.file_after repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 1.7 KiB |
@@ -1,31 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" id="main_outline" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
||||
y="0px" viewBox="0 0 640 640" style="enable-background:new 0 0 640 640;" xml:space="preserve">
|
||||
<g>
|
||||
<path id="teabag" style="fill:#FFFFFF" d="M395.9,484.2l-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5,21.2-17.9,33.8-11.8
|
||||
c17.2,8.3,27.1,13,27.1,13l-0.1-109.2l16.7-0.1l0.1,117.1c0,0,57.4,24.2,83.1,40.1c3.7,2.3,10.2,6.8,12.9,14.4
|
||||
c2.1,6.1,2,13.1-1,19.3l-61,126.9C423.6,484.9,408.4,490.3,395.9,484.2z"/>
|
||||
<g>
|
||||
<g>
|
||||
<path style="fill:#609926" d="M622.7,149.8c-4.1-4.1-9.6-4-9.6-4s-117.2,6.6-177.9,8c-13.3,0.3-26.5,0.6-39.6,0.7c0,39.1,0,78.2,0,117.2
|
||||
c-5.5-2.6-11.1-5.3-16.6-7.9c0-36.4-0.1-109.2-0.1-109.2c-29,0.4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5
|
||||
c-9.8-0.6-22.5-2.1-39,1.5c-8.7,1.8-33.5,7.4-53.8,26.9C-4.9,212.4,6.6,276.2,8,285.8c1.7,11.7,6.9,44.2,31.7,72.5
|
||||
c45.8,56.1,144.4,54.8,144.4,54.8s12.1,28.9,30.6,55.5c25,33.1,50.7,58.9,75.7,62c63,0,188.9-0.1,188.9-0.1s12,0.1,28.3-10.3
|
||||
c14-8.5,26.5-23.4,26.5-23.4s12.9-13.8,30.9-45.3c5.5-9.7,10.1-19.1,14.1-28c0,0,55.2-117.1,55.2-231.1
|
||||
C633.2,157.9,624.7,151.8,622.7,149.8z M125.6,353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6,321.8,60,295.4
|
||||
c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5,38.5-30c13.8-3.7,31-3.1,31-3.1s7.1,59.4,15.7,94.2c7.2,29.2,24.8,77.7,24.8,77.7
|
||||
S142.5,359.9,125.6,353.9z M425.9,461.5c0,0-6.1,14.5-19.6,15.4c-5.8,0.4-10.3-1.2-10.3-1.2s-0.3-0.1-5.3-2.1l-112.9-55
|
||||
c0,0-10.9-5.7-12.8-15.6c-2.2-8.1,2.7-18.1,2.7-18.1L322,273c0,0,4.8-9.7,12.2-13c0.6-0.3,2.3-1,4.5-1.5c8.1-2.1,18,2.8,18,2.8
|
||||
l110.7,53.7c0,0,12.6,5.7,15.3,16.2c1.9,7.4-0.5,14-1.8,17.2C474.6,363.8,425.9,461.5,425.9,461.5z"/>
|
||||
<path style="fill:#609926" d="M326.8,380.1c-8.2,0.1-15.4,5.8-17.3,13.8c-1.9,8,2,16.3,9.1,20c7.7,4,17.5,1.8,22.7-5.4
|
||||
c5.1-7.1,4.3-16.9-1.8-23.1l24-49.1c1.5,0.1,3.7,0.2,6.2-0.5c4.1-0.9,7.1-3.6,7.1-3.6c4.2,1.8,8.6,3.8,13.2,6.1
|
||||
c4.8,2.4,9.3,4.9,13.4,7.3c0.9,0.5,1.8,1.1,2.8,1.9c1.6,1.3,3.4,3.1,4.7,5.5c1.9,5.5-1.9,14.9-1.9,14.9
|
||||
c-2.3,7.6-18.4,40.6-18.4,40.6c-8.1-0.2-15.3,5-17.7,12.5c-2.6,8.1,1.1,17.3,8.9,21.3c7.8,4,17.4,1.7,22.5-5.3
|
||||
c5-6.8,4.6-16.3-1.1-22.6c1.9-3.7,3.7-7.4,5.6-11.3c5-10.4,13.5-30.4,13.5-30.4c0.9-1.7,5.7-10.3,2.7-21.3
|
||||
c-2.5-11.4-12.6-16.7-12.6-16.7c-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3c4.7-9.7,9.4-19.3,14.1-29
|
||||
c-4.1-2-8.1-4-12.2-6.1c-4.8,9.8-9.7,19.7-14.5,29.5c-6.7-0.1-12.9,3.5-16.1,9.4c-3.4,6.3-2.7,14.1,1.9,19.8
|
||||
C343.2,346.5,335,363.3,326.8,380.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Creator: CorelDRAW X7 -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="167.952mm" height="41.6859mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
|
||||
viewBox="0 0 17419 4323"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.fil1 {fill:#003CA8}
|
||||
.fil0 {fill:#FF8812}
|
||||
.fil2 {fill:#003CA8;fill-rule:nonzero}
|
||||
]]>
|
||||
</style>
|
||||
</defs>
|
||||
<g id="图层_x0020_1">
|
||||
<metadata id="CorelCorpID_0Corel-Layer"/>
|
||||
<path class="fil0" d="M3315 1737l0 0c48,-10 78,51 40,83l0 0c-232,194 -337,501 -273,796l0 0c11,49 -51,79 -83,41l0 0c-182,-219 -464,-325 -743,-283 -437,234 -929,545 -1221,860 -345,372 -399,922 201,999 -1718,474 -1865,-1028 977,-1978 197,-194 282,-477 223,-750l0 0c-10,-49 51,-79 83,-41l0 0c194,232 500,337 796,273z"/>
|
||||
<path class="fil1" d="M2555 1c412,0 752,120 1020,320 299,222 509,544 632,909l0 0c43,127 75,259 96,395 22,138 32,278 31,419 0,140 -12,279 -34,416 -22,136 -55,270 -98,398 -127,379 -341,715 -640,949 -269,210 -606,337 -1007,337l-1073 0c-222,0 -365,-43 -447,-114 -78,-67 -103,-156 -89,-258 13,-96 60,-202 130,-311 241,-372 903,-925 1287,-1019 -407,237 -761,685 -930,977l1122 0c230,0 423,-77 579,-205 176,-143 304,-351 383,-585 31,-92 54,-189 70,-287 16,-99 25,-200 25,-301 1,-100 -7,-201 -22,-299 -15,-96 -38,-190 -68,-280l0 0c-74,-220 -199,-413 -374,-546 -156,-118 -353,-190 -593,-190l0 0 -567 1 -273 -1c-105,-1 -202,18 -292,55 -89,37 -171,92 -245,166 -75,74 -130,156 -167,245 -37,90 -56,187 -56,292l0 857c542,-176 910,-209 1236,-136 -642,116 -1423,443 -1906,889l-55 51 0 -75 0 -1719 0 -2 0 0c1,-375 151,-712 395,-956 243,-243 581,-393 956,-393l0 0 2 0 0 0 972 2 0 -1z"/>
|
||||
<path class="fil2" d="M7222 2023c0,153 -12,287 -37,403 -14,66 -30,124 -48,175 -18,52 -45,108 -82,170 -102,175 -235,296 -398,361 -132,50 -313,75 -542,75l-1141 0 0 -2388 821 -7 282 0 212 14c324,0 567,119 729,358 136,205 204,485 204,839zm-1346 -679l-333 0 0 1356 320 3c266,0 454,-42 565,-126 128,-96 191,-278 191,-547 0,-264 -59,-447 -177,-549 -109,-92 -298,-137 -566,-137zm3132 1155l-1144 0c34,87 76,151 126,192 50,40 120,60 211,60l784 0 -249 456 -497 0 -147 0 -146 0c-241,0 -417,-93 -529,-280 -88,-151 -132,-360 -132,-629 0,-285 72,-507 218,-667 145,-159 360,-240 644,-240 308,0 533,79 674,236 132,149 198,381 198,695l0 64 0 79 -11 34zm-1154 -385l599 0c-9,-100 -33,-173 -71,-218 -21,-23 -49,-41 -84,-55 -35,-13 -78,-20 -128,-20 -190,0 -296,97 -316,293zm1772 -709l382 1097 371 -1097 603 0 -661 1802 -627 0 -674 -1802 606 0zm3644 -116l-1336 0c-202,0 -324,33 -324,223 0,187 257,216 429,210l276 -10c513,0 842,211 842,744 0,554 -293,751 -831,751l-1295 0 0 -470 1077 0c223,0 453,-2 453,-237 0,-186 -230,-220 -406,-213l-225 14c-286,0 -506,-31 -684,-184 -153,-132 -229,-330 -229,-594 0,-581 395,-704 934,-704l1678 0 -359 470zm1157 116l-233 463 -297 0 0 569c0,269 59,317 344,317l-251 464c-606,0 -662,-210 -662,-811l0 -539 -242 0 811 -1057 0 594 530 0zm1546 1063l0 739 -569 0 0 -354 -245 354 -201 0c-232,0 -403,-35 -515,-106 -138,-91 -207,-247 -207,-468 0,-214 56,-367 170,-457 102,-78 262,-117 480,-117l518 0 0 -37c0,-62 -14,-103 -42,-125 -29,-21 -77,-32 -145,-32l-821 0 231 -460 445 0c429,0 694,73 796,218 34,51 60,147 78,286 18,139 27,326 27,559zm-1158 150c0,39 18,71 54,99 41,22 108,34 201,34l55 0 279 0 0 -273 -395 0c-57,0 -103,10 -140,29 -36,20 -54,56 -54,111zm1868 -859l228 -354 508 0 -263 460 -204 0c-113,0 -190,31 -228,92 -27,48 -41,137 -41,267l0 983 -569 0 0 -1802 569 0 0 354z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 2.5 KiB repo.diff.file_after repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 3.6 KiB |
@@ -99,6 +99,21 @@ func SetSettings(ctx context.Context, settings map[string]string) error {
|
||||
})
|
||||
}
|
||||
|
||||
func SetSetting(ctx context.Context, key, value string) error {
|
||||
return SetSettings(ctx, map[string]string{key: value})
|
||||
}
|
||||
|
||||
func GetSetting(ctx context.Context, key string) (string, error) {
|
||||
setting, exist, err := db.Get[Setting](ctx, builder.Eq{"setting_key": key})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if !exist {
|
||||
return "", nil
|
||||
}
|
||||
return setting.SettingValue, nil
|
||||
}
|
||||
|
||||
type dbConfigCachedGetter struct {
|
||||
mu sync.RWMutex
|
||||
|
||||
|
||||
@@ -120,6 +120,9 @@ var (
|
||||
AbsoluteAssetURL string
|
||||
|
||||
ManifestData string
|
||||
|
||||
BeianNumber string // 网站备案号, e.g. 苏ICP备88888888888号-1
|
||||
|
||||
)
|
||||
|
||||
// MakeManifestData generates web app manifest JSON
|
||||
@@ -183,11 +186,12 @@ func MakeAbsoluteAssetURL(appURL, staticURLPrefix string) string {
|
||||
|
||||
func loadServerFrom(rootCfg ConfigProvider) {
|
||||
sec := rootCfg.Section("server")
|
||||
AppName = rootCfg.Section("").Key("APP_NAME").MustString("Gitea: Git with a cup of tea")
|
||||
AppName = rootCfg.Section("").Key("APP_NAME").MustString("DevStar Studio")
|
||||
|
||||
Domain = sec.Key("DOMAIN").MustString("localhost")
|
||||
HTTPAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0")
|
||||
HTTPPort = sec.Key("HTTP_PORT").MustString("3000")
|
||||
BeianNumber = sec.Key("BEIAN_NUMBER").MustString("")
|
||||
|
||||
// DEPRECATED should not be removed because users maybe upgrade from lower version to the latest version
|
||||
// if these are removed, the warning will not be shown
|
||||
|
||||
@@ -158,6 +158,9 @@ func NewFuncMap() template.FuncMap {
|
||||
|
||||
"FilenameIsImage": filenameIsImage,
|
||||
"TabSizeClass": tabSizeClass,
|
||||
"BeianNumber": func() string {
|
||||
return setting.BeianNumber
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3411,6 +3411,10 @@ config.session_life_time = Session Life Time
|
||||
config.https_only = HTTPS Only
|
||||
config.cookie_life_time = Cookie Life Time
|
||||
|
||||
config.app_logo_config = Application Logo Configuration
|
||||
config.choose_new_logo = Choose New Logo
|
||||
config.update_logo = Update Logo
|
||||
|
||||
config.picture_config = Picture and Avatar Configuration
|
||||
config.picture_service = Picture Service
|
||||
config.disable_gravatar = Disable Gravatar
|
||||
|
||||
@@ -3400,6 +3400,10 @@ config.session_life_time=Session 生命周期
|
||||
config.https_only=仅限 HTTPS
|
||||
config.cookie_life_time=Cookie 生命周期
|
||||
|
||||
config.app_logo_config = Logo图标设置
|
||||
config.choose_new_logo = 选择新的Logo图标
|
||||
config.update_logo = 更新Logo图标
|
||||
|
||||
config.picture_config=图片和头像配置
|
||||
config.picture_service=图片服务
|
||||
config.disable_gravatar=禁用 Gravatar 头像
|
||||
|
||||
repo.diff.bin
public/assets/img/apple-touch-icon.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 3.1 KiB repo.diff.file_after repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 16 KiB |
repo.diff.bin
public/assets/img/avatar_default.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 4.8 KiB repo.diff.file_after repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 26 KiB |
repo.diff.bin
public/assets/img/favicon.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 4.2 KiB repo.diff.file_after repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 26 KiB |
@@ -1 +1,20 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 640 640" width="32" height="32"><path d="m395.9 484.2-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8 17.2 8.3 27.1 13 27.1 13l-.1-109.2 16.7-.1.1 117.1s57.4 24.2 83.1 40.1c3.7 2.3 10.2 6.8 12.9 14.4 2.1 6.1 2 13.1-1 19.3l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12" style="fill:#fff"/><path d="M622.7 149.8c-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.3.3-26.5.6-39.6.7v117.2c-5.5-2.6-11.1-5.3-16.6-7.9 0-36.4-.1-109.2-.1-109.2-29 .4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5c-9.8-.6-22.5-2.1-39 1.5-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6M125.6 353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1s7.1 59.4 15.7 94.2c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1m300.3 107.6s-6.1 14.5-19.6 15.4c-5.8.4-10.3-1.2-10.3-1.2s-.3-.1-5.3-2.1l-112.9-55s-10.9-5.7-12.8-15.6c-2.2-8.1 2.7-18.1 2.7-18.1L322 273s4.8-9.7 12.2-13c.6-.3 2.3-1 4.5-1.5 8.1-2.1 18 2.8 18 2.8L467.4 315s12.6 5.7 15.3 16.2c1.9 7.4-.5 14-1.8 17.2-6.3 15.4-55 113.1-55 113.1" style="fill:#609926"/><path d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8s2 16.3 9.1 20c7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3s17.4 1.7 22.5-5.3c5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8z" style="fill:#609926"/></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Creator: CorelDRAW X7 -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="41.7913mm" height="41.6859mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
|
||||
viewBox="0 0 1079 1076"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.fil1 {fill:#003CA8}
|
||||
.fil0 {fill:#FF8812}
|
||||
]]>
|
||||
</style>
|
||||
</defs>
|
||||
<g id="图层_x0020_1">
|
||||
<metadata id="CorelCorpID_0Corel-Layer"/>
|
||||
<path class="fil0" d="M825 432l0 0c12,-2 19,13 10,21l0 0c-58,48 -84,124 -68,198l0 0c3,12 -13,20 -21,10l0 0c-45,-54 -115,-81 -185,-70 -108,58 -231,135 -303,214 -86,92 -100,229 49,248 -427,118 -464,-256 244,-492 49,-48 70,-119 55,-187l0 0c-2,-12 13,-19 21,-10l0 0c48,58 124,84 198,68z"/>
|
||||
<path class="fil1" d="M636 0c102,0 187,30 253,80 75,55 127,135 158,226l0 0c11,32 19,65 24,98 5,35 8,70 7,105 0,34 -3,69 -8,103 -6,34 -14,67 -24,99 -32,94 -85,178 -160,236 -67,53 -150,84 -250,84l-267 0c-55,0 -91,-10 -112,-28 -19,-17 -25,-39 -22,-64 4,-24 15,-51 33,-78 60,-92 225,-230 320,-253 -101,59 -189,170 -231,243l279 0c57,0 105,-19 144,-51 44,-36 76,-88 95,-146 8,-23 14,-47 18,-71 4,-25 6,-50 6,-75 0,-25 -2,-50 -6,-74 -3,-24 -9,-48 -17,-70l0 0c-18,-55 -49,-103 -93,-136 -38,-30 -88,-47 -147,-47l0 0 -141 0 -68 0c-26,0 -51,4 -73,13 -22,9 -43,23 -61,42 -18,18 -32,38 -42,61 -9,22 -13,46 -13,72l0 213c135,-43 226,-51 307,-33 -160,29 -354,110 -474,221l-14 13 0 -19 0 -428 0 0 0 0c0,-94 38,-178 98,-238 61,-61 145,-98 238,-98l0 0 1 0 0 0 242 0 0 0z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 2.1 KiB repo.diff.file_after repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 1.7 KiB |
repo.diff.bin
public/assets/img/logo.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 14 KiB repo.diff.file_after repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 68 KiB |
@@ -1 +1,22 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 640 640" width="32" height="32"><path d="m395.9 484.2-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8 17.2 8.3 27.1 13 27.1 13l-.1-109.2 16.7-.1.1 117.1s57.4 24.2 83.1 40.1c3.7 2.3 10.2 6.8 12.9 14.4 2.1 6.1 2 13.1-1 19.3l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12" style="fill:#fff"/><path d="M622.7 149.8c-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.3.3-26.5.6-39.6.7v117.2c-5.5-2.6-11.1-5.3-16.6-7.9 0-36.4-.1-109.2-.1-109.2-29 .4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5c-9.8-.6-22.5-2.1-39 1.5-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6M125.6 353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1s7.1 59.4 15.7 94.2c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1m300.3 107.6s-6.1 14.5-19.6 15.4c-5.8.4-10.3-1.2-10.3-1.2s-.3-.1-5.3-2.1l-112.9-55s-10.9-5.7-12.8-15.6c-2.2-8.1 2.7-18.1 2.7-18.1L322 273s4.8-9.7 12.2-13c.6-.3 2.3-1 4.5-1.5 8.1-2.1 18 2.8 18 2.8L467.4 315s12.6 5.7 15.3 16.2c1.9 7.4-.5 14-1.8 17.2-6.3 15.4-55 113.1-55 113.1" style="fill:#609926"/><path d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8s2 16.3 9.1 20c7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3s17.4 1.7 22.5-5.3c5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8z" style="fill:#609926"/></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Creator: CorelDRAW X7 -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="167.952mm" height="41.6859mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
|
||||
viewBox="0 0 17419 4323"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.fil1 {fill:#003CA8}
|
||||
.fil0 {fill:#FF8812}
|
||||
.fil2 {fill:#003CA8;fill-rule:nonzero}
|
||||
]]>
|
||||
</style>
|
||||
</defs>
|
||||
<g id="图层_x0020_1">
|
||||
<metadata id="CorelCorpID_0Corel-Layer"/>
|
||||
<path class="fil0" d="M3315 1737l0 0c48,-10 78,51 40,83l0 0c-232,194 -337,501 -273,796l0 0c11,49 -51,79 -83,41l0 0c-182,-219 -464,-325 -743,-283 -437,234 -929,545 -1221,860 -345,372 -399,922 201,999 -1718,474 -1865,-1028 977,-1978 197,-194 282,-477 223,-750l0 0c-10,-49 51,-79 83,-41l0 0c194,232 500,337 796,273z"/>
|
||||
<path class="fil1" d="M2555 1c412,0 752,120 1020,320 299,222 509,544 632,909l0 0c43,127 75,259 96,395 22,138 32,278 31,419 0,140 -12,279 -34,416 -22,136 -55,270 -98,398 -127,379 -341,715 -640,949 -269,210 -606,337 -1007,337l-1073 0c-222,0 -365,-43 -447,-114 -78,-67 -103,-156 -89,-258 13,-96 60,-202 130,-311 241,-372 903,-925 1287,-1019 -407,237 -761,685 -930,977l1122 0c230,0 423,-77 579,-205 176,-143 304,-351 383,-585 31,-92 54,-189 70,-287 16,-99 25,-200 25,-301 1,-100 -7,-201 -22,-299 -15,-96 -38,-190 -68,-280l0 0c-74,-220 -199,-413 -374,-546 -156,-118 -353,-190 -593,-190l0 0 -567 1 -273 -1c-105,-1 -202,18 -292,55 -89,37 -171,92 -245,166 -75,74 -130,156 -167,245 -37,90 -56,187 -56,292l0 857c542,-176 910,-209 1236,-136 -642,116 -1423,443 -1906,889l-55 51 0 -75 0 -1719 0 -2 0 0c1,-375 151,-712 395,-956 243,-243 581,-393 956,-393l0 0 2 0 0 0 972 2 0 -1z"/>
|
||||
<path class="fil2" d="M7222 2023c0,153 -12,287 -37,403 -14,66 -30,124 -48,175 -18,52 -45,108 -82,170 -102,175 -235,296 -398,361 -132,50 -313,75 -542,75l-1141 0 0 -2388 821 -7 282 0 212 14c324,0 567,119 729,358 136,205 204,485 204,839zm-1346 -679l-333 0 0 1356 320 3c266,0 454,-42 565,-126 128,-96 191,-278 191,-547 0,-264 -59,-447 -177,-549 -109,-92 -298,-137 -566,-137zm3132 1155l-1144 0c34,87 76,151 126,192 50,40 120,60 211,60l784 0 -249 456 -497 0 -147 0 -146 0c-241,0 -417,-93 -529,-280 -88,-151 -132,-360 -132,-629 0,-285 72,-507 218,-667 145,-159 360,-240 644,-240 308,0 533,79 674,236 132,149 198,381 198,695l0 64 0 79 -11 34zm-1154 -385l599 0c-9,-100 -33,-173 -71,-218 -21,-23 -49,-41 -84,-55 -35,-13 -78,-20 -128,-20 -190,0 -296,97 -316,293zm1772 -709l382 1097 371 -1097 603 0 -661 1802 -627 0 -674 -1802 606 0zm3644 -116l-1336 0c-202,0 -324,33 -324,223 0,187 257,216 429,210l276 -10c513,0 842,211 842,744 0,554 -293,751 -831,751l-1295 0 0 -470 1077 0c223,0 453,-2 453,-237 0,-186 -230,-220 -406,-213l-225 14c-286,0 -506,-31 -684,-184 -153,-132 -229,-330 -229,-594 0,-581 395,-704 934,-704l1678 0 -359 470zm1157 116l-233 463 -297 0 0 569c0,269 59,317 344,317l-251 464c-606,0 -662,-210 -662,-811l0 -539 -242 0 811 -1057 0 594 530 0zm1546 1063l0 739 -569 0 0 -354 -245 354 -201 0c-232,0 -403,-35 -515,-106 -138,-91 -207,-247 -207,-468 0,-214 56,-367 170,-457 102,-78 262,-117 480,-117l518 0 0 -37c0,-62 -14,-103 -42,-125 -29,-21 -77,-32 -145,-32l-821 0 231 -460 445 0c429,0 694,73 796,218 34,51 60,147 78,286 18,139 27,326 27,559zm-1158 150c0,39 18,71 54,99 41,22 108,34 201,34l55 0 279 0 0 -273 -395 0c-57,0 -103,10 -140,29 -36,20 -54,56 -54,111zm1868 -859l228 -354 508 0 -263 460 -204 0c-113,0 -190,31 -228,92 -27,48 -41,137 -41,267l0 983 -569 0 0 -1802 569 0 0 354z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 2.1 KiB repo.diff.file_after repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 3.6 KiB |
230
public/assets/install.sh
Executable file
@@ -0,0 +1,230 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2024 Mengning Software All rights reserved.
|
||||
|
||||
# 默认值
|
||||
NAME=DevStar-Studio
|
||||
IMAGE_REGISTRY_USER=mengning997
|
||||
IMAGE_NAME=devstar-studio
|
||||
VERSION=latest # DevStar Studio的默认版本为最新版本
|
||||
PORT=80 # 设置端口默认值为 80
|
||||
SSH_PORT=2222 # 设置ssh默认端口号2222
|
||||
DATA_DIR=${HOME}/devstar_data
|
||||
APP_INI=${DATA_DIR}/app.ini
|
||||
|
||||
# 错误处理函数
|
||||
error_handler() {
|
||||
devstar help
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 捕获错误信号
|
||||
trap 'error_handler' ERR
|
||||
|
||||
# Exit immediately if a command exits with a non-zero status
|
||||
set -e
|
||||
|
||||
# Colors for output
|
||||
GREEN='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Function to display success message
|
||||
function success {
|
||||
echo -e "${GREEN}$1${NC}"
|
||||
}
|
||||
|
||||
# Function to display failure message
|
||||
function failure {
|
||||
echo -e "${RED}$1${NC}"
|
||||
}
|
||||
|
||||
# Detect the OS type and install dependencies
|
||||
function install_dependencies {
|
||||
# Install dependencies based on the OS type
|
||||
success "dependencies install begin: "
|
||||
OS_ID=$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"')
|
||||
|
||||
case $OS_ID in
|
||||
ubuntu|debian)
|
||||
# 检查 Docker 是否已安装
|
||||
if ! command -v docker &> /dev/null
|
||||
then
|
||||
echo "Installing Docker..."
|
||||
# 更新包索引
|
||||
sudo apt-get update
|
||||
# 安装 Docker
|
||||
sudo apt-get install -y docker.io
|
||||
echo "Docker Installed!"
|
||||
else
|
||||
echo "Docker Installed, $(docker --version)"
|
||||
fi
|
||||
;;
|
||||
centos)
|
||||
# sudo yum update -y
|
||||
# sudo yum install -y epel-release
|
||||
# sudo yum groupinstall -y "Development Tools"
|
||||
# sudo yum install -y yaml-cpp yaml-cpp-devel
|
||||
;;
|
||||
fedora)
|
||||
# sudo dnf update -y
|
||||
# sudo dnf group install -y "Development Tools"
|
||||
# sudo dnf install -y yaml-cpp yaml-cpp-devel
|
||||
;;
|
||||
*)
|
||||
failure "Unsupported OS: $OS_ID"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Function to install
|
||||
function install {
|
||||
install_dependencies
|
||||
if sudo docker pull mengning997/$IMAGE_NAME:$VERSION; then
|
||||
success "Successfully pulled mengning997/$IMAGE_NAME:$VERSION"
|
||||
else
|
||||
sudo docker pull devstar.cn/devstar/$IMAGE_NAME:$VERSION
|
||||
IMAGE_REGISTRY_USER=devstar.cn/devstar
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to start
|
||||
function start {
|
||||
if [[ -z "$IMAGE_STR" ]]; then
|
||||
install
|
||||
fi
|
||||
# 创建devstar_data目录用于持久化存储DevStar相关的配置和用户数据
|
||||
mkdir -p $DATA_DIR
|
||||
sudo chown 1000:1000 $DATA_DIR
|
||||
sudo chmod 666 /var/run/docker.sock
|
||||
if [ ! -f "$APP_INI" ]; then
|
||||
DOMAIN_NAME=$(hostname -I | awk '{print $1}')
|
||||
echo "DOMAIN_NAME=$DOMAIN_NAME"
|
||||
else
|
||||
# 读取 DOMAIN 值
|
||||
DOMAIN_NAME=$(grep -E '^\s*DOMAIN\s*=' "$APP_INI" | cut -d'=' -f2 | xargs)
|
||||
# 检查是否成功读取到值
|
||||
if [[ -z "$DOMAIN_NAME" ]]; then
|
||||
DOMAIN_NAME="localhost"
|
||||
fi
|
||||
echo "DOMAIN_NAME=$DOMAIN_NAME"
|
||||
fi
|
||||
# 启动devstar-studio容器
|
||||
stop
|
||||
if [[ -z "$IMAGE_STR" ]]; then
|
||||
IMAGE_STR="$IMAGE_REGISTRY_USER/$IMAGE_NAME:$VERSION"
|
||||
fi
|
||||
echo "image=$IMAGE_STR"
|
||||
sudo docker run --restart=always --name $NAME -d -p $PORT:3000 -p $SSH_PORT:$SSH_PORT -v /var/run/docker.sock:/var/run/docker.sock -v ~/devstar_data:/var/lib/gitea -v ~/devstar_data:/etc/gitea $IMAGE_STR
|
||||
# 打开 `http://localhost:8080` 完成安装。
|
||||
success "-------------------------------------------------------"
|
||||
success "DevStar started in http://$DOMAIN_NAME:$PORT successfully!"
|
||||
success "-------------------------------------------------------"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Function to stop
|
||||
function stop {
|
||||
if [ $(docker ps -a --filter "name=^/${NAME}$" -q | wc -l) -gt 0 ]; then
|
||||
sudo docker stop $NAME && sudo docker rm -f $NAME
|
||||
fi
|
||||
if [ $(docker ps -a --filter "name=^/devstar-studio$" -q | wc -l) -gt 0 ]; then
|
||||
sudo docker stop devstar-studio && sudo docker rm -f devstar-studio
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to logs
|
||||
function logs {
|
||||
# 查看devstar-studio容器的运行日志
|
||||
sudo docker logs $NAME
|
||||
}
|
||||
|
||||
# Function to clean
|
||||
function clean {
|
||||
stop
|
||||
rm -rf $DATA_DIR
|
||||
}
|
||||
|
||||
# Function to usage help
|
||||
function usage {
|
||||
success "------------------------------------------------------------------------"
|
||||
success "DevStar usage help:"
|
||||
success " help, -h, --help, Help information"
|
||||
success " start Start DevStar Studio"
|
||||
success " --port=<arg> Specify the port number (default port is 80)"
|
||||
success " --ssh-port=<arg> Specify the ssh-port number (default ssh-port is 2222)"
|
||||
success " --version=<arg> Specify the DevStar Studio Image Version (default verson is latest)"
|
||||
success " --image=<arg> Specify the DevStar Studio Image example: devstar-studio:latest "
|
||||
success " stop Stop the running DevStar Studio"
|
||||
success " logs View the logs of the devstar-studio container"
|
||||
failure " clean Clean up the running DevStar Studio, including deleting user data. Please use with caution."
|
||||
success "------------------------------------------------------------------------"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Main script
|
||||
case "$1" in
|
||||
-h|--help|help)
|
||||
usage
|
||||
;;
|
||||
start)
|
||||
ARGS=$(getopt --long port::,ssh-port::,version::,image:: -- "$@")
|
||||
if [ $? -ne 0 ]; then
|
||||
failure "ARGS ERROR!"
|
||||
exit 1
|
||||
fi
|
||||
eval set -- "${ARGS}"
|
||||
# 处理选项
|
||||
while true; do
|
||||
case "$1" in
|
||||
--port)
|
||||
PORT="$2"
|
||||
echo "The Port is: $PORT"
|
||||
shift 2 ;;
|
||||
--ssh-port)
|
||||
SSH_PORT="$2"
|
||||
echo "The SSH_Port is: $SSH_PORT"
|
||||
shift 2 ;;
|
||||
--version)
|
||||
VERSION="$2"
|
||||
echo "The DevStar Studio Image Version is: $VERSION"
|
||||
shift 2 ;;
|
||||
--image)
|
||||
IMAGE_STR="$2"
|
||||
echo "The DevStar Studio Image: $IMAGE_STR"
|
||||
shift 2 ;;
|
||||
--)
|
||||
shift
|
||||
break ;;
|
||||
*)
|
||||
failure "Unrecognized option: $1"
|
||||
exit 1 ;;
|
||||
esac
|
||||
done
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
logs)
|
||||
logs
|
||||
;;
|
||||
clean)
|
||||
clean
|
||||
;;
|
||||
*)
|
||||
# 获取当前脚本的文件名
|
||||
script_name=$(basename "$0")
|
||||
# 判断脚本名是否为 devstar
|
||||
if [ "$script_name" != "devstar" ]; then
|
||||
sudo mv ./install.sh /usr/bin/devstar
|
||||
rm -rf install.sh
|
||||
success "--------------------------------------"
|
||||
success "DevStar Studio installed successfully!"
|
||||
success "--------------------------------------"
|
||||
success "Copyright 2024 Mengning Software All rights reserved."
|
||||
devstar help
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -9,7 +9,12 @@ import (
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
"code.gitea.io/gitea/modules/web"
|
||||
"code.gitea.io/gitea/services/forms"
|
||||
system_model "code.gitea.io/gitea/models/system"
|
||||
"code.gitea.io/gitea/modules/cache"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
@@ -253,3 +258,47 @@ func ChangeConfig(ctx *context.Context) {
|
||||
config.GetDynGetter().InvalidateCache()
|
||||
ctx.JSONOK()
|
||||
}
|
||||
|
||||
func LogoPost(ctx *context.Context) {
|
||||
form := web.GetForm(ctx).(*forms.AvatarForm)
|
||||
if form.Avatar == nil || form.Avatar.Filename == "" {
|
||||
ctx.Flash.Error("No file uploaded")
|
||||
ctx.Redirect(setting.AppSubURL + "/-/admin/config/settings")
|
||||
return
|
||||
}
|
||||
|
||||
ext := filepath.Ext(form.Avatar.Filename)
|
||||
if ext != ".png" && ext != ".jpg" && ext != ".jpeg" && ext != ".gif" && ext != ".webp" {
|
||||
ctx.Flash.Error("Invalid file type")
|
||||
ctx.Redirect(setting.AppSubURL + "/-/admin/config/settings")
|
||||
return
|
||||
}
|
||||
|
||||
// 生成唯一文件名
|
||||
filename := "logo_" + strconv.FormatInt(time.Now().Unix(), 10) + ext
|
||||
savePath := filepath.Join(setting.CustomPath, "public", "assets", "img", filename)
|
||||
os.MkdirAll(filepath.Dir(savePath), os.ModePerm)
|
||||
out, err := os.Create(savePath)
|
||||
if err != nil {
|
||||
ctx.Flash.Error("Failed to save file")
|
||||
ctx.Redirect(setting.AppSubURL + "/-/admin/config/settings")
|
||||
return
|
||||
}
|
||||
defer out.Close()
|
||||
fr, _ := form.Avatar.Open()
|
||||
defer fr.Close()
|
||||
io.Copy(out, fr)
|
||||
|
||||
// 保存路径到数据库
|
||||
relPath := "/assets/img/" + filename
|
||||
err = system_model.SetSetting(ctx, "custom_logo_path", relPath)
|
||||
if err != nil {
|
||||
ctx.Flash.Error("Failed to update database")
|
||||
ctx.Redirect(setting.AppSubURL + "/-/admin/config/settings")
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Flash.Success("Logo updated successfully")
|
||||
ctx.Redirect(setting.AppSubURL + "/-/admin/config/settings")
|
||||
}
|
||||
|
||||
|
||||
@@ -726,6 +726,7 @@ func registerWebRoutes(m *web.Router) {
|
||||
m.Post("/test_mail", admin.SendTestMail)
|
||||
m.Post("/test_cache", admin.TestCache)
|
||||
m.Get("/settings", admin.ConfigSettings)
|
||||
m.Post("/logo", web.Bind(forms.AvatarForm{}), admin.LogoPost)
|
||||
})
|
||||
|
||||
m.Group("/monitor", func() {
|
||||
|
||||
@@ -17,6 +17,7 @@ import (
|
||||
|
||||
"code.gitea.io/gitea/models/unit"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
system_model "code.gitea.io/gitea/models/system"
|
||||
"code.gitea.io/gitea/modules/cache"
|
||||
"code.gitea.io/gitea/modules/httpcache"
|
||||
"code.gitea.io/gitea/modules/session"
|
||||
@@ -207,6 +208,12 @@ func Contexter() func(next http.Handler) http.Handler {
|
||||
ctx.Data["ManifestData"] = setting.ManifestData
|
||||
ctx.Data["AllLangs"] = translation.AllLangs()
|
||||
|
||||
if logoPath, _ := system_model.GetSetting(ctx, "custom_logo_path"); logoPath != "" {
|
||||
ctx.Data["CustomLogoPath"] = logoPath
|
||||
} else {
|
||||
ctx.Data["CustomLogoPath"] = ""
|
||||
}
|
||||
|
||||
next.ServeHTTP(ctx.Resp, ctx.Req)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,4 +1,36 @@
|
||||
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
|
||||
<!-- 自定义logo upload -->
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "admin.config.app_logo_config"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form
|
||||
class="ui form"
|
||||
action="{{ AppSubUrl }}/-/admin/config/logo"
|
||||
method="post"
|
||||
enctype="multipart/form-data"
|
||||
>
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field tw-pl-4">
|
||||
<label
|
||||
for="avatar"
|
||||
>{{ctx.Locale.Tr "admin.config.choose_new_logo"}}</label
|
||||
>
|
||||
<input
|
||||
name="avatar"
|
||||
type="file"
|
||||
accept="image/png,image/jpeg,image/gif,image/webp"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui primary button">
|
||||
{{ctx.Locale.Tr "admin.config.update_logo"}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "admin.config.picture_config"}}
|
||||
</h4>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}">
|
||||
<div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}">
|
||||
{{if ShowFooterPoweredBy}}
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://about.gitea.com">{{ctx.Locale.Tr "powered_by" "Gitea"}}</a>
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://DevStar.cn">{{ctx.Locale.Tr "powered_by" "DevStar"}}</a>
|
||||
{{end}}
|
||||
{{if (or .ShowFooterVersion .PageIsAdmin)}}
|
||||
{{ctx.Locale.Tr "version"}}:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="navbar-left">
|
||||
<!-- the logo -->
|
||||
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
|
||||
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
||||
<img width="auto" height="30" src="{{if .CustomLogoPath}}{{.CustomLogoPath}}{{else}}{{AssetUrlPrefix}}/img/logo.svg{{end}}" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
||||
</a>
|
||||
|
||||
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://www.mengning.com.cn"> ©Mengning Software </a>. 2024-2025 All rights reserved.
|
||||
{{if BeianNumber}}
|
||||
<a id="beian" href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">{{BeianNumber}}</a>
|
||||
{{end}}
|
||||