Compare commits

...

2 Commits

Author SHA1 Message Date
8a7da6e146 Folder structure change for backend 2024-08-11 20:06:53 +05:30
b0a0e23090 colour consistency on top buttons 2024-08-11 20:01:43 +05:30
9 changed files with 20 additions and 23 deletions

0
backend/__init__.py Normal file
View File

View File

@ -1,6 +1,4 @@
import datetime import datetime
import json
import os
from typing import Any, Union from typing import Any, Union
import bcrypt import bcrypt
@ -9,7 +7,7 @@ from fastapi import Depends, HTTPException, status
from fastapi.security import HTTPBearer from fastapi.security import HTTPBearer
from jwt.exceptions import InvalidTokenError from jwt.exceptions import InvalidTokenError
import queries import backend.queries as queries
ACCESS_TOKEN_EXPIRE_MINUTES = 30 # 30 minutes ACCESS_TOKEN_EXPIRE_MINUTES = 30 # 30 minutes
ALGORITHM = "HS256" ALGORITHM = "HS256"

View File

@ -6,12 +6,12 @@ from fastapi import Depends, FastAPI, HTTPException, status
from fastapi.encoders import jsonable_encoder from fastapi.encoders import jsonable_encoder
from fastapi.middleware.cors import CORSMiddleware from fastapi.middleware.cors import CORSMiddleware
import queries import backend.queries as queries
from auth import Hasher, create_access_token, get_current_user from backend.auth import Hasher, create_access_token, get_current_user
from crypto import (deserialize_into_bytes, fernet_decrypt, fernet_encrypt, from backend.crypto import (deserialize_into_bytes, fernet_decrypt,
generate_random_encryption_key, generate_user_passkey, fernet_encrypt, generate_random_encryption_key,
serialize_bytes) generate_user_passkey, serialize_bytes)
from models import Key, Secret, User, UserLogin from backend.models import Key, Secret, User, UserLogin
app = FastAPI() app = FastAPI()

View File

@ -17,25 +17,21 @@
</el-button-group> </el-button-group>
<div> <div>
<el-form-item label="Show OTPs"> <el-form-item label="Show OTPs">
<el-switch v-model="showSecrets" active-value="yes" inactive-value="no" /> <el-switch
v-model="showSecrets"
active-value="yes"
inactive-value="no"
style="--el-switch-on-color: #67c23a"
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="sort-options"> <div class="sort-options">
<span> <span>
<el-form-item label="Sort"> <el-form-item label="Sort">
<el-select <el-radio-group v-model="currentSort" @change="sortItems" fill="#67c23a">
v-model="currentSort" <el-radio-button label="A > Z" value="asc" />
placeholder="Select" <el-radio-button label="Z > A" value="desc" />
style="width: 80px" </el-radio-group>
@change="sortItems"
>
<el-option
v-for="item in sortOptions"
:key="item.key"
:label="item.name"
:value="item.key"
/>
</el-select>
</el-form-item> </el-form-item>
</span> </span>
</div> </div>

View File

@ -107,6 +107,7 @@ export default {
.issuer { .issuer {
font-weight: 700; font-weight: 700;
/* max-width: 140px; */
} }
.user { .user {
@ -122,6 +123,8 @@ export default {
.card-top { .card-top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
max-width: 140px;
overflow: hidden;
} }
.card-button { .card-button {
position: relative; position: relative;