Skip to content

Commit 972466d

Browse files
authored
Update admin panel (#27)
* Add VSCode tasks for Astro development and Prettier formatting - Created a tasks.json file to define tasks for the Astro dev server and Prettier. - Added a task to run the Astro development server with `npm run dev`. - Included tasks for formatting all files and the current file using Prettier. * Refactor: update Prettier configuration and add Astro plugin; enhance ProductCard and admin layout with new icons and randomization logic * Fix: update transaction status icons and titles for better clarity * Refactor: create OrderCard component to encapsulate order display logic and improve code organization * Refactor: streamline code formatting and improve readability across multiple components * Refactor: simplify OrderCard styling by removing unnecessary class and improving hover effects * Refactor: update OrderCard to correctly display product names in list items and enhance transaction status interactivity * Update package-lock.json to upgrade dependencies and improve compatibility * Refactor: update super-linter workflow to include Node.js setup and Prettier installation * Refactor: update Node.js version in super-linter workflow to use 'latest' * Refactor: remove 'master' branch reference from workflow triggers in devcontainer and super-linter configurations
1 parent 0a8d795 commit 972466d

29 files changed

+633
-467
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"extensions": [
1010
"esbenp.prettier-vscode",
1111
"astro-build.astro-vscode",
12-
"emeraldwalk.RunOnSave"
12+
"gruntfuggly.triggertaskonsave"
1313
]
1414
}
1515
},
16-
"postStartCommand": "npm update && npm install && npx prettier --write .",
16+
"postStartCommand": "npm update && npm install",
1717
"remoteUser": "vscode"
1818
}

.github/CODEOWNER

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/devcontainer-verification.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
push:
88
branches:
99
- main
10-
- master
1110
paths:
1211
- .devcontainer/Dockerfile
1312
pull_request:

.github/workflows/super-linter.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: Lint
32

43
permissions:
@@ -10,7 +9,6 @@ on:
109
push:
1110
branches:
1211
- main
13-
- master
1412
pull_request: null
1513

1614
jobs:
@@ -24,10 +22,20 @@ jobs:
2422
with:
2523
fetch-depth: 0
2624

25+
- name: Set up Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 'latest'
29+
30+
- name: Install Prettier and Astro plugin
31+
run: |
32+
npm install --no-save prettier prettier-plugin-astro
33+
2734
- name: Super-linter
2835
uses: super-linter/super-linter@v7
2936
env:
3037
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3138
VALIDATE_ALL_CODEBASE: false
3239
FILTER_REGEX_EXCLUDE: '(.devcontainer/Dockerfile|.github/pull_request_template.md|.github/ISSUE_TEMPLATE/*.md)'
40+
VALIDATE_JAVASCRIPT_STANDARD: false
3341
VALIDATE_TYPESCRIPT_STANDARD: false

.prettierrc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"printWidth": 80,
3-
"tabWidth": 4,
4-
"trailingComma": "es5",
5-
"useTabs": false,
6-
"semi": false,
7-
"singleQuote": true,
82
"overrides": [
93
{
104
"files": ["*.yml", "*.yaml", "*.md"],
115
"options": {
126
"tabWidth": 2
137
}
148
}
15-
]
9+
],
10+
"plugins": ["prettier-plugin-astro"],
11+
"printWidth": 100,
12+
"semi": false,
13+
"singleQuote": true,
14+
"tabWidth": 4,
15+
"trailingComma": "es5",
16+
"useTabs": false
1617
}

.vscode/settings.json

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
{
2-
"editor.defaultFormatter": "esbenp.prettier-vscode",
3-
"editor.formatOnSave": true,
42
"editor.insertSpaces": true,
5-
"editor.tabSize": 4,
6-
"files.insertFinalNewline": true,
7-
"files.trimFinalNewlines": true,
83
"files.trimTrailingWhitespace": true,
9-
"emeraldwalk.runonsave": {
10-
"commands": [
11-
{
12-
"match": "\\.(js|ts|vue|json|css|scss|md|html)$",
13-
"cmd": "npx prettier --write \"${file}\"",
14-
"autoShowOutputPanel": "error"
15-
}
16-
]
17-
},
18-
"[yaml]": {
19-
"editor.tabSize": 2
20-
},
21-
"[astro]": {
22-
"editor.defaultFormatter": "astro-build.astro-vscode"
4+
"triggerTaskOnSave.tasks": {
5+
"Prettify Current File": ["*"]
236
}
247
}

.vscode/tasks.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Astro Dev Server",
6+
"type": "shell",
7+
"command": "npm run dev",
8+
"runOptions": {
9+
"runOn": "folderOpen"
10+
},
11+
"presentation": {
12+
"clear": true,
13+
"close": true,
14+
"panel": "dedicated",
15+
"showReuseMessage": false
16+
}
17+
},
18+
{
19+
"label": "Prettify All Files",
20+
"type": "shell",
21+
"command": "npx prettier --write .",
22+
"runOptions": {
23+
"runOn": "folderOpen"
24+
},
25+
"presentation": {
26+
"close": true
27+
}
28+
},
29+
{
30+
"label": "Prettify Current File",
31+
"type": "shell",
32+
"command": "npx prettier --write ${file}",
33+
"presentation": {
34+
"showReuseMessage": false
35+
}
36+
}
37+
]
38+
}

0 commit comments

Comments
 (0)