diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,33 +1,75 @@
---
-name: Bug report
-about: Create a report to help us improve
-title: Bug title
-labels: bug
-assignees: ''
+name: 🐞Bug Report
+description: Create a report to help us improve Marzneshin by reproducing and fixing bugs
+title: "[BUG] "
+labels:
+ - "bug"
+body:
+ - type: markdown
+ attributes:
+ value: |
+ **Thanks :heart: for taking the time to fill out this bug report!**
+ We kindly ask that you search to see if an issue [already exists](https://github.com/khodedawsh/marzneshin/issues?q=is%3Aissue+sort%3Acreated-desc+) for the bug you encountered.
+
+ - type: textarea
+ attributes:
+ label: Current Behavior
+ description: |
+ A clear and concise description of the issue you're experiencing.
+ validations:
+ required: false
+
+ - type: textarea
+ attributes:
+ label: Expected Behavior
+ description: |
+ A clear and concise description of what you expected to happen.
+ validations:
+ required: false
+
+ - type: textarea
+ attributes:
+ label: Steps To Reproduce
+ description: Steps to reproduce the behavior.
+ placeholder: |
+ 1. Go to '...'
+ 2. Click on '....'
+ 3. Scroll down to '....'
+ 4. See error
+ validations:
+ required: false
+
+ - type: textarea
+ attributes:
+ label: Screenshots
+ description: |
+ If applicable, add screenshots to help explain your problem.
+
+ Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
+ validations:
+ required: false
-**Describe the bug**
-A clear and concise description of what the bug is.
+ - type: textarea
+ attributes:
+ label: Environment
+ description: |
+ Information about your environment where you see the bug.
-**To Reproduce**
-Steps to reproduce the behavior:
-1. Go to '...'
-2. Click on '....'
-3. Scroll down to '....'
-4. See error
+ value: |
+ OS:
-**Expected behavior**
-A clear and concise description of what you expected to happen.
+ Browsers:
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
+ Version:
-**Machine details (please complete the following information):**
- - OS: [e.g. ubuntu 20]
-- Python version: [e.g 3.8]
-- Nodejs version: [e.g 16.17]
-- Browser [e.g. chrome, safari]
+ validations:
+ required: true
-**Additional context**
-Add any other context about the problem here.
+ - type: textarea
+ attributes:
+ label: Additional Context
+ description: |
+ Add any other context about the problem here.
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -1,20 +1,48 @@
---
-name: Feature request
-about: Suggest an idea for this project
-title: Feature title
-labels: enhancement
-assignees: ''
+name: 🛠️Feature Request
+description: Suggest an idea to help us improve W&B
+title: "[FEAT] "
+labels:
+ - "feature"
+body:
+ - type: markdown
+ attributes:
+ value: |
+ **Thanks :heart: for taking the time to fill out this feature request report!**
+ We kindly ask that you search to see if an issue [already exists](https://github.com/khodedawsh/marzneshin/issues?q=is%3Aissue+sort%3Acreated-desc+) for your feature.
+
+ We are also happy to accept contributions from our users. For more details see [here](https://github.com/khodedawsh/marzneshin/blob/master/CONTRIBUTING.md).
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+ - type: textarea
+ attributes:
+ label: Description
+ description: |
+ A clear and concise description of the feature you're interested in.
+ validations:
+ required: true
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
+ - type: textarea
+ attributes:
+ label: Suggested Solution
+ description: |
+ Describe the solution you'd like. A clear and concise description of what you want to happen.
+ validations:
+ required: true
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features you've considered.
+ - type: textarea
+ attributes:
+ label: Alternatives
+ description: |
+ Describe alternatives you've considered.
+ A clear and concise description of any alternative solutions or features you've considered.
+ validations:
+ required: false
-**Additional context**
-Add any other context or screenshots about the feature request here.
+ - type: textarea
+ attributes:
+ label: Additional Context
+ description: |
+ Add any other context about the problem here.
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/feature_story.md b/.github/ISSUE_TEMPLATE/feature_story.md
@@ -1,21 +0,0 @@
-name: Feature
-about: Feature plan
-title: Feature title
-labels: enhancement improvement
-assignees: 'Krr0ptioN'
-
-
-## Description
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-
-### User Interface Specification
-- User interface and Design Specification of the feature
-
-### Technical Interface Specification
-- Domain business logic and technical specification
-
-### Tasks
-
-- [ ] Tasks
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,28 @@
+
+## Description
+
+Provide a small description of Pull Request.
+
+## UI Changes
+
+-
+-
+
+### Screenshots
+
+## API Changes
+
+## Checklist
+- [ ] My code follows the code style of this project.
+- [ ] My change requires a change to the documentation.
+- [ ] I have updated the documentation accordingly.
+- [ ] I have added tests (stories, interaction tests, unit tests, e2e tests) to cover my changes.
+- [ ] I have added tests to cover my changes.
+
+## Related Issues
+
+Closes
+
+- #
+- #
+
diff --git a/.github/workflows/pr_validation.yml b/.github/workflows/pr_validation.yml
@@ -0,0 +1,35 @@
+name: Validate Pull Request
+
+on:
+ pull_request_target:
+ types: [opened, edited, synchronize]
+ pull_request:
+
+jobs:
+ conventional_commit:
+ name: Conventional Commit Title
+ runs-on: ubuntu-latest
+ steps:
+ - uses: amannn/action-semantic-pull-request@v5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ scopes: ${{ inputs.scopes }}
+ requireScope: true
+ types: |
+ build
+ chore
+ ci
+ docs
+ feat
+ fix
+ merge
+ perf
+ refactor
+ refact
+ revert
+ style
+ test
+ wip
+ ignoreLabels: |
+ autorelease: pending
diff --git a/README.md b/README.md
@@ -291,7 +291,7 @@ the `UVICORN_HOST` and `UVICORN_PORT` environment variables.
| NUMBER_OF_RECURRENT_NOTIFICATIONS | How many times to retry if an error detected in sending a notification (default: `3`) |
| RECURRENT_NOTIFICATIONS_TIMEOUT | Timeout between each retry if an error detected in sending a notification in seconds (default: `180`) |
| NOTIFY_REACHED_USAGE_PERCENT | At which percentage of usage to send the warning notification (default: `80`) |
-| NOTIFY_DAYS_LEFT | When to send warning notifaction about expiration (default: `3`) |
+| NOTIFY_DAYS_LEFT | When to send warning notification about expiration (default: `3`) |
# API
@@ -348,7 +348,7 @@ For more information, You can read [Marzneshin CLI's documentation](./cli/README
You can set a webhook address and Marzneshin will send the notifications to that address.
-the requests will be sent as a post request to the adress provided by `WEBHOOK_ADDRESS` with `WEBHOOK_SECRET`
+the requests will be sent as a post request to the address provided by `WEBHOOK_ADDRESS` with `WEBHOOK_SECRET`
as `x-webhook-secret` in the headers.
Example request sent from Marzneshin:
diff --git a/app/config/env.py b/app/config/env.py
@@ -71,12 +71,12 @@ WEBHOOK_SECRET = config("WEBHOOK_SECRET", default=None)
RECURRENT_NOTIFICATIONS_TIMEOUT = config(
"RECURRENT_NOTIFICATIONS_TIMEOUT", default=180, cast=int
)
-# how many times to try after ok response not recevied after sending a notifications
+# how many times to try after ok response not received after sending a notifications
NUMBER_OF_RECURRENT_NOTIFICATIONS = config(
"NUMBER_OF_RECURRENT_NOTIFICATIONS", default=3, cast=int
)
-# sends a notification when the user uses this much of thier data
+# sends a notification when the user uses this much of their data
NOTIFY_REACHED_USAGE_PERCENT = config(
"NOTIFY_REACHED_USAGE_PERCENT", default=80, cast=int
)
diff --git a/app/models/user.py b/app/models/user.py
@@ -106,7 +106,7 @@ class UserCreate(User):
self.on_hold_expire_duration or self.on_hold_timeout
):
raise ValueError(
- "on hold parametrs set when user status isn't on_hold."
+ "on hold parameters set when user status isn't on_hold."
)
return self
diff --git a/dashboard/public/locales/ckb.json b/dashboard/public/locales/ckb.json
@@ -159,35 +159,35 @@
"delete": {
"error": "Failed to delete {{name}}",
"success": {
- "title": "{{name}} is successfuly deleted",
+ "title": "{{name}} is successfully deleted",
"desc": ""
}
},
"create": {
"error": "Failed to create {{name}}",
"success": {
- "title": "{{name}} is successfuly created",
+ "title": "{{name}} is successfully created",
"desc": ""
}
},
"update": {
"error": "Failed to update {{name}}",
"success": {
- "title": "{{name}} is successfuly updated",
+ "title": "{{name}} is successfully updated",
"desc": ""
}
},
"user_revoke": {
"error": "Failed to revoke {{name}} subscription",
"success": {
- "title": "{{name}} is successfuly created",
+ "title": "{{name}} is successfully created",
"desc": ""
}
},
"user_reset": {
"error": "Failed to reset {{name}} data usage",
"success": {
- "title": "{{name}} data usage is successfuly reseted",
+ "title": "{{name}} data usage is successfully reset",
"desc": ""
}
}
diff --git a/dashboard/public/locales/en.json b/dashboard/public/locales/en.json
@@ -271,21 +271,21 @@
"create": {
"error": "Failed to create {{name}}",
"success": {
- "title": "{{name}} is successfuly created",
+ "title": "{{name}} is successfully created",
"desc": ""
}
},
"update": {
"error": "Failed to update {{name}}",
"success": {
- "title": "{{name}} is successfuly updated",
+ "title": "{{name}} is successfully updated",
"desc": ""
}
},
"user_revoke": {
"error": "Failed to revoke {{name}} subscription",
"success": {
- "title": "{{name}} is successfuly created",
+ "title": "{{name}} is successfully created",
"desc": ""
}
},
diff --git a/dashboard/public/locales/fa.json b/dashboard/public/locales/fa.json
@@ -197,7 +197,7 @@
"user_reset": {
"error": "Failed to reset {{name}} data usage",
"success": {
- "title": "{{name}} data usage is successfuly reseted",
+ "title": "{{name}} data usage is successfully reset",
"desc": ""
}
}
diff --git a/dashboard/public/locales/kmr.json b/dashboard/public/locales/kmr.json
@@ -159,35 +159,35 @@
"delete": {
"error": "Failed to delete {{name}}",
"success": {
- "title": "{{name}} is successfuly deleted",
+ "title": "{{name}} is successfully deleted",
"desc": ""
}
},
"create": {
"error": "Failed to create {{name}}",
"success": {
- "title": "{{name}} is successfuly created",
+ "title": "{{name}} is successfully created",
"desc": ""
}
},
"update": {
"error": "Failed to update {{name}}",
"success": {
- "title": "{{name}} is successfuly updated",
+ "title": "{{name}} is successfully updated",
"desc": ""
}
},
"user_revoke": {
"error": "Failed to revoke {{name}} subscription",
"success": {
- "title": "{{name}} is successfuly created",
+ "title": "{{name}} is successfully created",
"desc": ""
}
},
"user_reset": {
"error": "Failed to reset {{name}} data usage",
"success": {
- "title": "{{name}} data usage is successfuly reseted",
+ "title": "{{name}} data usage is successfully reset",
"desc": ""
}
}
diff --git a/dashboard/public/locales/kur.json b/dashboard/public/locales/kur.json
@@ -225,35 +225,35 @@
"delete": {
"error": "Failed to delete {{name}}",
"success": {
- "title": "{{name}} is successfuly deleted",
+ "title": "{{name}} is successfully deleted",
"desc": ""
}
},
"create": {
"error": "Failed to create {{name}}",
"success": {
- "title": "{{name}} is successfuly created",
+ "title": "{{name}} is successfully created",
"desc": ""
}
},
"update": {
"error": "Failed to update {{name}}",
"success": {
- "title": "{{name}} is successfuly updated",
+ "title": "{{name}} is successfully updated",
"desc": ""
}
},
"user_revoke": {
"error": "Failed to revoke {{name}} subscription",
"success": {
- "title": "{{name}} is successfuly created",
+ "title": "{{name}} is successfully created",
"desc": ""
}
},
"user_reset": {
"error": "Failed to reset {{name}} data usage",
"success": {
- "title": "{{name}} data usage is successfuly reseted",
+ "title": "{{name}} data usage is successfully reset",
"desc": ""
}
},
diff --git a/dashboard/src/features/users/components/dialogs/settings/user-info/subscription-actions.tsx b/dashboard/src/features/users/components/dialogs/settings/user-info/subscription-actions.tsx
@@ -5,7 +5,7 @@ import { useUserSubscriptionRevokeCmd } from "@marzneshin/features/users";
import type { QRCodeProps } from "./qrcode";
import type { FC } from 'react';
-import { SubscriptionLinkButton } from "./subcription-link-button";
+import { SubscriptionLinkButton } from "./subscription-link-button";
export const SubscriptionActions: FC<QRCodeProps> = ({ entity }) => {
const subscribeQrLink = getSubscriptionLink(entity.subscription_url);
const { mutate: revokeSubscription } = useUserSubscriptionRevokeCmd();
diff --git a/dashboard/src/features/users/components/dialogs/settings/user-info/subcription-link-button.tsx b/dashboard/src/features/users/components/dialogs/settings/user-info/subscription-link-button.tsx
rename from dashboard/src/features/users/components/dialogs/settings/user-info/subcription-link-button.tsx
rename to dashboard/src/features/users/components/dialogs/settings/user-info/subscription-link-button.tsx
diff --git a/dashboard/src/features/users/components/used-user-traffic.tsx b/dashboard/src/features/users/components/used-user-traffic.tsx
@@ -13,8 +13,8 @@ export const UserUsedTraffic: FC<UserUsedTrafficProps> = (
{ user }
) => {
const { t } = useTranslation()
- const formatedUsedTraffic = format(user.used_traffic)
- const formatedDatalimit = (user.data_limit != null) ? format(user.data_limit) : []
+ const formattedUsedTraffic = format(user.used_traffic)
+ const formattedDatalimit = (user.data_limit != null) ? format(user.data_limit) : []
return (
<div className="flex gap-x-5 justify-start items-center">
<CircularProgress
@@ -24,10 +24,10 @@ export const UserUsedTraffic: FC<UserUsedTrafficProps> = (
/>
<div>
<p className="text-sm font-medium text-gray-900 dark:text-gray-50">
- {formatedUsedTraffic[0]} {formatedUsedTraffic[1]}
+ {formattedUsedTraffic[0]} {formattedUsedTraffic[1]}
</p>
<p className="text-sm text-gray-500 dark:text-gray-500">
- {user.data_limit ? `${formatedDatalimit[0]} ${formatedDatalimit[1]}` : t('page.users.unlimited')}
+ {user.data_limit ? `${formattedDatalimit[0]} ${formattedDatalimit[1]}` : t('page.users.unlimited')}
</p>
</div>
</div>