diff --git a/.github/ISSUE_TEMPLATE/alpha_bug_report.yaml b/.github/ISSUE_TEMPLATE/alpha_bug_report.yaml index 3f09fc1..93bf0a2 100644 --- a/.github/ISSUE_TEMPLATE/alpha_bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/alpha_bug_report.yaml @@ -1,6 +1,6 @@ name: "[Alpha Only] Bug Report" description: CasaOS Alpha Testing specific bug report form. -title: "[Alpha][Bug]: " +title: "[Alpha][Bug] " labels: ["alpha", "bug"] body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/app_request.yaml b/.github/ISSUE_TEMPLATE/app_request.yaml new file mode 100644 index 0000000..e2e7466 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/app_request.yaml @@ -0,0 +1,53 @@ +name: "App Request" +description: "Request to add an app to the app store." +title: "[App Request] AppName" +labels: ["App Request"] +body: + - type: markdown + attributes: + value: | + ### ❤ Thanks for taking the time to fill out this app request! + > Before proceeding, please make sure that this app is not in App Store and no one has [requested](https://github.com/IceWhaleTech/CasaOS/labels/App%20Request) the same app before. + > If you have already requested the app, please ask your friends to help add a 👍 to this issue. Then be patient and wait for the developers to work on it. + > If you have any questions, please ask them on [Discord](https://discord.gg/knqAbbBbeX) or [Github Discussions](https://github.com/IceWhaleTech/CasaOS/discussions). + + - type: textarea + id: app-info + attributes: + label: "App Information" + description: "The formal information of this app, as detailed as possible." + value: | + - Name: + - Short Description: + - Official Website: + - GitHub Repository: + - Docker Image: + validations: + required: true + + - type: textarea + id: why + attributes: + label: "Why do you want this app?" + description: "Detailed notes can help developers and others understand the importance of this app." + placeholder: | + As a [what role], it helps me solve [what problem], and especially [what function] is great! + or + It solves [what problem] and especially [what feature] works well, which is hard to do with other app. + or + This is the app that [some device/service] must use and will not work without it. + or + others + + - type: textarea + id: additional-info + attributes: + label: "Additional information?" + description: "Anything else you want to share with the developers and others?" + placeholder: | + Example: + - Noteworthy matters. + - Recommended Docker image. + - Validated Docker deployment instructions. + - Notable Docker setup details. + - Recommended config files, user data, accessible directory settings. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2fcf1c6..31b67cc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,8 +1,8 @@ --- name: Bug report about: Create a report to help us improve -title: '' -labels: '' +title: '[Bug] ' +labels: 'bug' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index fbe4a3e..f3d66d2 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,11 @@ blank_issues_enabled: false contact_links: - - name: Questions, Ideas, Discussions + - name: Feature/Enhancement Ideas + url: https://github.com/IceWhaleTech/CasaOS/discussions/164 + about: Have an idea for a new feature/enhancement? + - name: Questions, Discussions url: https://github.com/IceWhaleTech/CasaOS/discussions about: Ask questions, propose ideas, or discuss anything related to CasaOS + - name: Discord + url: https://discord.gg/knqAbbBbeX + about: Get help or share great ideas on Discord! \ No newline at end of file diff --git a/.github/workflows/add_issues_to_projects.yml b/.github/workflows/add_issues_to_projects.yml new file mode 100644 index 0000000..e1dc760 --- /dev/null +++ b/.github/workflows/add_issues_to_projects.yml @@ -0,0 +1,33 @@ +name: Add Issues To Projects + +on: + issues: + types: + - opened + +jobs: + add-issues: + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@36464acb844fc53b9b8b2401da68844f6b05ebb0 + with: + app_id: ${{ secrets.ALPHA_BOT_ID }} + private_key: ${{ secrets.ALPHA_BOT_PEM }} + + - name: Add Alpha Bug Issue To project + uses: actions/add-to-project@v0.3.0 + with: + github-token: ${{ steps.generate_token.outputs.token }} + project-url: https://github.com/orgs/IceWhaleTech/projects/5 + labeled: alpha, bug + label-operator: AND + + - name: Add App Request Issue To project + uses: actions/add-to-project@v0.3.0 + with: + github-token: ${{ steps.generate_token.outputs.token }} + project-url: https://github.com/orgs/IceWhaleTech/projects/8 + labeled: "App Request" + label-operator: AND diff --git a/.github/workflows/push_events_to_discord.yml b/.github/workflows/push_events_to_discord.yml new file mode 100644 index 0000000..971b64d --- /dev/null +++ b/.github/workflows/push_events_to_discord.yml @@ -0,0 +1,48 @@ +name: Push Events to Discord + +on: + issues: + types: + - opened + issue_comment: + types: + - created + discussion: + types: + - created + - transferred + - answered + discussion_comment: + types: + - created + +jobs: + push-events: + + runs-on: ubuntu-latest + + steps: + + - name: General Discussions & Comments + if: ${{ ( github.event_name == 'discussion' || github.event_name == 'discussion_comment' ) && github.event.discussion.category.name == 'General' }} + uses: joseph-montanez/forward-event-action@v3.0.0 + with: + webhook: ${{ secrets.Discord_CasaOS_General_Webhook }} + + - name: App Request Issues & Comments + if: ${{ ( github.event_name == 'issues' || github.event_name == 'issue_comment' ) && contains(github.event.issue.labels.*.name, 'App Request') }} + uses: joseph-montanez/forward-event-action@v3.0.0 + with: + webhook: ${{ secrets.Discord_CasaOS_App_Request_Webhook }} + + - name: Bug Issues & Comments + if: ${{ ( github.event_name == 'issues' || github.event_name == 'issue_comment' ) && contains(github.event.issue.labels.*.name, 'bug') && !contains(github.event.issue.labels.*.name, 'alpha') }} + uses: joseph-montanez/forward-event-action@v3.0.0 + with: + webhook: ${{ secrets.Discord_CasaOS_Bug_Webhook }} + + - name: Alpha Issues & Comments + if: ${{ ( github.event_name == 'issues' || github.event_name == 'issue_comment' ) && contains(github.event.issue.labels.*.name, 'alpha') }} + uses: joseph-montanez/forward-event-action@v3.0.0 + with: + webhook: ${{ secrets.Discord_CasaOS_Alpha_Webhook }} diff --git a/service/shares.go b/service/shares.go index c17ebf5..1f8b096 100644 --- a/service/shares.go +++ b/service/shares.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 11:21:14 * @LastEditors: LinkLeong - * @LastEditTime: 2022-08-16 14:28:27 + * @LastEditTime: 2022-08-18 11:16:25 * @FilePath: /CasaOS/service/shares.go * @Description: * @Website: https://www.casaos.io @@ -41,6 +41,7 @@ func (s *sharesStruct) DeleteShareByPath(path string) { s.db.Where("path LIKE ?", path+"%").Delete(&model.SharesDBModel{}) s.UpdateConfigFile() } + func (s *sharesStruct) GetSharesByName(name string) (shares []model2.SharesDBModel) { s.db.Select("anonymous,path,id").Where("name = ?", name).Find(&shares) diff --git a/web/index.html b/web/index.html index 83ac6f0..8bd1b96 100644 --- a/web/index.html +++ b/web/index.html @@ -1,34 +1,45 @@ - - - -
- - - - - - - - - - - -