Skip to content

Commit

Permalink
feat: custom template injecting
Browse files Browse the repository at this point in the history
  • Loading branch information
ayZagen committed May 7, 2024
1 parent 861dda9 commit 7e6329f
Show file tree
Hide file tree
Showing 13 changed files with 465 additions and 155 deletions.
3 changes: 2 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const config: StorybookConfig = {
staticDirs: [{ from: '../stories/public', to: '/' }],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-links'
'@storybook/addon-links',
'storybook-addon-vue-mdx'
],

core: {
Expand Down
8 changes: 8 additions & 0 deletions dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ window['PlusAuth'] = {
lower_case: 4
}
},
prompt: {
// mode: 'check_email'
},
// error: {
// error: 'invalid_password'
// },
details: {
// dataUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADuNJREFUeF7tndGW2zgMQzv//9Hd403P2unYIi8FWs4s+lqaokCApDSJ8/Xr16/fvz7k3+/f56F+fX1JdqDyr/KzbYr6UtlfAXqF9dW61I8kkUInG7MskD+AUnJd5UHlxwIRMr3oygI5AKcitsqPBVJktfAxC8QCQXTyiIXgutdYWZnPIlf5V/lxB7mXX2eruYO4gyAWuoMguO41VlZmd5AXAqrbJ5WfexkVrzbsIHTT8XI5C1WVyq0WW628RlYVhe5c0pxR+zhLcxZX8VggCVwtkBgkSnhqH0cwZ2GBTOBngcTgUcJT+ziCOQsLZAI/CyQGjxKe2scRzFlYIBP4WSAxeJTw1D6OYM7CApnAzwKJwaOEp/ZxBHMWUoGsIgy9iaFJoPuiN0w0/i3lNKYrmtBYKd3o3rpzo8KhdIu1KmlPSwIlHY3fAtlpvopzFsih1NAkWCA7eFT87iCJHt1NsO4kdMfvDuIOciojSuwrLVI/7iCJqnZh4g4yMYqoDkxPS4I7iEcsVOFp/VER7ImVn2BB499802JBu2x3Uevu7qr4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WFsgEfjSZFkgMNsU09jhnYYFM4EeTaYHEYFNMY49zFhbIBH40mRZIDDbFNPY4Z/Gjf2FqDpr608rLBEqYbnvVhQVFl+5L5d8CoUgm7C2QHSQVFhbIBPHuGF0S4f1noiLF5pASo9veHYQw4WZb+lHum8OzQE4AVxULKnya+yv/HrEokgl7FSncQXawLZAJ4nnEqhNJRTyVn6eNcP8ArVHL1OUyEKoAAAAASUVORK5CYII=',
// secret: 'ASFG$E@WRF$ERF$EFG$REG',
push_code: '02',
phone_number: '+90********23',
scopes: {
Expand Down
124 changes: 73 additions & 51 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,58 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<head >
<meta charset="UTF-8" >
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<title >Title</title >
<style id="dev-style">
html, body{
margin: 0;
height: 100%;
}
.dev-navbar {
position: absolute;
left: 0;
display: flex;
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<title>Title</title>
<style id="dev-style">
html, body {
margin: 0;
height: 100%;
}

.dev-navbar {
position: absolute;
left: 0;
display: flex;
font-family: sans-serif;
flex-direction: column;
z-index: 123213;
}
.dev-navbar a {
display: inline-flex;
flex-direction: column;
z-index: 123213;
}

.dev-navbar a {
display: inline-flex;
color: inherit;
text-decoration: inherit;
padding: 10px;
text-align: center;
border: 1px solid #dedede;
text-decoration: none;
}
#app{
height: 100%;
}
</style >
</head >
<body >
padding: 10px;
text-align: center;
border: 1px solid #dedede;
text-decoration: none;
}

#app {
height: 100%;
}

@media (max-width: 1200px) {
.dev-navbar {
display: none;
}
}

</style>
</head>
<body>
<div class="pa__dev-navbar">
<a href="/signin" > Login </a >
<a href="/signup" > Register </a >
<a href="/signin/consent" > Consent </a >
<a href="/signin/passwordless/email" > Passwordless Email </a >
<a href="/signin/passwordless/sms" > Passwordless Sms </a >
<a href="/signin/passwordless/otp" > Passwordless OTP </a >
<a href="/signin/passwordless/push" > Passwordless Push </a >
<a href="/account/verifyEmail" > VerifyEmail </a >
<a href="/account/updateMissingInformation" > Fill Missing </a >
<a href="/account/resetPassword/token" > Password Reset </a >
<a href="/signin/recovery" > Password Recovery </a >
<a href="/signin/challenge" > Challenge </a >
<a href="/signin/challenge/sms" > SMS </a >
<a href="/signin/challenge/email" > EMAIL </a >
<a href="/signin/challenge/otp" > OTP </a >
<a href="/signin/challenge/fv" > FingerVein </a >
<a href="/signin/challenge/push" > Push </a >
<a href="/signin/challenge/webauthn" > WebAuthN </a >
<a href="/signin"> Login </a>
<a href="/signup"> Register </a>
<a href="/signin/consent"> Consent </a>
<a href="/signin/passwordless/email"> Passwordless Email </a>
<a href="/signin/passwordless/sms"> Passwordless Sms </a>
<a href="/signin/passwordless/otp"> Passwordless OTP </a>
<a href="/signin/passwordless/push"> Passwordless Push </a>
<a href="/account/verifyEmail"> VerifyEmail </a>
<a href="/account/updateMissingInformation"> Fill Missing </a>
<a href="/account/resetPassword/token"> Password Reset </a>
<a href="/signin/recovery"> Password Recovery </a>
<a href="/signin/challenge"> Challenge </a>
<a href="/signin/challenge/sms"> SMS </a>
<a href="/signin/challenge/email"> EMAIL </a>
<a href="/signin/challenge/otp"> OTP </a>
<a href="/signin/challenge/fv"> FingerVein </a>
<a href="/signin/challenge/push"> Push </a>
<a href="/signin/challenge/webauthn"> WebAuthN </a>
</div>
<div id="pa__app" ></div>
<script src="/dev.ts" type="module"></script >
</body >
</html >
<div id="pa__app">
<template id="pa-content-footer">
<style>
.my-class {
background: red;
}
</style>
<div class="my-class"> test ssss</div>
<h1> TEst 22e2323 </h1>
<a href="/signin">Signin</a>
</template>
</div>
<script src="/dev.ts" type="module"></script>
</body>
</html>
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@
"@popperjs/core": "2.11.8",
"@simplewebauthn/browser": "^10.0.0",
"deepmerge": "4.3.1",
"vue": "^3.4.26"
"vue": "^3.4.27"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"storybook-addon-vue-mdx": "^0.1.5",
"@release-it/conventional-changelog": "^8.0.1",
"@storybook/addon-essentials": "^8.0.10",
"@storybook/addon-interactions": "^8.0.10",
Expand All @@ -55,10 +56,10 @@
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/compiler-sfc": "^3.4.26",
"@vue/compiler-sfc": "^3.4.27",
"@vue/language-service": "^2.0.16",
"@vue/shared": "^3.4.26",
"@vue/test-utils": "^2.4.5",
"@vue/shared": "^3.4.27",
"@vue/test-utils": "^2.4.6",
"@vue/vue3-jest": "^29.2.6",
"autoprefixer": "^10.4.19",
"core-js": "^3.37.0",
Expand Down
Loading

0 comments on commit 7e6329f

Please sign in to comment.