Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New UI Design #2889

Merged
merged 88 commits into from May 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
ad97cdc
fonts, colors, backgrounds, content transition
naltatis Jan 11, 2022
56845b2
slidy panel
naltatis Jan 11, 2022
499501a
icons, panel
naltatis Jan 14, 2022
1ed6890
reworked energyflow area
naltatis Jan 15, 2022
bafaf71
energy flow legend
naltatis Jan 20, 2022
ba7971a
energy flow legend
naltatis Jan 20, 2022
501bcd2
colors; energyflow finetune
naltatis Jan 20, 2022
fdb3cde
content styles; new mode select
naltatis Jan 22, 2022
eb49235
vehicle; loadpoint details
naltatis Jan 22, 2022
b0749a7
stable layout; xl support; phases
naltatis Jan 24, 2022
686db23
header footer rebuild, slide perf improvement
naltatis Jan 26, 2022
3112cdd
optimized mobile loadpoints
naltatis Jan 27, 2022
b7b32d7
vehicle area, targetSoC, vehicleSoC
naltatis Jan 28, 2022
ee2c2bc
vehicles things
naltatis Feb 2, 2022
43dea42
better phase visualization
naltatis Feb 4, 2022
e99b667
target time
naltatis Feb 4, 2022
1cf7a9d
migrated from vue-cli to vite
naltatis Feb 5, 2022
8cd5546
migrated to vite; meta und favicons
naltatis Feb 6, 2022
0486ce5
upgrade to vue 3
naltatis Feb 10, 2022
3a177dc
finished vue 3 migration; fixed modals
naltatis Feb 11, 2022
f93ba28
target charge format
naltatis Feb 12, 2022
0609cc8
migrated storybook to vue3
naltatis Feb 15, 2022
9369050
footer alignment / icons
naltatis Feb 15, 2022
e8dfc36
preview neighbor left/right loadpoints; css trickery
naltatis Feb 17, 2022
d374990
cleaner phases
naltatis Feb 20, 2022
5e43a32
car pool
naltatis Feb 21, 2022
7512ae5
car pool
naltatis Feb 22, 2022
95d2cc3
better demo mode
naltatis Feb 24, 2022
56d1af9
vehicles/loadpoints layout for large screens
naltatis Feb 25, 2022
8292a3e
i18n, cleanup, meta handling, warnings, dep upgrades
naltatis Feb 27, 2022
e00e43f
Merge branch 'master' into feature/new_design
naltatis Feb 27, 2022
2f0ec47
ui build
naltatis Feb 27, 2022
a45c8aa
add vehicle logins to top navigation; more storybook
naltatis Feb 27, 2022
0501995
better section names
naltatis Feb 28, 2022
f1cdacd
design improvements; simpler legend; minimize icons in visualization;…
naltatis Mar 5, 2022
afde178
design improvements; simpler legend; minimize icons in visualization;…
naltatis Mar 5, 2022
36f98a4
optimized few wb/vehicle layout; added logo to footer; parking refine…
naltatis Mar 6, 2022
9163b96
notifications
naltatis Mar 6, 2022
3aeebd4
spacing and border adjustments
naltatis Mar 8, 2022
82466ef
update; new modes
naltatis Mar 8, 2022
a81a02d
icon refresh
naltatis Mar 13, 2022
1f30d67
feature toggle
naltatis Mar 14, 2022
8413e53
alignment
naltatis Mar 14, 2022
8c2e99a
better demo
naltatis Mar 14, 2022
ed8687c
deps upgrade; ui fix
naltatis Mar 15, 2022
acccd34
Merge branch 'master' into feature/new_design
naltatis Mar 15, 2022
4727b9b
removed old test
naltatis Mar 15, 2022
bbc2ca4
Merge branch 'master' into feature/new_design
naltatis Mar 15, 2022
2eb103f
kWh, reproducable builds, target range estimate
naltatis Mar 15, 2022
7eb2517
kWh, reproducable builds, target range estimate
naltatis Mar 15, 2022
f7cdb57
inactive phases
naltatis Mar 16, 2022
227a287
update target soc on drag
naltatis Mar 17, 2022
9b430b2
darker gray, better readibility
naltatis Mar 23, 2022
cf944d2
compacter layout on mobile screens
naltatis Mar 23, 2022
a101855
Merge branch 'master' into feature/new_design
naltatis Apr 1, 2022
e34cce7
Merge branch 'master' into feature/new_design
naltatis Apr 6, 2022
3d5aa86
merge
naltatis Apr 6, 2022
e137093
deps upgrade
naltatis Apr 6, 2022
b980078
show projected start time; disable target time for off/now modes; rel…
naltatis Apr 6, 2022
e259106
porcelain
naltatis Apr 6, 2022
3d2d38e
porcelain
naltatis Apr 6, 2022
b0b6cb9
Merge branch 'master' into feature/new_design
naltatis Apr 11, 2022
1b13d20
add contribute explanation to readme
naltatis Apr 11, 2022
950d0ef
Merge branch 'master' into feature/new_design
naltatis Apr 12, 2022
7eec89e
eliminate white flash on slide up
naltatis Apr 12, 2022
9047801
eliminate white flash on slide up
naltatis Apr 12, 2022
1b97437
eliminate white flash on slide up
naltatis Apr 12, 2022
a14d34f
optimized mobile view; firefox slider fix
naltatis Apr 13, 2022
4fac42f
chore: upgrade spf13/viper
andig Apr 13, 2022
af5b062
compacter layout for larger screens
naltatis Apr 14, 2022
3ebee29
demo logic fix
naltatis Apr 14, 2022
a34fa60
disconnected state
naltatis Apr 14, 2022
12a77c8
disconnected state
naltatis Apr 14, 2022
7c97bf3
prevent content jump on energyflow detail reveal
naltatis Apr 16, 2022
d0484e3
translation fix
naltatis Apr 19, 2022
a1eca66
translation fix
naltatis Apr 19, 2022
5dff3dc
Merge branch 'master' into feature/new_design
naltatis Apr 22, 2022
1eed304
merge
naltatis Apr 22, 2022
4206f56
Merge branch 'master' into feature/new_design
naltatis Apr 25, 2022
65d305e
lint fix
naltatis Apr 25, 2022
2fd17c8
inline phases; compacter layout; simplified energyflow details animation
naltatis Apr 29, 2022
3b310a4
Merge branch 'master' into feature/new_design
naltatis Apr 29, 2022
e7f89de
improved savings dialog (shorter title, removed experimental note); a…
naltatis Apr 29, 2022
432b3f9
more concice target charge texts
naltatis Apr 29, 2022
c022f0a
improve statusbar colors in iOS homescreen mode
naltatis Apr 30, 2022
df504e4
replace transition durations with variables > consistancy; improve al…
naltatis Apr 30, 2022
8811c89
move range estimate unter SoC for small screens
naltatis May 1, 2022
5fcb07d
remove / before km range
naltatis May 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .eslintrc.js
Expand Up @@ -6,9 +6,10 @@ module.exports = {
},
extends: [
"eslint:recommended",
"plugin:vue/recommended",
"plugin:vue/vue3-recommended",
"plugin:prettier/recommended",
"prettier",
"plugin:storybook/recommended",
],
rules: {
"vue/require-default-prop": "off",
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/default.yml
Expand Up @@ -72,6 +72,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: "16"

- name: Cache NPM modules
uses: actions/cache@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -24,3 +24,4 @@ ca-cert.srl
server-key.pem
ca-key.pem
cmd/wip
fly.toml
19 changes: 19 additions & 0 deletions .storybook/main.js
@@ -1,4 +1,23 @@
const { loadConfigFromFile } = require("vite");
const path = require("path");

module.exports = {
stories: ["../assets/js/**/*.stories.mdx", "../assets/js/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-postcss"],
framework: "@storybook/vue3",
core: {
builder: "storybook-builder-vite",
},
staticDirs: ["../assets"],
async viteFinal(config, b) {
const { config: userConfig } = await loadConfigFromFile(
path.resolve(__dirname, "../vite.config.ts")
);
const vuePlugin = userConfig.plugins.find((p) => p.name === "vite:vue");

const vuePluginIndex = config.plugins.findIndex((p) => p.name === "vite:vue");
config.plugins[vuePluginIndex] = vuePlugin;

return config;
},
};
4 changes: 0 additions & 4 deletions .storybook/preview-head.html

This file was deleted.

24 changes: 23 additions & 1 deletion .storybook/preview.js
@@ -1,4 +1,26 @@
import "bootstrap/dist/css/bootstrap.min.css";
import "bootstrap";
import smoothscroll from "smoothscroll-polyfill";
import { app } from "@storybook/vue3";
import i18n from "../assets/js/i18n";
import "../assets/css/app.css";

smoothscroll.polyfill();
app.use(i18n);

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
}
backgrounds: {
default: "dark",
values: [
{
name: "light",
value: "#ffffff",
},
{
name: "dark",
value: "#28293e",
},
],
},
};
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -12,7 +12,7 @@ RUN make install-ui

