perform migration to vaadin 14 styles, add banner

This commit is contained in:
f43nd1r 2019-11-27 22:29:24 +01:00
parent ade719ccc4
commit 28c1483cf1
6 changed files with 54 additions and 27 deletions

1
.gitignore vendored
View file

@ -34,7 +34,6 @@ nbdist/
**/node_modules
package-lock.json
package.json
webpack.config.js
webpack.generated.js
### Maven ###

View file

@ -1,4 +1,4 @@
<!--
/*
~ (C) Copyright 2018 Lukas Morawietz (https://github.com/F43nd1r)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
@ -12,28 +12,15 @@
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<custom-style>
<style>
simple-dropdown {
--simple-dropdown-toggle: {
justify-content: right;
};
--simple-dropdown-menu: {
background: var(--lumo-base-color);
};
--simple-dropdown-offset: 0;
}
</style>
</custom-style>
*/
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
<dom-module id="my-login-form" theme-for="vaadin-login-form-wrapper">
<template>
<style>
registerStyles("vaadin-login-form-wrapper", css`
[part="form"] {
padding: 0 !important;
padding: 0;
}
</style>
</template>
</dom-module>
[part="form-title"] {
display: none;
}
`);

View file

@ -37,7 +37,7 @@ import com.vaadin.flow.component.applayout.AppLayout;
import com.vaadin.flow.component.applayout.DrawerToggle;
import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.button.ButtonVariant;
import com.vaadin.flow.component.dependency.HtmlImport;
import com.vaadin.flow.component.dependency.JsModule;
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.html.Image;
import com.vaadin.flow.component.icon.VaadinIcon;
@ -65,7 +65,7 @@ import java.util.Map;
* @author lukas
* @since 13.07.18
*/
@HtmlImport("frontend://styles/shared-styles.html")
@JsModule("./styles/shared-styles.js")
@UIScope
@SpringComponent
public class MainView extends ParentLayout {
@ -147,7 +147,6 @@ public class MainView extends ParentLayout {
private void showLogin() {
Translatable<Image> logo = Translatable.createImage("frontend/logo.png", Messages.ACRARIUM);
logo.setWidth(0, Unit.PIXEL);
logo.setPadding(1, Unit.REM);
FlexLayout logoWrapper = new FlexLayout(logo);
logoWrapper.expand(logo);
LoginI18n loginI18n = LoginI18n.createDefault();

View file

@ -70,7 +70,6 @@ public class UserManager extends Composite<FlexLayout> implements HasAcrariumTit
protected void onAttach(AttachEvent attachEvent) {
super.onAttach(attachEvent);
getContent().removeAll();
getContent().add(Translatable.createLabel(Messages.USERS));
MyGrid<User> userGrid = new MyGrid<>(userService.getUserProvider());
userGrid.setWidthFull();
userGrid.setSelectionMode(Grid.SelectionMode.NONE);

View file

@ -0,0 +1,6 @@
_
/\ (_)
/ \ ___ _ __ __ _ _ __ _ _ _ _ __ ___
/ /\ \ / __| | '__| / _` | | '__| | | | | | | | '_ ` _ \
/ ____ \ | (__ | | | (_| | | | | | | |_| | | | | | | |
/_/ \_\ \___| |_| \__,_| |_| |_| \__,_| |_| |_| |_|

View file

@ -0,0 +1,37 @@
/**
* This file has been autogenerated as it didn't exist or was made for an older incompatible version.
* This file can be used for manual configuration will not be modified if the flowDefaults constant exists.
*/
const merge = require('webpack-merge');
const flowDefaults = require('./webpack.generated.js');
module.exports = merge(flowDefaults, {
});
/**
* This file can be used to configure the flow plugin defaults.
* <code>
* // Add a custom plugin
* flowDefaults.plugins.push(new MyPlugin());
*
* // Update the rules to also transpile `.mjs` files
* if (!flowDefaults.module.rules[0].test) {
* throw "Unexpected structure in generated webpack config";
* }
* flowDefaults.module.rules[0].test = /\.m?js$/
*
* // Include a custom JS in the entry point in addition to generated-flow-imports.js
* if (typeof flowDefaults.entry.index != "string") {
* throw "Unexpected structure in generated webpack config";
* }
* flowDefaults.entry.index = [flowDefaults.entry.index, "myCustomFile.js"];
* </code>
* or add new configuration in the merge block.
* <code>
* module.exports = merge(flowDefaults, {
* mode: 'development',
* devtool: 'inline-source-map'
* });
* </code>
*/