mirror of
https://github.com/hay-kot/homebox.git
synced 2025-05-22 21:32:28 +00:00
chore: cleanup (#27)
* implement password score UI and functions * update strings tests to use `test`instead of `it` * update typing * refactor login/register UI+Logic * fix width on switches to properly display * fetch and store self in store * (WIP) unify card styles * update labels page * bump nuxt * use form area * use text area for description * unify confirm API * unify UI around pages * change header background height
This commit is contained in:
parent
b34cb2bbeb
commit
2e82398e5c
24 changed files with 1313 additions and 1934 deletions
|
@ -2,19 +2,13 @@ import { BaseAPI, route } from "./base";
|
|||
import { ItemsApi } from "./classes/items";
|
||||
import { LabelsApi } from "./classes/labels";
|
||||
import { LocationsApi } from "./classes/locations";
|
||||
import { UserOut } from "./types/data-contracts";
|
||||
import { Requests } from "~~/lib/requests";
|
||||
|
||||
export type Result<T> = {
|
||||
item: T;
|
||||
};
|
||||
|
||||
export type User = {
|
||||
name: string;
|
||||
email: string;
|
||||
isSuperuser: boolean;
|
||||
id: number;
|
||||
};
|
||||
|
||||
export class UserApi extends BaseAPI {
|
||||
locations: LocationsApi;
|
||||
labels: LabelsApi;
|
||||
|
@ -30,7 +24,7 @@ export class UserApi extends BaseAPI {
|
|||
}
|
||||
|
||||
public self() {
|
||||
return this.http.get<Result<User>>({ url: route("/users/self") });
|
||||
return this.http.get<Result<UserOut>>({ url: route("/users/self") });
|
||||
}
|
||||
|
||||
public logout() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue