Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
luna
Commits
ffd694b8
Unverified
Commit
ffd694b8
authored
Feb 26, 2018
by
liuzheng712
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
e689e27d
6615fc52
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
17 deletions
+107
-17
cn.json
i18n/cn.json
+2
-1
package-lock.json
package-lock.json
+8
-10
cleftbar.component.html
src/app/ControlPage/cleftbar/cleftbar.component.html
+1
-1
app.service.ts
src/app/app.service.ts
+4
-0
nav.component.ts
src/app/elements/nav/nav.component.ts
+51
-5
style.scss
src/sass/style.scss
+41
-0
No files found.
i18n/cn.json
View file @
ffd694b8
...
@@ -39,5 +39,6 @@
...
@@ -39,5 +39,6 @@
"labels"
:
"标签管理"
,
"labels"
:
"标签管理"
,
"user"
:
"用户"
,
"user"
:
"用户"
,
"user group"
:
"用户组"
,
"user group"
:
"用户组"
,
"login logs"
:
"登陆日志"
"login logs"
:
"登陆日志"
,
"language"
:
"语言选择"
}
}
package-lock.json
View file @
ffd694b8
...
@@ -5390,6 +5390,10 @@
...
@@ -5390,6 +5390,10 @@
"is-glob"
:
"2.0.1"
"is-glob"
:
"2.0.1"
}
}
},
},
"global"
:
{
"version"
:
"https://github.com/component/global/archive/v2.0.1.tar.gz"
,
"integrity"
:
"sha512-O91OcV/NbdmQJPHaRu2ekSP7bqFRLWgqSwaJvqHPZHUwmHBagQYTOra29+LnzzG3lZkXH1ANzHzfCxtAPM9HMA=="
},
"globals"
:
{
"globals"
:
{
"version"
:
"9.18.0"
,
"version"
:
"9.18.0"
,
"resolved"
:
"https://registry.npmjs.org/globals/-/globals-9.18.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/globals/-/globals-9.18.0.tgz"
,
...
@@ -8070,10 +8074,6 @@
...
@@ -8070,10 +8074,6 @@
"requires"
:
{
"requires"
:
{
"better-assert"
:
"1.0.2"
"better-assert"
:
"1.0.2"
}
}
},
"xmlhttprequest"
:
{
"version"
:
"https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz"
,
"integrity"
:
"sha512-GO6pmHif8rvZ9YddEoem4hQo0OvcTZJnPGyKxBNsFwgEwNYxbpfewye2ulTDAanWXTcfl2+XKE6/DK7SAoKqMw=="
}
}
}
}
},
},
...
@@ -8104,12 +8104,6 @@
...
@@ -8104,12 +8104,6 @@
"integrity"
:
"sha1-UCrLmzEE2sM90mMOry+IiwuvTLM="
,
"integrity"
:
"sha1-UCrLmzEE2sM90mMOry+IiwuvTLM="
,
"requires"
:
{
"requires"
:
{
"global"
:
"https://github.com/component/global/archive/v2.0.1.tar.gz"
"global"
:
"https://github.com/component/global/archive/v2.0.1.tar.gz"
},
"dependencies"
:
{
"global"
:
{
"version"
:
"https://github.com/component/global/archive/v2.0.1.tar.gz"
,
"integrity"
:
"sha512-O91OcV/NbdmQJPHaRu2ekSP7bqFRLWgqSwaJvqHPZHUwmHBagQYTOra29+LnzzG3lZkXH1ANzHzfCxtAPM9HMA=="
}
}
}
},
},
"json3"
:
{
"json3"
:
{
...
@@ -15188,6 +15182,10 @@
...
@@ -15188,6 +15182,10 @@
"resolved"
:
"https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz"
,
"resolved"
:
"https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz"
,
"integrity"
:
"sha1-1QH5ezvbQDr4757MIFcxh6rawOk="
"integrity"
:
"sha1-1QH5ezvbQDr4757MIFcxh6rawOk="
},
},
"xmlhttprequest"
:
{
"version"
:
"https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz"
,
"integrity"
:
"sha512-GO6pmHif8rvZ9YddEoem4hQo0OvcTZJnPGyKxBNsFwgEwNYxbpfewye2ulTDAanWXTcfl2+XKE6/DK7SAoKqMw=="
},
"xregexp"
:
{
"xregexp"
:
{
"version"
:
"2.0.0"
,
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz"
,
...
...
src/app/ControlPage/cleftbar/cleftbar.component.html
View file @
ffd694b8
<div
id=
"sidebar"
>
<div
id=
"sidebar"
>
<div
class=
"search"
>
<div
class=
"search"
>
<input
class=
"left-search"
placeholder=
"
Search
..."
maxlength=
"2048"
name=
"q"
autocomplete=
"off"
<input
class=
"left-search"
placeholder=
"
{{'Search'| trans }}
..."
maxlength=
"2048"
name=
"q"
autocomplete=
"off"
title=
"Search"
title=
"Search"
type=
"text"
tabindex=
"1"
spellcheck=
"false"
autofocus
[(
ngModel
)]="
q
"
(
keyup
.
enter
)="
Search
(
q
)"
>
type=
"text"
tabindex=
"1"
spellcheck=
"false"
autofocus
[(
ngModel
)]="
q
"
(
keyup
.
enter
)="
Search
(
q
)"
>
</div>
</div>
...
...
src/app/app.service.ts
View file @
ffd694b8
...
@@ -150,6 +150,10 @@ export class LocalStorageService {
...
@@ -150,6 +150,10 @@ export class LocalStorageService {
set
(
key
:
string
,
value
:
any
)
{
set
(
key
:
string
,
value
:
any
)
{
return
localStorage
.
setItem
(
key
,
value
);
return
localStorage
.
setItem
(
key
,
value
);
}
}
delete
(
key
:
string
)
{
return
localStorage
.
removeItem
(
key
);
}
}
}
@
Injectable
()
@
Injectable
()
...
...
src/app/elements/nav/nav.component.ts
View file @
ffd694b8
...
@@ -6,10 +6,10 @@
...
@@ -6,10 +6,10 @@
* @author liuzheng <liuzheng712@gmail.com>
* @author liuzheng <liuzheng712@gmail.com>
*/
*/
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
AppService
,
HttpService
,
LogService
}
from
'../../app.service'
;
import
{
AppService
,
HttpService
,
Lo
calStorageService
,
Lo
gService
}
from
'../../app.service'
;
import
{
CleftbarComponent
}
from
'../../ControlPage/cleftbar/cleftbar.component'
;
import
{
CleftbarComponent
}
from
'../../ControlPage/cleftbar/cleftbar.component'
;
import
{
ControlComponent
,
NavList
}
from
'../../ControlPage/control/control.component'
;
import
{
ControlComponent
,
NavList
}
from
'../../ControlPage/control/control.component'
;
import
{
DataStore
}
from
'../../globals'
;
import
{
DataStore
,
i18n
}
from
'../../globals'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
// import * as layer from 'layui-layer/src/layer.js';
// import * as layer from 'layui-layer/src/layer.js';
declare
let
layer
:
any
;
declare
let
layer
:
any
;
...
@@ -28,7 +28,8 @@ export class ElementNavComponent implements OnInit {
...
@@ -28,7 +28,8 @@ export class ElementNavComponent implements OnInit {
constructor
(
private
_appService
:
AppService
,
constructor
(
private
_appService
:
AppService
,
private
_http
:
HttpService
,
private
_http
:
HttpService
,
private
_logger
:
LogService
)
{
private
_logger
:
LogService
,
private
_localStorage
:
LocalStorageService
)
{
this
.
_logger
.
log
(
'nav.ts:NavComponent'
);
this
.
_logger
.
log
(
'nav.ts:NavComponent'
);
this
.
getnav
();
this
.
getnav
();
}
}
...
@@ -89,6 +90,14 @@ export class ElementNavComponent implements OnInit {
...
@@ -89,6 +90,14 @@ export class ElementNavComponent implements OnInit {
this
.
EnterLicense
();
this
.
EnterLicense
();
break
;
break
;
}
}
case
'English'
:
{
this
.
English
();
break
;
}
case
'Chinese'
:
{
this
.
Language
(
'cn'
);
break
;
}
default
:
{
default
:
{
break
;
break
;
}
}
...
@@ -228,10 +237,25 @@ export class ElementNavComponent implements OnInit {
...
@@ -228,10 +237,25 @@ export class ElementNavComponent implements OnInit {
'click'
:
'BBS'
,
'click'
:
'BBS'
,
'name'
:
'BBS'
'name'
:
'BBS'
}]
}]
}];
},
{
'id'
:
'Language'
,
'name'
:
'Language'
,
'children'
:
[
{
'id'
:
'English'
,
'click'
:
'English'
,
'name'
:
'English'
},
{
'id'
:
'Chinese'
,
'click'
:
'Chinese'
,
'name'
:
'中文'
}
]
}
];
}
}
Connect
()
{
Connect
()
{
layer
.
prompt
({
layer
.
prompt
({
formType
:
2
,
formType
:
2
,
...
@@ -248,4 +272,26 @@ export class ElementNavComponent implements OnInit {
...
@@ -248,4 +272,26 @@ export class ElementNavComponent implements OnInit {
});
});
}
}
English
()
{
this
.
_localStorage
.
delete
(
'lang'
);
i18n
.
clear
();
location
.
reload
();
}
Language
(
lan
:
string
)
{
this
.
_http
.
get
(
'/i18n/'
+
lan
).
subscribe
(
data
=>
{
this
.
_localStorage
.
set
(
'lang'
,
JSON
.
stringify
(
data
));
}
);
const
l
=
this
.
_localStorage
.
get
(
'lang'
);
if
(
l
)
{
const
data
=
JSON
.
parse
(
l
);
Object
.
keys
(
data
).
forEach
((
k
,
_
)
=>
{
i18n
.
set
(
k
,
data
[
k
]);
});
}
location
.
reload
();
}
}
}
src/sass/style.scss
View file @
ffd694b8
...
@@ -24,3 +24,44 @@ $asset-path: '../static/imgs/inspinia';
...
@@ -24,3 +24,44 @@ $asset-path: '../static/imgs/inspinia';
@import
'~@swimlane/ngx-datatable/release/index.css'
;
@import
'~@swimlane/ngx-datatable/release/index.css'
;
@import
'~@swimlane/ngx-datatable/release/themes/material.css'
;
@import
'~@swimlane/ngx-datatable/release/themes/material.css'
;
@import
'~@swimlane/ngx-datatable/release/assets/icons.css'
;
@import
'~@swimlane/ngx-datatable/release/assets/icons.css'
;
$material-design-icons-font-path
:
'~/material-design-icons/iconfont/'
;
//@import "~material-design-icons/iconfont/material-icons";
@font-face
{
font-family
:
'Material Icons'
;
font-style
:
normal
;
font-weight
:
400
;
src
:
url('
#{
$material-design-icons-font-path
}
/MaterialIcons-Regular.eot')
;
/* For IE6-8 */
src
:
local
(
'Material Icons'
)
,
local
(
'MaterialIcons-Regular'
)
,
url('
#{
$material-design-icons-font-path
}
/MaterialIcons-Regular.woff2')
format
(
'woff2'
)
,
url('
#{
$material-design-icons-font-path
}
/MaterialIcons-Regular.woff')
format
(
'woff'
)
,
url('
#{
$material-design-icons-font-path
}
/MaterialIcons-Regular.ttf')
format
(
'truetype'
);
}
.material-icons
{
font-family
:
'Material Icons'
;
font-weight
:
normal
;
font-style
:
normal
;
font-size
:
24px
;
/* Preferred icon size */
display
:
inline-block
;
line-height
:
1
;
text-transform
:
none
;
letter-spacing
:
normal
;
word-wrap
:
normal
;
white-space
:
nowrap
;
direction
:
ltr
;
/* Support for all WebKit browsers. */
-webkit-font-smoothing
:
antialiased
;
/* Support for Safari and Chrome. */
text-rendering
:
optimizeLegibility
;
/* Support for Firefox. */
-moz-osx-font-smoothing
:
grayscale
;
/* Support for IE. */
font-feature-settings
:
'liga'
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment