diff --git a/httpdocs/css/colors.css b/httpdocs/css/colors.css new file mode 100644 index 0000000..d77a7fd --- /dev/null +++ b/httpdocs/css/colors.css @@ -0,0 +1,95 @@ +/* +created by atmos https://app.atmos.style/65cc9eaec76d443c0a796d4b + +** base configuration colors ** +Main: #f90 +Info: #231aee +Danger: #ff0000 +Success: #59ec04 +Neutral: #131211 +*/ + +[class*=color] { + --lightness: 67.66%; + --hue: 64.55; + --chroma: 0.007; + color: oklch(var(--lightness) var(--chroma) var(--hue)); + + &[class*=l1] {--lightness: 10%;} + &[class*=l2] {--lightness: 25%;} + &[class*=l3] {--lightness: 37.5%;} + &[class*=l4] {--lightness: 50%;} + &[class*=l5] {--lightness: 62.5%;} + &[class*=l6] {--lightness: 77.2%;} + &[class*=l7] {--lightness: 90%;} + + &[class*=main] { + --lightness: 77.2%; + --chroma: 0.1738; + --hue: 64.55; + + &[class*=l1] {--chroma: 0.02;} + &[class*=l2] {--chroma: 0.056;} + &[class*=l3] {--chroma: 0.085;} + &[class*=l4] {--chroma: 0.114;} + &[class*=l5] {--chroma: 0.142;} + &[class*=l6] {--chroma: 0.1738;} /* base */ + &[class*=l7] {--chroma: 0.06;} + } + + &[class*=info] { + --lightness: 44.87%; + --chroma: 0.2838; + --hue: 268.0; + + &[class*=l1] {--chroma: 0.055;} + &[class*=l2] {--chroma: 0.158;} + &[class*=l3] {--chroma: 0.237;} + &[class*=l4] {--chroma: 0.2838;} /* base */ + &[class*=l5] {--chroma: 0.19;} + &[class*=l6] {--chroma: 0.109;} + &[class*=l7] {--chroma: 0.04;} + } + + &[class*=alert] { + --lightness: 62.8%; + --chroma: 0.2577; + --hue: 29.23; + + &[class*=l1] {--chroma: 0.036;} + &[class*=l2] {--chroma: 0.103;} + &[class*=l3] {--chroma: 0.154;} + &[class*=l4] {--chroma: 0.195;} + &[class*=l5] {--chroma: 0.2577;} /* base */ + &[class*=l6] {--chroma: 0.133;} + &[class*=l7] {--chroma: 0.045;} + } + + &[class*=success] { + --lightness: 83%; + --chroma: 0.2607; + --hue: 138.96; + + &[class*=l1] {--chroma: 0.029;} + &[class*=l2] {--chroma: 0.083;} + &[class*=l3] {--chroma: 0.124;} + &[class*=l4] {--chroma: 0.157;} + &[class*=l5] {--chroma: 0.208;} + &[class*=l6] {--chroma: 0.2607;} /* base */ + &[class*=l7] {--chroma: 0.201;} + } + + &[class*=neutral] { + --lightness: 18.3%; + --chroma: 0.0026; + --hue: 67.66; + + &[class*=l1] {--chroma: 0.001;} + &[class*=l2] {--chroma: 0.0026;} /* base */ + &[class*=l3] {--chroma: 0.006;} + &[class*=l4] {--chroma: 0.007;} + &[class*=l5] {--chroma: 0.009;} + &[class*=l6] {--chroma: 0.011;} + &[class*=l7] {--chroma: 0.004;} + } +} diff --git a/httpdocs/js/login.js b/httpdocs/js/login.js index e69de29..8b13789 100644 --- a/httpdocs/js/login.js +++ b/httpdocs/js/login.js @@ -0,0 +1 @@ + diff --git a/types.d.ts b/types.d.ts index 0bab5de..328a687 100644 --- a/types.d.ts +++ b/types.d.ts @@ -8,11 +8,20 @@ namespace RateLimit { } } } +namespace RateLimit { + interface obj { + [key: string]: { + limitReachedOnError: boolean, + time: number + } + } +} namespace Response { interface Message { message: string; data?: string | JSON; + data?: string | JSON; } interface Error extends Response.Message { @@ -28,7 +37,18 @@ namespace File { } } +namespace File { + interface Obj { + path: string, + content?: Models.IEntries; + } +} + namespace Models { + interface IEntries { + entries: Models.IEntry[] + } + interface IEntries { entries: IEntry[] } @@ -43,16 +63,19 @@ namespace Models { * Direction in degrees between two coordinate pairs: 0°-360° */ angle?: number, + angle?: number, /** * object containing horizontal vertical and total distance, in meters */ distance: Models.IDistance, + distance: Models.IDistance, /** * object containing horizontal vertical and total speed, in km/h */ speed: Models.ISpeed, + speed: Models.ISpeed, /** * index, position of the entry point in the chain @@ -63,6 +86,7 @@ namespace Models { * Heading or Bearing as recieved from gps */ heading: number, + heading: number, /** * lat @@ -70,6 +94,7 @@ namespace Models { lat: number, + /** * lon */ @@ -90,6 +115,7 @@ namespace Models { * time object containing UNIX timestamps with milliseconds, gps creation time (as recieved via gps), server time (when the server recieved and computed it), differce to last entry (time between waypoints), upload time differnce */ time: Models.time, + time: Models.time, /** * user as recieved @@ -123,6 +149,37 @@ interface CSRFToken { expiry: number; } +interface HttpError extends Error { + status?: number; + statusCode?: number; +} + + interface ITime { + created: number, + recieved: number, + uploadDuration: number, + diff?: number + createdString: string + } + + interface ISpeed { + gps: number; + horizontal?: number, + vertical?: number, + total?: number + } + interface IDistance { + horizontal: number, + vertical: number, + total: number + } +} + +interface CSRFToken { + token: string; + expiry: number; +} + interface HttpError extends Error { status?: number; statusCode?: number;