Skip to content

Commit 679505b

Browse files
author
Andrey Solodovnikov
committed
AUTH-18 some ui refactoring
1 parent 26094c2 commit 679505b

File tree

10 files changed

+95
-30
lines changed

10 files changed

+95
-30
lines changed

package-lock.json

Lines changed: 45 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
"test:unit": "vue-cli-service test:unit"
1212
},
1313
"dependencies": {
14+
"element-ui": "^2.4.5",
1415
"vue": "^2.5.17",
1516
"vue-i18n": "^8.0.0",
17+
"vuelidate": "^0.7.4",
1618
"vuex": "^3.0.1"
1719
},
1820
"devDependencies": {

public/index.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
77
<title>auth-web-sdk-embedded</title>
8+
<style>
9+
body {
10+
font-family: Helvetica, Arial, sans-serif;
11+
color: #333333;
12+
background: #f9f9f9;
13+
}
14+
</style>
815
</head>
916
<body>
1017
<noscript>
11-
<strong>We're sorry but auth-web-sdk-embedded doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
18+
<strong
19+
>We're sorry but auth-web-sdk-embedded doesn't work properly without JavaScript enabled.
20+
Please enable it to continue.</strong
21+
>
1222
</noscript>
1323
<div id="app"></div>
1424
<!-- built files will be auto injected -->

src/Root.vue renamed to src/App.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,3 @@ export default {
1717
},
1818
};
1919
</script>
20-
21-
<style lang="scss">
22-
@import 'assets/styles/base.scss';
23-
</style>

src/assets/styles/base.scss

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/assets/styles/gui.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
$ui-color-white: hsl(0, 0%, 100%);
2+
$ui-color-grey13: hsl(0, 0%, 13%);
3+
$ui-color-grey47: hsl(0, 0%, 47%);
4+
$ui-color-grey72: hsl(0, 0%, 72%);
5+
$ui-color-grey87: hsl(0, 0%, 87%);
6+
$ui-color-grey96: hsl(0, 0%, 96%);
7+
$ui-color-black: hsl(0, 0%, 0%);
8+
9+
$ui-font-family-common: Tahoma, Arial, Helvetica, sans-serif;

src/components/AuthForm.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<div class="auth-form">
33
<LocaleChanger/>
44
<h1>ProtocolONE Auth Form</h1>
5-
<p>Авторизируйтесь, граждане!</p>
65
<HelloI18n/>
76
</div>
87
</template>
@@ -22,11 +21,15 @@ export default {
2221
</script>
2322

2423
<style scoped lang="scss">
24+
@import '../assets/styles/gui.scss';
25+
2526
.auth-form {
27+
font-family: $ui-font-family-common;
28+
color: $ui-color-grey13;
2629
box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
27-
background: #fff;
30+
background: $ui-color-white;
2831
padding: 20px;
2932
width: 500px;
30-
margin: 30px auto 0;
33+
margin: 15px auto 0;
3134
}
3235
</style>

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import Vue from 'vue';
7-
import Root from './Root.vue';
7+
import App from './App.vue';
88
import store from './store/RootStore';
99
import i18n from './i18n';
1010

@@ -14,7 +14,7 @@ function mountApp(targetElement) {
1414
new Vue({
1515
store,
1616
i18n,
17-
render: h => h(Root),
17+
render: h => h(App),
1818
}).$mount(targetElement);
1919
}
2020

test-page.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<html lang="en">
2+
<head>
3+
<meta charset="UTF-8" />
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
5+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
6+
<title>Document</title>
7+
</head>
8+
<body>
9+
<div id="app"></div>
10+
<script src="dist/sdk.js"></script>
11+
<script>
12+
new ProtocolOneAuthWebSdk('#app');
13+
</script>
14+
</body>
15+
</html>

vue.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module.exports = {
22
css: {
33
extract: false,
4-
modules: true,
54
},
65

76
filenameHashing: false,
@@ -43,7 +42,7 @@ module.exports = {
4342
locale: 'ru',
4443
fallbackLocale: 'en',
4544
localeDir: 'locales',
46-
enableInSFC: true
47-
}
45+
enableInSFC: true,
46+
},
4847
},
4948
};

0 commit comments

Comments
 (0)