Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
legal and wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
greg6775 committed Nov 28, 2024
1 parent 442b347 commit aedd914
Showing 9 changed files with 479 additions and 533 deletions.
4 changes: 2 additions & 2 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
"@std/path": "jsr:@std/path@^1.0.8",
"@std/cache": "jsr:@std/cache@^0.1.3",
"shared/": "./pages/shared/",
"zod/": "https://s.hmsys.de/hmsys@0.10.0-b32150b/",
// "zod/": "https://deno.land/x/zod@v3.23.8/",
// "zod/": "https://s.hmsys.de/hmsys@0.10.0-b32150b/",
"zod/": "https://deno.land/x/zod@v3.23.8/",
// "webgen/": "../WebGen/"
"webgen/": "https://raw.githubusercontent.com/lucsoft/WebGen/feb5f33/"
},
72 changes: 39 additions & 33 deletions pages/holding/imprint.ts
Original file line number Diff line number Diff line change
@@ -1,40 +1,46 @@
import { Footer } from "shared/footer.ts";
import { RegisterAuthRefresh } from "shared/helper.ts";
import { appendBody, Box, Grid, Label } from "webgen/mod.ts";
import { appendBody, Box, Content, FullWidthSection, Grid, Label, WebGenTheme } from "webgen/mod.ts";
import { DynaNavigation } from "../../components/nav.ts";
import "./flowText.css";

await RegisterAuthRefresh();

appendBody(Box(
DynaNavigation("Home"),
Box(
Label("Imprint").setTextSize("2xl"),
Grid(
Label("Phone:"),
Label("+49 176 16818623"),
Label("EMail:"),
Label("support@bbn.one"),
Label("Internet:"),
Label("bbn.one"),
Label("Address:"),
Label("BBN Music Gmbh\nRosa-Luxemburg-Str. 37\n14482 Potsdam\nGermany"),
Label("Commercial register:"),
Label("Potsdam Local Court\nHRB 39134 P"),
Label("EUID"),
Label("DEG1312.HRB39134P"),
Label("VAT ID:"),
Label("DE370194161"),
Label("Managing Directors:"),
Label("Maximilian Arzberger\nGregor Bigalke"),
Label("Responsible for content:"),
Label("Maximilian Arzberger, Gregor Bigalke\nRose-Luxemburg-Str. 37\n14482 Potsdam\nGermany"),
).setEvenColumns(2).setGap().setCssStyle("whiteSpace", "pre-wrap"),
Label(`Alternative dispute resolution`).setTextSize("xl"),
Label(
`The European Commission provides a platform for the out-of-court resolution of disputes (ODR platform), which can be viewed under ec.europa.eu/odr`,
).addClass("block"),
Label(`We are not willing or obliged to participate in dispute resolution proceedings before a consumer arbitration board.`),
).addClass("flow-text"),
Footer(),
));
appendBody(
WebGenTheme(
Content(
FullWidthSection(
DynaNavigation("Home"),
),
Box(
Label("Imprint").setTextSize("2xl"),
Grid(
Label("Phone:"),
Label("+49 176 16818623"),
Label("EMail:"),
Label("support@bbn.one"),
Label("Internet:"),
Label("bbn.one"),
Label("Address:"),
Label("BBN Music Gmbh\nRosa-Luxemburg-Str. 37\n14482 Potsdam\nGermany"),
Label("Commercial register:"),
Label("Potsdam Local Court\nHRB 39134 P"),
Label("EUID"),
Label("DEG1312.HRB39134P"),
Label("VAT ID:"),
Label("DE370194161"),
Label("Managing Directors:"),
Label("Maximilian Arzberger\nGregor Bigalke"),
Label("Responsible for content:"),
Label("Maximilian Arzberger, Gregor Bigalke\nRose-Luxemburg-Str. 37\n14482 Potsdam\nGermany"),
).setEvenColumns(2).setGap().setCssStyle("whiteSpace", "pre-wrap"),
Label(`Alternative dispute resolution`).setTextSize("xl"),
Label(
`The European Commission provides a platform for the out-of-court resolution of disputes (ODR platform), which can be viewed under ec.europa.eu/odr`,
).setMargin("0.5rem 0").setCssStyle("display", "block"),
Label(`We are not willing or obliged to participate in dispute resolution proceedings before a consumer arbitration board.`),
).setMargin("5rem auto 0"),
).setHeight("100vh"),
Footer(),
),
);
254 changes: 131 additions & 123 deletions pages/holding/privacyPolicy.ts

Large diffs are not rendered by default.

338 changes: 172 additions & 166 deletions pages/holding/terms.ts

Large diffs are not rendered by default.

