Featureful (#31)
* Fix loading within the CLI * Remove app * Remove promise handle * Add initial travis file * Add libxkbfile dependency * Add libxkbfile-dev * Add build script * Fix malformed bash statement * Remove yarn from script * Improve build script * Extract upx before usage * Only run upx if on linux * Ensure resource directory exists * Pack runnable binary * Export binary with platform * Improve build process * Install upx before running install script * Update typescript version before running nexe * Add os.release() function for multi-platform support * Update travis.yml to improve deployment * Add on CI * Update to v1.31.0 * Add libsecret * Update build target * Skip cleanup * Fix built-in extensions * Add basics for apps * Create custom DNS server * Fix forking within CLI. Fixes TS language features * Fix filename resolve * Fix default extensions path * Add custom dialog * Store workspace path * Remove outfiles * Cleanup * Always authed outside of CLI * Use location.host for client * Remove useless app interface * Remove debug file for building wordlist * Use chromes tcp host * Update patch * Build browser app before packaging * Replace all css containing file:// URLs, fix webviews * Fix save * Fix mkdir
This commit is contained in:
43
packages/app/browser/src/app.html
Normal file
43
packages/app/browser/src/app.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
|
||||
<title>Coder</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="login">
|
||||
<div class="back">
|
||||
<- Back </div> <h4 class="title">AWS Cloud</h4>
|
||||
<h2 class="subtitle">
|
||||
Enter server password
|
||||
</h2>
|
||||
<div class="mdc-text-field">
|
||||
<input type="password" id="password" class="mdc-text-field__input" required>
|
||||
<label class="mdc-floating-label" for="password">Password</label>
|
||||
<div class="mdc-line-ripple"></div>
|
||||
</div>
|
||||
<div class="mdc-text-field-helper-line">
|
||||
<div class="mdc-text-field-helper-text">helper text</div>
|
||||
</div>
|
||||
<div class="mdc-form-field">
|
||||
<div class="mdc-checkbox">
|
||||
<input type="checkbox" class="mdc-checkbox__native-control" id="remember" />
|
||||
<div class="mdc-checkbox__background">
|
||||
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
|
||||
<path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
|
||||
</svg>
|
||||
<div class="mdc-checkbox__mixedmark"></div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="remember">Remember Me</label>
|
||||
</div>
|
||||
<button id="submit" class="mdc-button mdc-button--unelevated">
|
||||
<span class="mdc-button__label">Enter IDE</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
108
packages/app/browser/src/app.scss
Normal file
108
packages/app/browser/src/app.scss
Normal file
@ -0,0 +1,108 @@
|
||||
@import url("https://use.typekit.net/vzk7ygg.css");
|
||||
|
||||
html, body {
|
||||
background-color: #FFFFFF;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'aktiv-grotesk';
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: calc(100vh - 20px);
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
--mdc-theme-primary: #AAADA1;
|
||||
--mdc-theme-secondary: #AAADA1;
|
||||
|
||||
&.in-app {
|
||||
.back {
|
||||
pointer-events: all;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.login {
|
||||
box-shadow: 0 18px 80px 10px rgba(69, 65, 78, 0.08);
|
||||
max-width: 328px;
|
||||
width: 100%;
|
||||
padding: 40px;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
color: #575962;
|
||||
|
||||
.title {
|
||||
margin-bottom: 0px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 1.5px;
|
||||
line-height: 15px;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 0px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
font-size: 19px;
|
||||
font-weight: bold;
|
||||
line-height: 25px;
|
||||
margin-bottom: 45px;
|
||||
}
|
||||
|
||||
.mdc-text-field {
|
||||
width: 100%;
|
||||
background: none !important;
|
||||
|
||||
&::before {
|
||||
background: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mdc-form-field {
|
||||
text-align: left;
|
||||
font-size: 12px;
|
||||
color: #797E84;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.mdc-button {
|
||||
border-radius: 24px;
|
||||
padding-left: 75px;
|
||||
padding-right: 75px;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
height: 48px;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
box-shadow: 0 12px 17px 2px rgba(171,173,163,0.14), 0 5px 22px 4px rgba(171,173,163,0.12), 0 7px 8px -4px rgba(171,173,163,0.2);
|
||||
margin-top: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label {
|
||||
color: var(--mdc-theme-primary);
|
||||
}
|
||||
|
||||
.mdc-floating-label--float-above {
|
||||
transform: translateY(-70%) scale(0.75);
|
||||
}
|
||||
|
||||
.mdc-text-field:not(.mdc-text-field--disabled):not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mdc-text-field__input, .mdc-text-field:not(.mdc-text-field--disabled):not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mdc-text-field__input:hover {
|
||||
border-bottom-color: #EBEDF2;
|
||||
}
|
||||
|
||||
.back {
|
||||
position: absolute;
|
||||
top: -50px;
|
||||
left: -50px;
|
||||
font-weight: bold;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
|
||||
// transition: 500ms opacity ease;
|
||||
}
|
30
packages/app/browser/src/app.ts
Normal file
30
packages/app/browser/src/app.ts
Normal file
@ -0,0 +1,30 @@
|
||||
//@ts-ignore
|
||||
import { MDCTextField } from "@material/textfield";
|
||||
//@ts-ignore
|
||||
import { MDCCheckbox } from "@material/checkbox";
|
||||
import "material-components-web/dist/material-components-web.css";
|
||||
import "./app.scss";
|
||||
|
||||
document.querySelectorAll(".mdc-text-field").forEach((d) => window["t"] = new MDCTextField(d));
|
||||
document.querySelectorAll(".mdc-checkbox").forEach((d) => new MDCCheckbox(d));
|
||||
|
||||
window.addEventListener("message", (event) => {
|
||||
if (event.data === "app") {
|
||||
document.body.classList.add("in-app");
|
||||
|
||||
const back = document.querySelector(".back")!;
|
||||
back.addEventListener("click", () => {
|
||||
(event.source as Window).postMessage("back", event.origin);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const password = document.getElementById("password") as HTMLInputElement;
|
||||
const submit = document.getElementById("submit") as HTMLButtonElement;
|
||||
if (!submit) {
|
||||
throw new Error("No submit button found");
|
||||
}
|
||||
submit.addEventListener("click", () => {
|
||||
document.cookie = `password=${password.value}`;
|
||||
location.reload();
|
||||
});
|
Reference in New Issue
Block a user