# build ui
COPY assets assets
COPY vue.config.js vue.config.js
COPY vite.config.js vite.config.js
COPY .eslintrc.js .eslintrc.js
RUN make clean ui

Expand Down
41 changes: 39 additions & 2 deletions README.md
Expand Up @@ -41,14 +41,51 @@ Evcc is an extensible EV Charge Controller with PV integration implemented in [G

You'll find everything you need in our [documentation](https://docs.evcc.io/) (German).

## Build
## Contribute

To build EVCC from source, [Go][2] 1.18 and [Node][3] 16 are required:
To build evcc from source, [Go][2] 1.18 and [Node][3] 16 are required.

Build and run go backend. The UI becomes available at http://127.0.0.1:7070/

```sh
make
./evcc
```

For frontend development start the Vue toolchain in dev-mode. Open http://127.0.0.1:7071/ to get to the livelreloading development server. It pulls its data from port 7070 (see above).

```sh
npm install
npm run start
```

### Code formatting

We use linters (golangci-lint, Prettier) to keep a coherent source code formatting. It's recommended to use the format-on-save feature of your editor. For VSCode use the [Go](https://marketplace.visualstudio.com/items?itemName=golang.Go), [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) and [Veture](https://marketplace.visualstudio.com/items?itemName=octref.vetur) extension. You can manually reformat your code by running:

```sh
make lint
make lint-ui
```

### Changing UI code

To ensure reproducability the build frontend artifacts are part of the source code repository. If you've made changes to frontend code, please make sure to rebuild the production assets before you commit.

```sh
make ui
```

### Changing templates

Evcc supports a massive amount of different devices. To keep our documentation and website in sync with the latest software the core project (this repo) generates meta-data that's pushed to the `docs` and `evcc.io` repository. Make sure to update this meta-data every time you make changes to a templates.

```sh
make docs
```

If you miss one of the above steps Gitub Actions will likely trigger a **Porcelain** error.

## Sponsorship

Evcc believes in open source software. We're committed to provide best in class EV charging experience.
Expand Down
Binary file added assets/.DS_Store
Binary file not shown.
125 changes: 119 additions & 6 deletions assets/css/app.css
@@ -1,14 +1,67 @@
@font-face {
font-family: "Montserrat";
src: url("../font/Montserrat-Medium.woff2") format("woff2");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Montserrat";
src: url("../font/Montserrat-Bold.woff2") format("woff2");
font-weight: bold;
font-style: normal;
}

:root {
--evcc-green: #66d85a;
--evcc-dark-green: #3aba2c;
--evcc-yellow: #ffe000;
--evcc-green: #baffcb;
--evcc-dark-green: #0fde41;
--evcc-yellow: #faf000;
--bs-gray-dark: #28293e;
--bs-gray-medium: #93949e;

--evcc-grid: var(--bs-gray-dark);
--evcc-self: var(--evcc-dark-green);
--evcc-export: var(--evcc-yellow);

--evcc-transition-slow: 1000ms;
--evcc-transition-medium: 500ms;
--evcc-transition-fast: 250ms;
--evcc-transition-very-fast: 100ms;

--bs-primary: var(--evcc-dark-green);
--bs-primary-rgb: 58, 186, 44;

--bs-body-font-size: 14px;
--bs-font-sans-serif: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
}

html {
/* prevents content jump when scrollbar is activate */
width: 100vw;
overflow-x: hidden;
}

body {
background-color: var(--evcc-gray-dark);
}

h1,
h2,
h3,
h4 {
font-weight: bold;
}

h1,
h2 {
font-size: 1.25rem;
text-transform: uppercase;
}

h3,
h4 {
font-size: 1.25rem;
}

.bg-primary {
Expand All @@ -27,22 +80,33 @@ a {
opacity: 0.25;
}

.rounded {
border-radius: 10px !important;
}

.btn-primary,
.btn-primary:focus {
background-color: var(--bs-gray-dark);
border-color: var(--bs-gray-dark);
}

.btn-primary:hover,
.btn-primary:active {
background-color: var(--evcc-dark-green);
border-color: var(--evcc-dark-green);
}
.btn-outline-primary {
.btn-outline-primary,
.btn-outline-primary:focus {
color: var(--bs-gray-dark);
background-color: transparent;
border-width: 2px;
border-color: var(--bs-gray-dark);
}
.btn-outline-primary:hover {
background-color: var(--evcc-dark-green);
.btn-outline-primary:hover,
.btn-outline-primary:active {
color: var(--evcc-dark-green);
background-color: transparent;
border-width: 2px;
border-color: var(--evcc-dark-green);
}
.text-evcc {
Expand All @@ -52,6 +116,18 @@ a {
.text-grid {
color: var(--evcc-grid);
}
.text-dark {
color: var(--bs-gray-dark);
}
.text-gray {
color: var(--bs-gray-medium);
}
.text-gray-medium {
color: var(--bs-gray-medium);
}
.bg-dark {
background-color: var(--bs-gray-dark) !important;
}

@media screen and (min-width: 400px) and (max-width: 574px) {
.d-xs-none {
Expand All @@ -62,10 +138,47 @@ a {
}
}

.modal-backdrop.show {
opacity: 0.8;
}

.modal-header {
padding-bottom: 1.5rem;
}

.modal-title {
font-weight: bold;
font-size: 22px;
}

.modal-content {
border-radius: 1rem;
padding: 1rem;
}

.modal-body {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}

.modal-footer {
padding-top: 1.5rem;
}

.cursor-pointer {
cursor: pointer;
}

.v-popper__inner {
margin: 0 12px !important;
}

.small,
small {
font-size: var(--bs-body-font-size);
color: var(--bs-gray-medium) !important;
}

.btn-close {
opacity: 1;
}
Binary file added assets/font/Montserrat-Bold.woff2
Binary file not shown.
Binary file added assets/font/Montserrat-Medium.woff2
Binary file not shown.
11 changes: 0 additions & 11 deletions assets/ico/browserconfig.xml

This file was deleted.

26 changes: 13 additions & 13 deletions assets/index.html
Expand Up @@ -3,22 +3,21 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="EV Charge Controller" />
<meta name="author" content="andig" />
<meta name="description" content="evcc - Sonne tanken ☀️🚘" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />

<link rel="apple-touch-icon" sizes="180x180" href="ico/apple-touch-icon.png?[[.Version]]" />
<link rel="icon" type="image/png" sizes="32x32" href="ico/favicon-32x32.png?[[.Version]]" />
<link rel="icon" type="image/png" sizes="16x16" href="ico/favicon-16x16.png?[[.Version]]" />
<link rel="manifest" href="ico/site.webmanifest" />
<link rel="mask-icon" href="ico/safari-pinned-tab.svg?[[.Version]]" color="#18191a" />
<link rel="shortcut icon" href="ico/favicon.ico?[[.Version]]" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content="evcc" />
<meta name="application-name" content="evcc" />
<meta name="msapplication-TileColor" content="#18191a" />
<meta name="msapplication-config" content="ico/browserconfig.xml" />
<meta name="theme-color" content="#18191a" />

<link rel="apple-touch-icon" sizes="180x180" href="meta/apple-touch-icon.png?[[.Version]]" />
<link rel="icon" type="image/png" sizes="32x32" href="meta/favicon-32x32.png?[[.Version]]" />
<link rel="icon" type="image/png" sizes="16x16" href="meta/favicon-16x16.png?[[.Version]]" />
<link rel="manifest" href="meta/site.webmanifest?[[.Version]]" />
<link rel="mask-icon" href="meta/safari-pinned-tab.svg?[[.Version]]" color="#28293e" />
<link rel="shortcut icon" href="meta/favicon.ico?[[.Version]]" />
<meta name="msapplication-TileColor" content="#28293e" />
<meta name="msapplication-config" content="meta/browserconfig.xml?[[.Version]]" />
<meta name="theme-color" content="#28293e" />

<title>evcc</title>
</head>
Expand All @@ -32,5 +31,6 @@
</script>

<div id="app"></div>
<script type="module" src="./js/app.js"></script>
</body>
</html>