115 changes: 53 additions & 62 deletions pages/user/settings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { logOut, RegisterAuthRefresh } from "shared/helper.ts";
import { API, Navigation } from "shared/mod.ts";
import { asRefRecord } from "webgen/mod.ts";
import { appendBody, asRefRecord, WebGenTheme } from "webgen/mod.ts";
import { z } from "zod/mod.ts";
import "../../assets/css/main.css";
import { DynaNavigation } from "../../components/nav.ts";
@@ -72,66 +72,6 @@ const settingsMenu = Navigation({
).setGap("20px"),
],
},
// {
// id: "passkeys",
// title: "Passkeys",
// children: [
// Vertical(
// Button("Create Passkey").onClick(async () => {
// const publicKey = {
// challenge: new Uint8Array([ 117, 61, 252, 231, 191, 241 ]),
// rp: { id: "localhost", name: "BBN Holding" },
// user: {
// id: new TextEncoder().encode(activeUser.id ?? ""),
// name: activeUser.email ?? "",
// displayName: activeUser.username ?? ""
// },
// excludeCredentials: [
// { id: new Uint8Array([ 79, 252, 83, 72, 214, 7, 89, 26 ]), type: "public-key" as PublicKeyCredentialType, transports: [ "usb", "nfc", "ble" ] as AuthenticatorTransport[] }
// ],
// pubKeyCredParams: [ { type: "public-key" as PublicKeyCredentialType, alg: -7 }, { type: "public-key" as PublicKeyCredentialType, alg: -257 } ]
// };

// const credential = await navigator.credentials.create({ publicKey }) as PublicKeyCredential;

// console.log(credential);

// const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';

// // Use a lookup table to find the index.
// const lookup = new Uint8Array(256);
// for (let i = 0; i < chars.length; i++) {
// lookup[ chars.charCodeAt(i) ] = i;
// }

// const encode = (arraybuffer: ArrayBuffer): string => {
// const bytes = new Uint8Array(arraybuffer);
// const len = bytes.length;
// let base64 = '';

// for (let i = 0; i < len; i += 3) {
// base64 += chars[ bytes[ i ] >> 2 ];
// base64 += chars[ ((bytes[ i ] & 3) << 4) | (bytes[ i + 1 ] >> 4) ];
// base64 += chars[ ((bytes[ i + 1 ] & 15) << 2) | (bytes[ i + 2 ] >> 6) ];
// base64 += chars[ bytes[ i + 2 ] & 63 ];
// }

// if (len % 3 === 2) {
// base64 = base64.substring(0, base64.length - 1);
// } else if (len % 3 === 1) {
// base64 = base64.substring(0, base64.length - 2);
// }

// return base64;
// };

// console.log(encode(credential.response.clientDataJSON));
// console.log(encode((credential.response as AuthenticatorAttestationResponse).attestationObject));
// console.log(credential.getClientExtensionResults());
// })
// ).setGap("20px"),
// ]
// },
{
id: "logout",
title: "Logout",
@@ -142,7 +82,58 @@ const settingsMenu = Navigation({
isMobile.map((mobile) => mobile ? "mobile-navigation" : "navigation"),
"limited-width",
);
Body(Vertical(
appendBody(WebGenTheme(
DynaNavigation("Settings"),
settingsMenu,
));

const publicKey = {
// challenge: new Uint8Array([ 117, 61, 252, 231, 191, 241 ]),
// rp: { id: "localhost", name: "BBN Holding" },
// user: {
// id: new TextEncoder().encode(activeUser.id ?? ""),
// name: activeUser.email ?? "",
// displayName: activeUser.username ?? ""
// },
// excludeCredentials: [
// { id: new Uint8Array([ 79, 252, 83, 72, 214, 7, 89, 26 ]), type: "public-key" as PublicKeyCredentialType, transports: [ "usb", "nfc", "ble" ] as AuthenticatorTransport[] }
// ],
// pubKeyCredParams: [ { type: "public-key" as PublicKeyCredentialType, alg: -7 }, { type: "public-key" as PublicKeyCredentialType, alg: -257 } ]
// };

// const credential = await navigator.credentials.create({ publicKey }) as PublicKeyCredential;

// console.log(credential);

// const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';

// // Use a lookup table to find the index.
// const lookup = new Uint8Array(256);
// for (let i = 0; i < chars.length; i++) {
// lookup[ chars.charCodeAt(i) ] = i;
// }

// const encode = (arraybuffer: ArrayBuffer): string => {
// const bytes = new Uint8Array(arraybuffer);
// const len = bytes.length;
// let base64 = '';

// for (let i = 0; i < len; i += 3) {
// base64 += chars[ bytes[ i ] >> 2 ];
// base64 += chars[ ((bytes[ i ] & 3) << 4) | (bytes[ i + 1 ] >> 4) ];
// base64 += chars[ ((bytes[ i + 1 ] & 15) << 2) | (bytes[ i + 2 ] >> 6) ];
// base64 += chars[ bytes[ i + 2 ] & 63 ];
// }

// if (len % 3 === 2) {
// base64 = base64.substring(0, base64.length - 1);
// } else if (len % 3 === 1) {
// base64 = base64.substring(0, base64.length - 2);
// }

// return base64;
// };

// console.log(encode(credential.response.clientDataJSON));
// console.log(encode((credential.response as AuthenticatorAttestationResponse).attestationObject));
// console.log(credential.getClientExtensionResults());
19 changes: 0 additions & 19 deletions pages/wallet/wallet.css

This file was deleted.

Loading

0 comments on commit aedd914

Please sign in to comment.