Skip to content

Commit

Permalink
Update packages and fixes
Browse files Browse the repository at this point in the history
- Updated Makefile to use modern virtual environment creation method
- Fixed token decoding in account/utils/token.py to correctly validate activation tokens
- Updated frontend dependencies, including PrimeVue and Tailwind CSS, to latest versions
- Configured PrimeVue theme to use Aura preset with custom CSS layer order
- Imported ToastService from @primevue/core/api in notify.ts file
  • Loading branch information
synw committed Oct 11, 2024
1 parent d3e3c4c commit 66f73ca
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ venv:
@echo ""
@printf "$(FORMATBLUE)$(FORMATBOLD)---> Install virtual environment <---$(FORMATRESET)\n"
@echo ""
virtualenv -p $(PYTHON_INTERPRETER) $(VENV_PATH)
$(PYTHON_INTERPRETER) -m venv $(VENV_PATH)
# This is required for those ones using old distribution
$(PIP) install --upgrade pip
$(PIP) install --upgrade setuptools
Expand Down
10 changes: 6 additions & 4 deletions apps/account/utils/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@


def decode_token(token: str) -> Tuple[bool, str]:
"""Decode and validate an activation token
"""
Decodes and validates an activation token.
Args:
token (str): the token
token (str): The token to decode and validate.
Returns:
Tuple[bool, str]: is the token valid and the user email
Tuple[bool, str]: A tuple where the first element indicates if
the token is valid and the second element contains
the user email.
"""
email = ""
try:
Expand Down
2 changes: 1 addition & 1 deletion frontend/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}

/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
'IEntypo:login': typeof import('~icons/entypo/login')['default']
Expand Down
38 changes: 20 additions & 18 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,36 @@
"build:clean": "del ./dist"
},
"dependencies": {
"@primevue/themes": "^4.1.0",
"tailwindcss-primeui": "^0.3.4",
"@snowind/header": "^0.1.0",
"@snowind/sidebar": "^0.1.0",
"@snowind/state": "^0.2.0",
"djangoapiforms": "^0.1.0",
"primeicons": "^6.0.1",
"primevue": "3.41.1",
"restmix": "^0.3.1",
"vue": "3.3.9",
"vue-router": "4.2.5"
"primeicons": "^7.0.0",
"primevue": "4.1.0",
"restmix": "^0.5.0",
"vue": "3.5.12",
"vue-router": "4.4.5"
},
"devDependencies": {
"@iconify/json": "2.2.258",
"@snowind/plugin": "^0.5.0",
"del-cli": "^5.1.0",
"@tailwindcss/forms": "^0.5.9",
"@vitejs/plugin-vue": "5.1.4",
"autoprefixer": "^10.4.20",
"del-cli": "^6.0.0",
"move-file-cli": "^3.0.0",
"npm-run-all": "^4.1.5",
"@iconify/json": "2.2.147",
"@tailwindcss/forms": "^0.5.7",
"@vitejs/plugin-vue": "4.5.0",
"autoprefixer": "^10.4.16",
"path": "^0.12.7",
"postcss": "8.4.31",
"sass": "1.69.5",
"tailwindcss": "^3.3.5",
"postcss": "8.4.47",
"sass": "1.79.5",
"tailwindcss": "^3.4.13",
"tailwindcss-semantic-colors": "^0.2.0",
"tslib": "2.6.2",
"typescript": "^5.3.2",
"unplugin-icons": "^0.17.4",
"unplugin-vue-components": "^0.25.2",
"vite": "5.0.2"
"tslib": "2.7.0",
"typescript": "^5.6.3",
"unplugin-icons": "^0.19.3",
"unplugin-vue-components": "^0.27.4",
"vite": "5.4.8"
}
}
18 changes: 12 additions & 6 deletions frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ import router from './router';
import PrimeVue from 'primevue/config';
import ToastService from 'primevue/toastservice';
import ConfirmationService from 'primevue/confirmationservice';
import Aura from '@primevue/themes/aura';
import './assets/index.css';
import 'primeicons/primeicons.css';
import 'primevue/resources/themes/tailwind-light/theme.css';
import 'primevue/resources/primevue.min.css';


const app = createApp(App);

app.use(router).use(PrimeVue).use(ToastService).use(ConfirmationService).mount('#app');

export { app }
app.use(router).use(PrimeVue, {
theme: {
preset: Aura,
options: {
cssLayer: {
name: 'primevue',
order: 'tailwind-base, primevue, tailwind-utilities'
}
}
}
}).use(ToastService).use(ConfirmationService).mount('#app');
2 changes: 1 addition & 1 deletion frontend/src/notify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ToastSeverity, ToastSeverityOptions } from 'primevue/api';
import { ToastSeverity, ToastSeverityOptions } from '@primevue/core/api';
import { useToast } from "primevue/usetoast";
import { useConfirm } from "primevue/useconfirm";
import { ToastServiceMethods } from 'primevue/toastservice';
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Base application requirements

django>=4.0.0,<5.0.0
django
django-ninja
django-cors-headers
pyjwt
Expand Down

0 comments on commit 66f73ca

Please sign in to comment.