language and theme added

This commit is contained in:
oguzhaninan
2017-05-30 22:03:50 +03:00
parent c22c273e8f
commit 370548f63f
42 changed files with 1874 additions and 302 deletions

View File

@@ -1,6 +1,6 @@
.amaran-overlay{position:fixed;width:100%;height:100%;top:0;left:0;background:rgba(153,204,51,.9);display:block;z-index:777}.amaran-overlay .amaran-wrapper{z-index:9999}
.amaran.awesome{width:300px;min-height:65px;background:#f3f3f3;color:#222;margin:15px;padding:5px 5px 5px 70px;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:16px;font-weight:600;box-shadow:1px 1px 1px #000}.amaran.awesome .icon{width:50px;height:50px;position:absolute;top:50%;left:10px;background:#000;margin-top:-25px;border-radius:50%;text-align:center;line-height:50px;font-size:22px}.amaran.awesome p{padding:0;margin:0}.amaran.awesome p span{font-weight:300}.amaran.awesome p span.light{font-size:13px;display:block;color:#777}.amaran.awesome.ok p.bold{color:#178B13}.amaran.awesome.ok .icon{background-color:#178B13;color:#fff}.amaran.awesome.error p.bold{color:#D82222}.amaran.awesome.error .icon{background-color:#D82222;color:#fff}.amaran.awesome.warning p.bold{color:#9F6000}.amaran.awesome.warning .icon{background-color:#9F6000;color:#fff}.amaran.awesome.yellow p.bold{color:#CFA846}.amaran.awesome.yellow .icon{background-color:#CFA846;color:#fff}.amaran.awesome.blue p.bold{color:#2980b9}.amaran.awesome.blue .icon{background-color:#2980b9;color:#fff}.amaran.awesome.green p.bold{color:#e12b28}.amaran.awesome.green .icon{background-color:#e12b28;color:#fff}.amaran.awesome.purple p.bold{color:#5B54AA}.amaran.awesome.purple .icon{background-color:#5B54AA;color:#fff}
.amaran.colorful{width:300px;min-height:45px;overflow:hidden;background-color:transparent;z-index:1}.amaran.colorful .colorful-inner{width:100%;min-height:45px;display:block;position:relative;background-color:#484860;padding:15px 25px 15px 15px;color:#fff;font-size:14px;border-bottom:1px solid rgba(0,0,0,.2);border-radius:4px}.amaran.colorful .amaran-close{color:#fff;z-index:2;top:8px;right:8px;text-align:center;line-height:18px}.amaran-wrapper.center .amaran.colorful{margin:0 auto}
.amaran.colorful{width:300px;min-height:45px;overflow:hidden;background-color:transparent;z-index:1}.amaran.colorful .colorful-inner{width:100%;min-height:45px;display:block;position:relative;background-color:#484860;padding:15px 25px 15px 15px;color:#fff;font-size:14px;border-bottom:1px solid rgba(0,0,0,.2);border-radius:4px}.amaran.colorful .amaran-close{color:#fff;z-index:2;top:8px;right:8px;text-align:center;line-height:23px}.amaran-wrapper.center .amaran.colorful{margin:0 auto}
.amaran.default{width:300px;min-height:45px;background:#1B1E24;background:-webkit-linear-gradient(left,#111213,#111213 15%,#1b1e24 15%,#1b1e24);background:linear-gradient(to right,#111213,#111213 15%,#1b1e24 15%,#1b1e24);color:#fff;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:13px;font-weight:300;margin:5px;overflow:hidden;border-bottom:1px solid #111213;border-radius:6px}.amaran.default .default-spinner{width:45px;min-height:45px;display:block;float:left;position:relative}.amaran.default .default-spinner span{width:18px;height:18px;background:#27ae60;display:block;border-radius:50%;position:absolute;top:50%;left:50%;margin-left:-11px;margin-top:-9px}.amaran.default .default-message{padding:5px; width:240px; float:left}.amaran.default .default-message span{padding:3px;}.amaran.default .default-message:after{clear:both}
@charset "UTF-8";.amaran-close,.amaran-sticky{height:20px;top:2px;cursor:pointer}.amaran-wrapper *{box-sizing:border-box}.amaran-wrapper{position:fixed;z-index:9999}.amaran-wrapper.top{top:0;bottom:auto}.amaran-wrapper.bottom{bottom:0;top:auto}.amaran-wrapper.left{left:0}.amaran-wrapper.right{right:0;left:auto}.amaran-wrapper.center{width:50%;height:50%;margin:auto;position:fixed;top:0;left:0;bottom:0;right:0}.amaran{width:200px;background:rgba(0,0,0,.7);padding:3px;color:#fff;border-radius:4px;display:none;font-size:13px;cursor:pointer;position:relative;text-align:left;min-height:50px;margin:10px}.amaran-close,.amaran-sticky{width:20px;display:block;position:absolute}.amaran-close{right:2px}.amaran-close:before{content:"x";color:#fff;font-weight:700;font-family:Arial,sans-serif;font-size:18px}.amaran-sticky{right:20px}.amaran-sticky:before{content:"●";color:#fff;font-weight:700;font-family:Arial,sans-serif;font-size:18px}.amaran-sticky.sticky:before{color:#e12b28}
.amaran.user{width:300px;min-height:100px;background:#f3f3f3;color:#222;margin:15px;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:13px;font-weight:300;box-shadow:1px 1px 1px #000;border-radius:0;padding:0}.amaran.user .icon{width:100px;height:100px;position:relative;background:#000;float:left}.amaran.user img{max-width:100%}.amaran.user .info{padding-left:110px;padding-top:10px}.amaran.user b{display:block;font-size:16px}.amaran.user.blue{background:#2773ed;color:#fff}.amaran.user.yellow{background:#f4b300;color:#fff}.amaran.user.green{background:#78ba00;color:#fff}

View File

@@ -43,148 +43,6 @@ button {
}
/*-------------Colors---------------*/
body {
background-color: #202b33;
}
/*---------DASHBOARD---------*/
/*Trail Color*/
svg path:first-child {
stroke: #202b33;
}
.cont,
.line-cont {
background-color: #293945;
color: #eee;
}
.cont h3,
.line-cont h3,
.system-info h3 {
color: #eee;
}
.system-info ul li {
color: #748390;
}
/*---------DASHBOARD---------*/
/*---------ITEM LIST---------*/
.switch+label,
.switch:not(:checked)+label:hover:active {
background-color: #EF4836;
}
.switch+label::after {
background-color: #fff;
}
.switch:checked+label {
box-shadow: inset 0 0 0 13px #4BD865;
}
.scroll::-webkit-scrollbar-thumb {
background-color: #3d474e;
}
.item-list ul li {
background-color: #293945;
}
.item-list ul li:hover {
background-color: #3d474e;
}
.item-list h3,
.item-list ul li {
color: #aeb5bf;
}
.item-list input[type=text] {
background-color: #202b33;
border: 1px solid #3d474e;
color: #aeb5bf;
}
/*---------ITEM LIST---------*/
/*---------ITEM TABLE---------*/
.item-table {
border: 1px solid #3d474e;
}
.item-table ul li {
border-bottom: 1px solid #3d474e;
}
.item-table ul li:hover {
background-color: #293945;
}
.cleaner-side i,
.item-table i {
background-color: #748390;
}
.item-table input[type=checkbox]:checked+i::after,
.cleaner-side input[type=checkbox]:checked+i::after {
background-color: #293945;
}
.item-table span {
color: #aeb5bf;
}
.item-table h3 {
background-color: #293945;
color: #aeb5bf;
}
.cleaner-side ul li label {
color: #aeb5bf;
}
.cleaner-side ul li {
border: 1px solid #3d474e;
}
.cleaner-side ul li label:hover {
background-color: #293945;
color: #2285c3;
}
#clean-btn,
#system-scan-btn {
color: #eee;
border: 1px solid #293945;
}
#clean-btn:hover,
#system-scan-btn:hover {
background-color: #293945;
}
/*---------ITEM TABLE---------*/
/*------------------------------------------------------------------*/
/*---------DASHBOARD---------*/
.cont,
@@ -345,7 +203,7 @@ svg path:first-child {
cursor: pointer;
font-size: 15px;
margin: 6px 3px;
width: calc(100% - 68px);
width: calc(100% - 70px);
border-radius: 4px;
padding: 10px 15px 10px 50px;
}
@@ -408,19 +266,13 @@ svg path:first-child {
}
.add-startup-app {
background-color: #2196f3;
border: 0;
padding: 8px 15px;
color: #eee;
float: right;
margin: 10px 140px 0px 0px;
border-radius: 4px;
}
.add-startup-app:hover {
background-color: #2285c3;
}
/*---------STARTUP APPS---------*/
@@ -442,6 +294,9 @@ svg path:first-child {
/*---------UNINSTALLER---------*/
.uninstaller-list {
height: 510px;
}
.uninstaller-list ul {
float: left;
@@ -453,6 +308,48 @@ svg path:first-child {
background-position: 13px 9px;
}
.check {
float: left;
width: 20px;
height: 20px;
background: #ddd;
margin: 1px 10px 0px 0px;
border-radius: 100%;
position: relative;
}
.check label {
display: block;
width: 16px;
height: 16px;
border-radius: 100px;
cursor: pointer;
position: absolute;
top: 2px;
left: 2px;
z-index: 1;
background-color: #3d474e;
}
.check input[type=checkbox]:checked + label {
background: #2285c3;
}
#uninstall-selected {
padding: 7px 15px;
color: #aeb5bf;
border: 1px solid #293945;
cursor: pointer;
font-size: 15px;
margin: 15px 268px;
background-color: transparent;
border-radius: 4px;
}
#uninstall-selected:hover {
background-color: #293945;
}
.uninstaller-list ul li a {
width: 24px;
height: 24px;
@@ -489,7 +386,7 @@ svg path:first-child {
.item-table {
float: right;
margin: 10px 10px 0px 0px;
width: 650px;
width: 630px;
height: 500px;
}
@@ -574,7 +471,7 @@ input[type=checkbox] {
.cleaner-side {
margin: 10px 0 0 10px;
width: 180px;
width: 200px;
float: left;
position: relative;
}
@@ -588,13 +485,13 @@ input[type=checkbox] {
.cleaner-side ul li {
padding: 0;
margin: 0 0 6px 0;
margin: 0 0 8px 0;
}
.cleaner-side ul li label {
display: block;
padding: 10px 0px 10px 10px;
width: 175px;
width: 195px;
font-size: 14px;
cursor: pointer;
position: relative;
@@ -606,6 +503,11 @@ input[type=checkbox] {
.cleaner-side span {
margin-left: 22px;
width: 160px;
display: block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
@@ -622,7 +524,6 @@ input[type=checkbox] {
display: block;
float: left;
padding: 10px;
color: #aeb5bf;
font-weight: 400;
margin: 0;
}
@@ -631,7 +532,6 @@ input[type=checkbox] {
#memory-chart,
#network-chart {
float: left;
background-color: #293945;
height: 125px;
width: calc(100% - 20px);
padding: 10px;
@@ -645,14 +545,9 @@ input[type=checkbox] {
width: 15px;
height: 15px;
border: 0;
background: url(../img/fit.png) no-repeat 0 0;
margin: 1px 0px 0px 10px;
}
.collapse {
background: url(../img/collapse.png) no-repeat 0 0;
}
/*---------STATISTICS---------*/
@@ -663,7 +558,6 @@ input[type=checkbox] {
width: 100%;
float: left;
margin: 30px auto;
color: #748390;
display: block;
background: url(../img/not-found.png) no-repeat center 30px;
}
@@ -693,8 +587,7 @@ input[type=checkbox] {
}
#nav li {
color: #eee;
padding: 0px 10px;
padding: 0px 6px;
display: inline-block;
}
@@ -708,17 +601,7 @@ input[type=checkbox] {
font-size: 16px;
transition: 0.9s ease;
padding: 6px;
}
#nav li label:hover {
cursor: pointer;
color: white;
}
.nav-active,
#nav li label:hover {
color: #47b1f3;
border-bottom: 1px solid #47b1f3;
border: 1px solid transparent;
}
.slide-fade-enter-active {
@@ -829,4 +712,103 @@ input[type=checkbox] {
.dialog button:hover {
background-color: #293945;
}
/*----SETTINGS-----*/
.settings {
width: 844px;
padding: 0 15px;
}
.settings h3 {
margin: 0 0 20px 0;
padding-bottom: 6px;
font-size: 17px;
font-weight: normal;
border-bottom: 1px solid #2285c3;
color: #2285c3;
}
.settings div {
float: left;
margin: 0 25px 0 0;
}
.settings div label {
float: left;
font-size: 15px;
padding: 0 0 5px 0;
}
.settings div select {
float: left;
border: 0px;
border-radius: 3px;
clear: left;
margin: 8px 0 0 0;
padding: 5px 10px;
width: 150px;
}
.settings-btn {
position: fixed;
top: 7px;
padding: 0;
right: 0;
width: 30px;
height: 30px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
border: 0;
}
/*------Processes--------*/
.processes {
float: left;
position: relative;
margin: 20px 20px 0 20px;
padding: 0;
width: calc(100% - 40px);
}
/*-----STable-----*/
.stable {
background-color: #3d474e;
width: 100%;
height: 550px;
margin: 0;
padding: 0;
text-align: left;
box-sizing: border-box;
font-size: 15px;
border-radius: 5px;
table-layout: fixed;
border-spacing: 1px;
}
.stable tr {
background-color: #293945;
color: #a9b1bb;
}
.stable tr:hover {
cursor: pointer;
background-color: #3d474e;
}
.stable th {
color: #2285c3;
}
.stable td,
.stable th {
padding: 8px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}

203
assets/css/themes/dark.css Normal file
View File

@@ -0,0 +1,203 @@
/**
author @oguzhaninan
*/
/*----------Colors-----------*/
.dark {
background-color: #202b33;
}
/*---------DASHBOARD---------*/
/*Trail Color*/
.dark svg path:first-child {
stroke: #202b33;
}
.dark .cont,
.dark .line-cont {
background-color: #293945;
color: #eee;
}
.dark .cont h3,
.dark .line-cont h3,
.dark .system-info h3 {
color: #eee;
}
.dark .system-info ul li {
color: #748390;
}
.dark #nav li {
color: #eee;
}
.dark .nav-active,
.dark #nav li label:hover {
color: #47b1f3;
border-bottom: 1px solid #47b1f3;
}
/*---------DASHBOARD---------*/
/*---------ITEM LIST---------*/
.dark .switch+label,
.dark .switch:not(:checked)+label:hover:active {
background-color: #EF4836;
}
.dark .switch+label::after {
background-color: #fff;
}
.dark .switch:checked+label {
box-shadow: inset 0 0 0 13px #4BD865;
}
.dark .scroll::-webkit-scrollbar-thumb {
background-color: #3d474e;
}
.dark .item-list ul li {
background-color: #293945;
}
.dark .item-list ul li:hover {
background-color: #3d474e;
}
.dark .item-list h3,
.dark .item-list ul li {
color: #aeb5bf;
}
.dark .item-list input[type=text] {
background-color: #202b33;
border: 1px solid #3d474e;
color: #aeb5bf;
}
/*---------ITEM LIST---------*/
/*---------ITEM TABLE---------*/
.dark .item-table {
border: 1px solid #3d474e;
}
.dark .item-table ul li {
border-bottom: 1px solid #3d474e;
}
.dark .item-table ul li:hover {
background-color: #293945;
}
.dark .cleaner-side i,
.dark .item-table i {
background-color: #748390;
}
.dark .item-table input[type=checkbox]:checked+i::after,
.dark .cleaner-side input[type=checkbox]:checked+i::after {
background-color: #293945;
}
.dark .item-table span {
color: #aeb5bf;
}
.dark .item-table h3 {
background-color: #293945;
color: #aeb5bf;
}
.dark .cleaner-side ul li label {
color: #aeb5bf;
}
.dark .cleaner-side ul li {
border: 1px solid #3d474e;
}
.dark .cleaner-side ul li label:hover {
background-color: #293945;
color: #2285c3;
}
.dark #clean-btn,
.dark #system-scan-btn {
color: #eee;
border: 1px solid #293945;
}
.dark #clean-btn:hover,
.dark #system-scan-btn:hover {
background-color: #293945;
}
/*---------ITEM TABLE---------*/
.dark .add-startup-app {
background-color: #2196f3;
color: #eee;
}
.dark .add-startup-app:hover {
background-color: #2285c3;
}
.dark .resources h4 {
color: #aeb5bf;
}
.dark .fit-chart {
background: url(../../img/fit.png) no-repeat 0 0;
}
.dark .collapse {
background: url(../../img/collapse.png) no-repeat 0 0;
}
.dark #cpus-chart,
.dark #memory-chart,
.dark #network-chart {
background-color: #293945;
}
.dark .empty-list {
color: #748390;
}
/*----SETTINGS-----*/
.dark .settings h3 {
border-bottom: 1px solid #2285c3;
color: #2285c3;
}
.dark .settings div label {
color: #748390;
}
.dark .settings div select {
background-color: #293945;
color: #fff;
}
.dark .settings-btn {
background: #293945 url(../../img/settings.png) no-repeat 6px center;
}

215
assets/css/themes/light.css Normal file
View File

@@ -0,0 +1,215 @@
/*-------------Colors---------------*/
.light {
background-color: #eef4f6;
}
/*---------DASHBOARD---------*/
/*Trail Color*/
.light svg path:first-child {
stroke: #ddd;
}
.light .cont,
.light .line-cont {
background-color: #fff;
box-shadow: 0px 0px 20px 0px #ddd;
color: #6d7278;
}
.light .cont h3,
.light .line-cont h3,
.light .system-info h3 {
color: #6d7278;
}
.light .system-info ul li {
color: #6d7278;
}
.light #nav li {
color: #6d7278;
}
.light .nav-active,
.light #nav li label:hover {
color: #47b1f3;
border-bottom: 1px solid #47b1f3;
}
/*---------DASHBOARD---------*/
/*---------ITEM LIST---------*/
.light .switch+label,
.light .switch:not(:checked)+label:hover:active {
background-color: #EF4836;
}
.light .switch+label::after {
background-color: #fff;
}
.light .switch:checked+label {
box-shadow: inset 0 0 0 13px #4BD865;
}
.light .scroll::-webkit-scrollbar-thumb {
background-color: #748390;
}
.light .item-list ul li {
background-color: #fff;
box-shadow: 0px 0px 10px 0px #ddd;
}
.light .item-list ul li:hover {
background-color: #748390;
color: #fff;
}
.light .item-list h3,
.light .item-list ul li {
color: #6d7278;
}
.light .item-list input[type=text] {
background-color: #fff;
border: 1px solid #eee;
box-shadow: 0px 0px 5px 0px #ddd;
color: #aeb5bf;
}
/*---------ITEM LIST---------*/
/*---------ITEM TABLE---------*/
.light .item-table {
background-color: #fff;
box-shadow: 0px 0px 20px 0px #ddd;
border: 0;
}
.light .item-table ul li {
border-bottom: 1px solid #ddd;
}
.light .item-table ul li:hover {
background-color: #bdc4ca;
}
.light .cleaner-side i,
.light .item-table i {
background-color: #748390;
}
.light .item-table input[type=checkbox]:checked+i::after,
.light .cleaner-side input[type=checkbox]:checked+i::after {
background-color: #293945;
}
.light .item-table li span {
color: #aeb5bf;
}
.light .item-table li span:hover {
color: #fff;
}
.light .item-table h3,
.light .item-table h3 span {
background-color: #bdc4ca;
color: #fff;
}
.light .cleaner-side ul li label {
color: #aeb5bf;
}
.light .cleaner-side ul li {
background-color: #fff;
box-shadow: 0px 0px 20px 0px #ddd;
border: 0;
}
.light .cleaner-side ul li label:hover {
background-color: #bdc4ca;
color: #2285c3;
}
.light #clean-btn,
.light #system-scan-btn {
color: #fff;
background-color: #bdc4ca;
box-shadow: 0px 0px 20px 0px #ddd;
border: 0;
}
.light #clean-btn:hover,
.light #system-scan-btn:hover {
background-color: #748390;
}
/*---------ITEM TABLE---------*/
.light .add-startup-app {
background-color: #2196f3;
color: #eee;
}
.light .add-startup-app:hover {
background-color: #2285c3;
}
.light .resources h4 {
color: #6d7278;
}
.light .fit-chart {
background: url(../../img/fit-light.png) no-repeat 0 0;
}
.light .collapse {
background: url(../../img/collapse-light.png) no-repeat 0 0;
}
.light #cpus-chart,
.light #memory-chart,
.light #network-chart {
background-color: #fff;
box-shadow: 0px 0px 20px 0px #ddd;
}
.light .empty-list {
color: #748390;
}
/*----SETTINGS-----*/
.light .settings h3 {
border-bottom: 1px solid #2285c3;
color: #2285c3;
}
.light .settings div label {
color: #6d7278;
}
.light .settings div select {
background-color: #748390;
color: #fff;
}
.light .settings-btn {
background: #6d7278 url(../../img/settings.png) no-repeat 6px center;
}

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

BIN
assets/img/fit-light.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

BIN
assets/img/settings.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

View File

@@ -9,7 +9,10 @@
</script>
<link rel="stylesheet" type="text/css" href="../assets/css/style.css">
<link rel="stylesheet" type="text/css" href="../assets/css/loader.css">
<link rel="stylesheet" type="text/css" href="../assets/css/amaran.min.css">
<link rel="stylesheet" type="text/css" href="../assets/css/amaran.min.css">
<!--Themes-->
<link rel="stylesheet" type="text/css" href="../assets/css/themes/dark.css">
<link rel="stylesheet" type="text/css" href="../assets/css/themes/light.css">
</head>
<body>

View File

@@ -22,14 +22,11 @@
"build": {
"linux": {
"icon": "assets/img/icons"
},
"target": [
"arch"
]
}
},
"homepage": "https://github.com/oguzhaninan/Stacer",
"scripts": {
"start": "electron .",
"start": "yarn run build; electron .",
"build": "babel src/ -d bundle/",
"clean": "rm bundle/*.js bundle/**/*.js",
"package-x86": "electron-packager . --overwrite --platform=linux --arch=ia32 --icon=assets/img/icons/icon256x256.png --prune=true --out=release-builds --electron-version=1.6.2",
@@ -44,12 +41,12 @@
"chart.js": "^2.5.0",
"chartkick": "^2.2.3",
"chokidar": "^1.6.1",
"glob": "^7.1.2",
"jquery": "^3.1.1",
"progressbar.js": "^1.0.1",
"properties-reader": "^0.0.15",
"sudo-prompt": "^6.2.1",
"systeminformation": "^3.13.0",
"vuex": "^2.2.1"
"systeminformation": "^3.13.0"
},
"devDependencies": {
"babel-cli": "^6.24.0",

View File

@@ -2,19 +2,23 @@ import Dashboard from './dashboard/Dashboard'
import SystemCleaner from './system-cleaner/SystemCleaner'
import StartupApps from './startup-apps/StartupApps'
import Services from './services/Services'
import Process from './process/Process'
import Uninstaller from './uninstaller/Uninstaller'
import Resources from './resources/Resources'
import Settings from './settings/Settings'
export default {
template: `<div id="main" class="fl w100">
<ul id="nav">
<li><label :class="{'nav-active': activeNav == 1}" @click="activeNav = 1">Dashboard</label></li>
<li><label :class="{'nav-active': activeNav == 2}" @click="activeNav = 2">System Cleaner</label></li>
<li><label :class="{'nav-active': activeNav == 3}" @click="activeNav = 3">Startup Apps</label></li>
<li><label :class="{'nav-active': activeNav == 4}" @click="activeNav = 4">Services</label></li>
<li><label :class="{'nav-active': activeNav == 5}" @click="activeNav = 5">Uninstaller</label></li>
<li><label :class="{'nav-active': activeNav == 6}" @click="activeNav = 6">Resources</label></li>
<li><label :class="{'nav-active': activeNav == 1}" @click="activeNav = 1">{{ lang('dashboard') }}</label></li>
<li><label :class="{'nav-active': activeNav == 2}" @click="activeNav = 2">{{ lang('sysCleaner') }}</label></li>
<li><label :class="{'nav-active': activeNav == 3}" @click="activeNav = 3">{{ lang('startupApps') }}</label></li>
<li><label :class="{'nav-active': activeNav == 4}" @click="activeNav = 4">{{ lang('services') }}</label></li>
<li><label :class="{'nav-active': activeNav == 5}" @click="activeNav = 5">{{ lang('process') }}</label></li>
<li><label :class="{'nav-active': activeNav == 6}" @click="activeNav = 6">{{ lang('uninstaller') }}</label></li>
<li><label :class="{'nav-active': activeNav == 7}" @click="activeNav = 7">{{ lang('resources') }}</label></li>
<button class="settings-btn" @click="activeNav = 8"></button>
</ul>
<dashboard v-show="activeNav == 1" />
@@ -24,10 +28,14 @@ export default {
<startup-apps v-show="activeNav == 3" />
<services v-show="activeNav == 4" />
<uninstaller v-show="activeNav == 5" />
<resources v-show="activeNav == 6" />
<process v-show="activeNav == 5" />
<uninstaller v-show="activeNav == 6" />
<resources v-show="activeNav == 7" />
<settings v-show="activeNav == 8" />
<!--Startup Loading-->
<div id="loading">
@@ -45,7 +53,7 @@ export default {
</div>`,
data() {
return ({
activeNav: 1
activeNav: 5
})
},
components: {
@@ -53,7 +61,9 @@ export default {
'system-cleaner': SystemCleaner,
'startup-apps': StartupApps,
'services': Services,
'process': Process,
'uninstaller': Uninstaller,
'resources': Resources
'resources': Resources,
'settings': Settings,
}
}

View File

@@ -1,14 +1,14 @@
const {
BrowserWindow,
BrowserWindow,
ipcRenderer
} = require('electron')
export default {
template: `<div class="cont fl">
<h3>{{ title }}</h3>
<svg viewBox="0 0 100 73" class="circle-bar" :style="'background-image: url(../assets/img/' + img + ')'">
<path d="M 55,71 m -45,0 a 45,45 0 1 1 80,0" stroke="#202b33" stroke-width="10" fill-opacity="0" />
<path :id="idd" d="M 55,71 m -45,0 a 45,45 0 1 1 80,0" :stroke="stroke" stroke-width="10" fill-opacity="0" />
<svg viewBox="0 0 106 76" class="circle-bar" :style="'background-image: url(../assets/img/' + img + ')'">
<path d="M 58,73 m -45,0 a 45,45 0 1 1 80,0" stroke="#202b33" stroke-width="14" fill-opacity="0" />
<path :id="idd" d="M 58,73 m -45,0 a 45,45 0 1 1 80,0" :stroke="stroke" stroke-width="14" fill-opacity="0" />
</svg>
<span>{{ text }}</span>
</div>`,

View File

@@ -5,7 +5,7 @@ import si from 'systeminformation'
import CircleBar from './CircleBar'
export default {
template: `<circle-bar title="CPU" idd="cpu-cont" stroke="#2ecc71" :text="cpuValue + '%'" img="cpu.png" />`,
template: `<circle-bar :title="lang('cpu')" idd="cpu-cont" stroke="#2ecc71" :text="cpuValue + '%'" img="cpu.png" />`,
components: {
'circle-bar': CircleBar
},

View File

@@ -23,9 +23,9 @@ export default {
<!--Update Check-->
<div class="fl w100 update-check" v-show="update_check">
<span>There are updates currently available.</span>
<span>{{ lang('updateMsg') }}</span>
<button @click="download_update">
Download Update
{{ lang('downloadUpdate') }}
</button>
</div>
</div>

View File

@@ -6,7 +6,7 @@ import helpers from '../../utils/helpers'
import CircleBar from './CircleBar'
export default {
template: `<circle-bar title="DISK SPACE" idd="disk-cont" stroke="#e74c3c" :text="this.diskUsed + ' / ' + this.diskTotal + 'GB'" img="disk.png" />`,
template: `<circle-bar :title="lang('disk')" idd="disk-cont" stroke="#e74c3c" :text="this.diskUsed + ' / ' + this.diskTotal + 'GB'" img="disk.png" />`,
components: {
'circle-bar': CircleBar
},

View File

@@ -5,14 +5,13 @@ import si from 'systeminformation'
export default {
template: `<div class="line-cont">
<h3>DOWNLOAD</h3>
<h3>{{ lang('download') }}</h3>
<div id="down-bar"></div>
<span>{{ this.downSpeed + this.unit }}</span>
<span>{{ downSpeed + ' kB/s' }}</span>
</div>`,
data() {
return ({
downSpeed: 0,
unit:'KiB/s'
downSpeed: 0
})
},
mounted() {
@@ -24,20 +23,17 @@ export default {
})
let max = 1000
// Get network nameMath.abs(data.rx_sec / 1024).toFixed(2) || 0.00
// Get network name
si.networkInterfaceDefault(defaultNetwork => {
setInterval(() => {
// get down speed
si.networkStats(defaultNetwork, data => {
speedInKB = Math.abs(data.rx_sec / 1024).toFixed(2) || 0.00
if(speedInKB>1024){
speedInKB = speedInKB/1024
this.unit = 'MiB/s'
}
this.downSpeed = speedInKB
let speed = Math.abs(data.rx_sec / 1024).toFixed(2)
this.downSpeed = speed > 0 ? speed : 0
// down bar update
max = max < this.downSpeed ? this.downSpeed : max
downBar.animate(this.downSpeed / max)
let percent = this.downSpeed / max < 1 ? this.downSpeed / max : 1
downBar.animate(percent)
})
}, 1000)
})

View File

@@ -6,7 +6,7 @@ import helpers from '../../utils/helpers'
import CircleBar from './CircleBar'
export default {
template: `<circle-bar title="MEMORY" idd="mem-cont" stroke="#f1c40f" :text="memoryValue" img="memory.png" />`,
template: `<circle-bar :title="lang('memory')" idd="mem-cont" stroke="#f1c40f" :text="memoryValue" img="memory.png" />`,
components: {
'circle-bar': CircleBar
},

View File

@@ -2,7 +2,7 @@ import si from 'systeminformation'
export default {
template: `<div class="system-info">
<h3>SYSTEM INFO</h3>
<h3>{{ lang('systemInfo') }}</h3>
<ul> <li v-for="info in information"> {{ info }} </li> </ul>
</div>`,
data() {
@@ -12,15 +12,20 @@ export default {
},
created() {
si.osInfo(o => {
this.information.push("Hostname: " + o.hostname)
this.information.push("Platform: " + o.platform + " " + o.arch)
this.information.push("Distribution: " + o.distro + " " + o.release)
this.information.push("Kernel Release: " + o.kernel)
this.information.push(lang('hostname') + ': ' + isUndefined(o.hostname))
this.information.push(lang('platform') + ': ' + isUndefined(o.platform) + " " + isUndefined(o.arch))
this.information.push(lang('distribution') + ': ' + isUndefined(o.distro) + " " + isUndefined(o.release))
this.information.push(lang('kernelRel') + ': ' + isUndefined(o.kernel))
si.cpu(c => {
this.information.push("Cpu Model: " + c.manufacturer + " " + c.brand)
this.information.push("Cpu Speed: " + c.speed + "GHz")
this.information.push("Cpu Cores: " + c.cores)
this.information.push(lang('cpuModel') + ': ' + isUndefined(c.manufacturer) + " " + isUndefined(c.brand))
this.information.push(lang('cpuSpeed') + ': ' + isUndefined(c.speed) + "GHz")
this.information.push(lang('cpuCores') + ': ' + c.cores)
})
})
}
}
function isUndefined(o) {
if(typeof o == 'string') return o
else return 'Undefined'
}

View File

@@ -5,7 +5,7 @@ import si from 'systeminformation'
export default {
template: `<div class="line-cont">
<h3>UPLOAD</h3>
<h3>{{ lang('upload') }}</h3>
<div id="up-bar"></div>
<span>{{ this.upSpeed + ' kB/s' }}</span>
</div>`,
@@ -28,10 +28,12 @@ export default {
setInterval(() => {
// get upload speed
si.networkStats(defaultNetwork, data => {
this.upSpeed = Math.abs(data.tx_sec / 1024).toFixed(2) || 0.00
let speed = Math.abs(data.tx_sec / 1024).toFixed(2)
this.upSpeed = speed > 0 ? speed : 0
// up bar update
max = max < this.upSpeed ? this.upSpeed : max
upBar.animate(this.upSpeed / max)
let percent = this.upSpeed / max < 1 ? this.upSpeed / max : 1
upBar.animate(percent)
})
}, 1000)
})

View File

@@ -0,0 +1,48 @@
import proc from './proc'
export default {
template: `<transition name="slide-fade">
<div class="content">
<div class="processes">
<table class="stable">
<!--<caption></caption>-->
<thead>
<tr>
<th scope="col">PID</th>
<th scope="col">Process Name</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<tr v-for="p in processes">
<td>{{ p.pid }}</th>
<td>{{ p.comm }}</td>
<td>{{ p.state }}</td>
</tr>
<tr>
<td>Andrew Chalkley</th>
<td>andrew@example.com</td>
<td>Front-End Developer</td>
</tr>
<tr>
<td>Dave McFarland</th>
<td>dave@example.com</td>
<td>Front-End Developer</td>
</tr>
</tbody>
</table>
</div>
</div>
</transition>`,
data() {
return({
processes: proc()
})
},
created() {
},
components: {
}
}

View File

@@ -0,0 +1,37 @@
export default {
template: `<table class="stable">
<caption align="left">Process</caption>
<thead>
<tr>
<th scope="col">PID</th>
<th scope="col">Process Name</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Nick Pettit</th>
<td>nick@example.com</td>
<td>Web Designer</td>
</tr>
<tr>
<th scope="row">Andrew Chalkley</th>
<td>andrew@example.com</td>
<td>Front-End Developer</td>
</tr>
<tr>
<th scope="row">Dave McFarland</th>
<td>dave@example.com</td>
<td>Front-End Developer</td>
</tr>
<tr>
<th scope="row">Guil Hernandez</th>
<td>guil@example.com</td>
<td>Web Designer</td>
</tr>
</tbody>
</table>
`
}

View File

@@ -0,0 +1,30 @@
var fs = require('fs')
var glob = require("glob")
export default () => {
let processesList = []
glob('/proc/[0-9]*', (er, procs) => {
// get all process ids
procs.forEach(pid => {
fs.readFile(`${pid}/stat`, 'utf-8', (err, data) => {
processesList.push(procStat(data));
})
})
})
return processesList
}
function procStat(data) {
var columns = data.split(' ')
return {
pid: columns[0],
comm: columns[1],
state: columns[2],
ppid: columns[3],
pgrp: columns[4],
session: columns[5]
}
}

View File

@@ -3,7 +3,7 @@ import Chartkick from 'chartkick'
export default {
template: `<div>
<h4>Cpu History <slot></slot></h4>
<h4>{{ lang('cpuHistory') }} <slot></slot></h4>
<div id="cpus-chart" :style="'height:' + fheight"></div>
</div>`,
props: ['fheight'],

View File

@@ -4,7 +4,7 @@ import Chartkick from 'chartkick'
export default {
template: `<div>
<h4>Memory History <slot></slot></h4>
<h4>{{ lang('memHistory') }} <slot></slot></h4>
<div id="memory-chart" :style="'height:' + fheight"></div>
</div>`,
props: ['fheight'],
@@ -48,12 +48,12 @@ export default {
this.memoryData = []
this.memoryData.push({
name: "Memory",
name: lang('memory'),
data: this.memoryValues[0].map((d, i) => [this.seconds[i], d])
})
this.memoryData.push({
name: "Swap",
name: lang('swap').toString().toUpperCase(),
data: this.memoryValues[1].map((d, i) => [this.seconds[i], d])
})

View File

@@ -4,7 +4,7 @@ import Chartkick from 'chartkick'
export default {
template: `<div>
<h4>Network History <slot></slot></h4>
<h4>{{ lang('networkHistory') }} <slot></slot></h4>
<div id="network-chart" :style="'height:' + fheight"></div>
</div>`,
props: ['fheight'],
@@ -39,18 +39,18 @@ export default {
this.networkValues.forEach((n, i) => this.networkValues[i].splice(0, 1))
this.networkValues[0].push(Math.abs(downSpeed))
this.networkValues[1].push(Math.abs(upSpeed))
this.networkValues[0].push(downSpeed > 0 ? downSpeed : 0)
this.networkValues[1].push(upSpeed > 0 ? upSpeed : 0)
this.networkData = []
this.networkData.push({
name: "Download",
name: lang('download'),
data: this.networkValues[0].map((d, i) => [this.seconds[i], d])
})
this.networkData.push({
name: "Upload",
name: lang('upload'),
data: this.networkValues[1].map((d, i) => [this.seconds[i], d])
})

View File

@@ -30,15 +30,15 @@ export default {
(error, stdout, stderr) => {
if (stderr) {
e.target.checked = ! isChecked
showMessage('Operation not successful.', 'error')
showMessage(lang('opFail'), 'error')
} else {
showMessage(serviceName + ' service ' + status + (e.target.checked ? 'ed' : 'ped'), 'success')
showMessage(serviceName + lang('service').toLowerCase() + status + (e.target.checked ? 'ed' : 'ped'), 'success')
}
this.isBusy = false
})
} else {
showMessage('Another process continues.', 'error')
showMessage(lang('anotherProc'), 'error')
}
}
}

View File

@@ -17,14 +17,14 @@ export default {
<div class="content">
<div class="item-list services-list">
<div class="fl w100">
<h3 class="fl">System Services ({{ filteredServices.length }})</h3>
<input type="text" v-model="searchString" placeholder="Search..." />
<h3 class="fl">{{ lang('serviceTitle') }} ({{ filteredServices.length }})</h3>
<input type="text" v-model="searchString" :placeholder="lang('search') + '...'" />
</div>
<ul v-show="filteredServices.length" class="scroll">
<service v-for="s in filteredServices" :name="s.name" :is-run="s.isRun" />
</ul>
<span class="empty-list" v-show="! filteredServices.length">
No service found.
{{ lang('noService') }}
</span>
</div>
</div>

View File

@@ -0,0 +1,46 @@
import LanguageList from '../../languages/lang-list'
import ThemeList from './theme-list'
import { showMessage } from '../../utils/helpers'
export default {
template: `<transition name="slide-fade">
<div class="content settings">
<h3>{{ lang('appSettings') }}</h3>
<div>
<label>{{ lang('appLanguage') }}</label>
<select v-model="selectedLang" @change="langChange">
<option :value="k" v-for="(v, k) in langList">{{v}}</option>
</select>
</div>
<div>
<label>{{ lang('appTheme') }}</label>
<select v-model="selectedTheme" @change="themeChange">
<option :value="k" v-for="(v, k) in themeList">{{v}}</option>
</select>
</div>
</div>
</transition>`,
data() {
return({
langList: LanguageList,
selectedLang: '',
themeList: ThemeList,
selectedTheme: ''
})
},
created() {
this.selectedLang = localStorage.getItem('appLanguage') || 'en'
this.selectedTheme = localStorage.getItem('appTheme') || 'dark'
},
methods: {
langChange() {
localStorage.setItem('appLanguage', this.selectedLang)
showMessage(lang('changedLang'), 'warning')
},
themeChange() {
localStorage.setItem('appTheme', this.selectedTheme)
document.body.classList = [this.selectedTheme]
}
}
}

View File

@@ -0,0 +1,4 @@
export default {
"dark": "Dark",
"light": "Light"
}

View File

@@ -34,7 +34,7 @@ export default {
fs.writeFileSync(commands.autostartApps + '/' + fileName, data)
} catch (err) {
console.log(err)
showMessage('Operation failed.', 'error')
showMessage(lang('opFail'), 'error')
}
}
}

View File

@@ -13,25 +13,25 @@ export default {
template: `<transition name="slide-fade">
<div class="content">
<div class="item-list startup-apps-list">
<h3>System Startup Applications ({{ apps.length }})</h3>
<h3>{{ lang('startupTitle') }} ({{ apps.length }})</h3>
<ul v-show="apps.length" class="scroll">
<app v-for="app in apps" :name="app.name" :file="app.file" :is-start="app.isStart"></app>
</ul>
<span class="empty-list" v-show="! apps.length">
No startup apps found.
{{ lang('noStartup') }}
</span>
</div>
<button @click="showPrompt = true" class="add-startup-app">Add Startup App</button>
<button @click="showPrompt = true" class="add-startup-app">{{ lang('addStartup') }}</button>
<div class="promptDialog" v-show="showPrompt">
<div class="dialog">
<div>
<span>Application</span>
<input type="text" v-model="appName" placeholder="App Name" />
<input type="text" v-model="appComment" placeholder="App Comment" />
<input type="text" v-model="appExec" placeholder="Command" />
<button @click="saveApp">Add</button>
<button @click="cancelPrompt">Cancel</button>
<span>{{ lang('app') }}</span>
<input type="text" v-model="appName" :placeholder="lang('appName')" />
<input type="text" v-model="appComment" :placeholder="lang('appComment')" />
<input type="text" v-model="appExec" :placeholder="lang('appCommand')" />
<button @click="saveApp">{{ lang('add') }}</button>
<button @click="cancelPrompt">{{ lang('cancel') }}</button>
</div>
</div>
</div>

View File

@@ -3,7 +3,7 @@ export default {
<label>
<slot></slot>
<i></i>
<span> {{text}} ({{length}}) </span>
<span :title="text + '(' + length + ')'"> {{text}} ({{length}}) </span>
</label>
</li>`,
props: ['length', 'text']

View File

@@ -20,33 +20,33 @@ export default {
<div class="content">
<div class="cleaner-side">
<ul>
<sidebar-item text="Package Cache" :length="pkgCachesList.length">
<sidebar-item :text="lang('packageCache')" :length="pkgCachesList.length">
<input type="checkbox" v-model:checked="pkgCacheSelect">
</sidebar-item>
<sidebar-item text="Crash Reports" :length="crashReportsList.length">
<sidebar-item :text="lang('crashReports')" :length="crashReportsList.length">
<input type="checkbox" v-model:checked="crashReportsSelect">
</sidebar-item>
<sidebar-item text="System Logs" :length="systemLogsList.length">
<sidebar-item :text="lang('systemLogs')" :length="systemLogsList.length">
<input type="checkbox" v-model:checked="systemLogsSelect">
</sidebar-item>
<sidebar-item text="App Cache" :length="appCachesList.length">
<sidebar-item :text="lang('appCache')" :length="appCachesList.length">
<input type="checkbox" v-model:checked="appCacheSelect">
</sidebar-item>
<sidebar-item text="Trash" :length="trashSize">
<sidebar-item :text="lang('trash')" :length="trashSize">
<input type="checkbox" v-model:checked="trashSelect">
</sidebar-item>
</ul>
<input type="button" id="system-scan-btn" @click="systemScan" value="System Scan" />
<input type="button" id="system-scan-btn" @click="systemScan" :value="lang('systemScan')" />
</div>
<div class="item-table scroll">
<ul>
<table-title text="Package Caches" :length="pkgCachesList.length">
<table-title :text="lang('packageCache')" :length="pkgCachesList.length">
<input type="checkbox" @change="checkAllPkgCaches">
</table-title>
@@ -55,7 +55,7 @@ export default {
</table-items>
<table-title text="Crash Reports" :length="crashReportsList.length">
<table-title :text="lang('crashReports')" :length="crashReportsList.length">
<input type="checkbox" @change="checkAllCrashReports">
</table-title>
@@ -64,7 +64,7 @@ export default {
</table-items>
<table-title text="System Logs" :length="systemLogsList.length">
<table-title :text="lang('systemLogs')" :length="systemLogsList.length">
<input type="checkbox" @change="checkAllSystemLogs">
</table-title>
@@ -73,7 +73,7 @@ export default {
</table-items>
<table-title text="App Caches" :length="appCachesList.length">
<table-title :text="lang('appCache')" :length="appCachesList.length">
<input type="checkbox" @change="checkAllAppCaches">
</table-title>
@@ -83,7 +83,7 @@ export default {
</ul>
</div>
<input type="button" id="clean-btn" @click="systemClean" value="Clean" />
<input type="button" id="clean-btn" @click="systemClean" :value="lang('clean')" />
</div>
</div>
</transition>`,
@@ -243,7 +243,7 @@ export default {
},
(error, stdout, stderr) => {
if (stderr)
showMessage(`System cleaning failed.`, 'error')
showMessage(lang('sysCleanFail'), 'error')
else {
this.pkgCachesList = this.pkgCachesList.filter(item => this.checkedPkgCaches.indexOf(item) == -1)
this.crashReportsList = this.crashReportsList.filter(item => this.checkedCrashReports.indexOf(item) == -1)
@@ -256,7 +256,7 @@ export default {
this.checkedAppCaches = []
this.trashSize = '0 Bytes'
showMessage(`System cleaned.`, 'success')
showMessage(lang('sysCleanSuc'), 'success')
}
})
}
@@ -286,7 +286,7 @@ export default {
watch: {
appCacheSelect: checked => {
if (checked)
showMessage('Deleting applications\' caches can cause problems. Please be careful.', 'warning')
showMessage(lang('appCacheWarning'), 'warning')
}
}
}

View File

@@ -3,7 +3,7 @@ export default {
<label>
<slot></slot>
<i></i>
<span>Select All ({{text}})</span>
<span>{{ lang('selectAll') }} ({{text}})</span>
</label>
</h3>`,
props: ['length', 'text']

View File

@@ -14,25 +14,34 @@ export default {
template: `<transition name="slide-fade">
<div class="content">
<div class="item-list uninstaller-list">
<div>
<h3 class="fl">System Installed Packages ({{ filteredPackages.length }})</h3>
<input type="text" v-model="searchString" placeholder="Search..." />
<div class="fl w100">
<h3 class="fl">{{ lang('uninstallerTitle') }} ({{ filteredPackages.length }})</h3>
<input type="text" v-model="searchString" :placeholder="lang('search') + '...'" />
</div>
<ul v-show="filteredPackages.length" class="scroll">
<li v-for="package in filteredPackages">
<div class="check">
<input type ="checkbox" :value="package" :id="package" v-model="selectedPackages"/>
<label :for="package"></label>
</div>
<span>{{ package }}</span>
<a :name="package" @click="removePackage"></a>
</li>
</ul>
<span class="empty-list" v-show="! filteredPackages.length" >
No package found.
<span class="empty-list" v-show="! filteredPackages.length">
{{ lang('noPackage') }}
</span>
<button v-show="selectedPackages.length" id="uninstall-selected" @click="uninstallSelected">
Uninstall Selecteds
</button>
</div>
</div>
</transition>`,
data() {
return ({
packagesList: [],
selectedPackages: [],
isMultiUninstall: false,
searchString: '',
isBusy: false
})
@@ -48,6 +57,39 @@ export default {
})
},
methods: {
uninstallSelected() {
console.log(this.selectedPackages.join(' '))
if (this.selectedPackages) {
if (!this.isBusy) {
this.isBusy = true
let sPackages = []
this.selectedPackages.forEach(pkg => sPackages.push(commands.removePackage + pkg))
console.log(sPackages.join('; '))
sudo.exec(command(sPackages.join('; ')), {
name: 'Stacer'
},
(error, stdout, stderr) => {
if (stderr) {
showMessage(lang('uninstallFail'), 'error')
} else {
this.searchString = ''
this.selectedPackages.forEach(packageName => {
var i = this.packagesList.indexOf(packageName)
if (i != -1) this.packagesList.splice(i, 1)
})
showMessage(sPackages + lang('packageUninstalled'), 'success')
}
this.isBusy = false
})
} else {
showMessage(lang('anotherProc'), 'error')
}
this.selectedPackages = []
}
},
removePackage(e) {
if (!this.isBusy) {
this.isBusy = true
@@ -60,18 +102,18 @@ export default {
(error, stdout, stderr) => {
if (stderr) {
e.target.className = ''
showMessage('Operation not successful.', 'error')
showMessage(lang('uninstallFail'), 'error')
} else {
this.searchString = e.target.className = ''
var i = this.packagesList.indexOf(packageName)
if (i != -1) this.packagesList.splice(i, 1)
showMessage(`${packageName} package uninstalled.`, 'success')
showMessage(packageName + lang('packageUninstalled'), 'success')
}
this.isBusy = false
})
} else {
showMessage('Another process continues.', 'error')
showMessage(lang('anotherProc'), 'error')
}
}
},

View File

@@ -1,11 +1,21 @@
import App from './components/App'
import Language from './languages/Language'
window.vm = new Vue({
el: 'app',
components: {
'app': App
},
beforeCreate() {
// Check Language
let appLanguage = localStorage.getItem('appLanguage') || 'en'
let language = new Language(appLanguage)
window.lang = (key) => language.get(key)
// Check Theme
let appTheme = localStorage.getItem('appTheme') || 'dark'
document.body.classList = [appTheme]
},
mounted() {
setTimeout(() => document.getElementById('loading').remove(), 2000)
setTimeout(() => document.getElementById('loading').remove(), 20)
}
})

15
src/languages/Language.js Normal file
View File

@@ -0,0 +1,15 @@
import langList from './lang-list'
export default class Language {
constructor(lang) {
if (Object.keys(langList).indexOf(lang) !== -1) {
this.lang = require(`./langs/lang.${lang}`)
} else {
this.lang = require('./langs/lang.en')
}
}
get(key) {
return this.lang.default[key]
}
}

View File

@@ -0,0 +1,5 @@
export default {
"en": "English",
"tr": "Turkish",
"pt": "Portuguese",
}

View File

@@ -0,0 +1,74 @@
export default {
// Top Menu
dashboard: "Dashboard",
sysCleaner: "System Cleaner",
startupApps: "Startup Apps",
services: "Services",
process: "Processes",
uninstaller: "Uninstaller",
resources: "Resources",
// Dashboard Page
cpu: "CPU",
memory: "MEMORY",
disk: "DISK",
download: "DOWNLOAD",
upload: "UPLOAD",
systemInfo: "SYSTEM INFO",
hostname: "Hostname",
platform: "Platform",
distribution: "Distribution",
kernelRel: "Kernel Release",
cpuModel: "Cpu Model",
cpuSpeed: "Cpu Speed",
cpuCores: "Cpu Cores",
// System Cleaner Page
packageCache: "Package Cache",
crashReports: "Crash Reports",
systemLogs: "System Logs",
appCache: "App Cache",
trash: "Trash",
systemScan: "System Scan",
clean: "Clean",
selectAll: "Select All",
// Startup Apps Page
startupTitle: "System Startup Applications",
addStartup: "Add Startup App",
noStartup: "No startup apps found.",
app: "Application",
appName: "App Name",
appComment: "App Comment",
appCommand: "Command",
add: "Add",
cancel: "Cancel",
// Services Page
serviceTitle: "System Services",
noService: "No Service Found",
// Process Page
processTitle: "",
// Uninstaller Page
uninstallerTitle: "System Installed Packages",
noPackage: "No package found.",
// Resources Page
cpuHistory: "Cpu History",
memHistory: "Memory History",
networkHistory: "Network History",
swap: "Swap",
// Settings
settings: "Settings",
appSettings: "Application Settings",
appLanguage: "App Language",
appTheme: "App Theme",
// Global
search: "Search",
downloadUpdate: "Download Update",
updateMsg: "There are updates currently available.",
// Messages
opFail: "Operation failed.",
sysCleanFail: "System cleaning failed.",
sysCleanSuc: "System cleaned.",
appCacheWarning: "Deleting applications\' caches can cause problems. Please be careful.",
uninstallFail: "Uninstall failed.",
packageUninstalled: " package uninstalled.",
anotherProc: "Another process continues.",
changedLang: "Restart the program for the changes to take effect.",
}

View File

@@ -0,0 +1,71 @@
export default {
// Top Menu
dashboard: "Visão Geral",
sysCleaner: "Limpador de Sistema",
startupApps: "Aplicativos de Inicialização",
services: "Serviços",
uninstaller: "Desinstalador",
resources: "Recursos",
// Dashboard Page
cpu: "CPU",
memory: "MEMÓRIA",
disk: "DISCO",
download: "BAIXAR",
upload: "ENVIO",
systemInfo: "INFORMAÇÃO DO SISTEMA",
hostname: "Nome de anfitrião",
platform: "Plataforma",
distribution: "Distribuição",
kernelRel: "Lançamento do Kernel",
cpuModel: "Cpu Modelo",
cpuSpeed: "Cpu Rapidez",
cpuCores: "Cpu Núcleos",
// System Cleaner Page
packageCache: "Cache do pacote",
crashReports: "Relatórios de Falha",
systemLogs: "Registros do Sistema",
appCache: "Cache de Aplicativos",
trash: "Lixo",
systemScan: "Verificação do Sistema",
clean: "Limpar",
selectAll: "Selecionar Tudo",
// Startup Apps Page
startupTitle: "Aplicativos de Inicialização do Sistema",
addStartup: "Adicionar Aplicativo",
noStartup: "Nenhum aplicativo de inicialização foi encontrado.",
app: "Aplicação",
appName: "Nome do Aplicativo",
appComment: "Comentário do Aplicativo",
appCommand: "Comando",
add: "Adicionar",
cancel: "Cancelar",
// Services Page
serviceTitle: "Serviços de Sistema",
noService: "Nenhum serviço encontrado.",
// Uninstaller Page
uninstallerTitle: "Pacotes Instalados do Sistema",
noPackage: "Nenhum pacote encontrado.",
// Resources Page
cpuHistory: "História da Cpu",
memHistory: "Histórico da Memória",
networkHistory: "Histórico da Rede",
swap: "Troca",
// Settings
settings: "Configurações",
appSettings: "Aplicação Configurações",
appLanguage: "Aplicativo Língua",
appTheme: "Aplicativo Tema",
// Global
search: "Pesquisar",
downloadUpdate: "Atualizar o download",
updateMsg: "Existem atualizações disponíveis atualmente.",
// Messages
opFail: "Operação falhou.",
sysCleanFail: "A limpeza do sistema falhou.",
sysCleanSuc: "Sistema limpo.",
appCacheWarning: "A exclusão de caches de aplicativos pode causar problemas. Por favor, seja cuidadoso.",
uninstallFail: "A desinstalação falhou.",
packageUninstalled: " pacote desinstalado.",
anotherProc: "Outro processo continua.",
changedLang: "Reinicie o programa para que as alterações entrem em vigor.",
}

View File

@@ -0,0 +1,71 @@
export default {
// Top Menu
dashboard: "Genel",
sysCleaner: "Sistem Temizleyici",
startupApps: "Başlangıç Uygulamaları",
services: "Servisler",
uninstaller: "Kaldırıcı",
resources: "Kaynaklar",
// Dashboard Page
cpu: "CPU",
memory: "BELLEK",
disk: "DİSK",
download: "İNDİRME",
upload: "YÜKLEME",
systemInfo: "SİSTEM BİLGİSİ",
hostname: "Hostname",
platform: "Platform",
distribution: "Dağıtım",
kernelRel: "Çekirdek Sürümü",
cpuModel: "Cpu Modeli",
cpuSpeed: "Cpu Hızı",
cpuCores: "Cpu Çekirdek",
// System Cleaner Page
packageCache: "Paket Önbelleği",
crashReports: "Hata Raporları",
systemLogs: "Sistem Günlükleri",
appCache: "Uygulama Önbelleği",
trash: "Çöp Kutusu",
systemScan: "Sistemi Tara",
clean: "Temizle",
selectAll: "Hepsini Seç",
// Startup Apps Page
startupTitle: "Sistem Başlangıç Uygulamaları",
addStartup: "Başlangıç Uygulaması Ekle",
noStartup: "Başlangıç Uygulaması Bulunamadı.",
app: "Uygulama",
appName: "Uygulama Adı",
appComment: "Uygulama Yorumu",
appCommand: "Command",
add: "Ekle",
cancel: "İptal",
// Services Page
serviceTitle: "Sistem Servisleri",
noService: "Servis Bulunamadı.",
// Uninstaller Page
uninstallerTitle: "Sistemdeki Yüklü Paketler",
noPackage: "Paket Bulunamadı.",
// Resources Page
cpuHistory: "Cpu Geçmişi",
memHistory: "Bellek Geçmişi",
networkHistory: "Ağ Geçmişi",
swap: "Takas",
// Settings
settings: "Ayarlar",
appSettings: "Uygulama Ayarları",
appLanguage: "Uygulama Dili",
appTheme: "Uygulama Tema",
// Global
search: "Arama",
downloadUpdate: "Güncellemeyi İndir",
updateMsg: "Mevcut olan yeni güncelleme var.",
// Messages
opFail: "İşlem başarısız.",
sysCleanFail: "Sistem temizleme başarısız.",
sysCleanSuc: "Sistem temizlendi.",
appCacheWarning: "Uygulamaların önbelleklerini silmek sorunlara neden olabilir. Lütfen dikkatli olun.",
uninstallFail: "Kaldırma başarısız.",
packageUninstalled: " paketi kaldırıldı.",
anotherProc: "Başka işlem devam ediyor.",
changedLang: "Değişikliklerin aktif olması için programı yeniden başlatın.",
}

View File

@@ -4,7 +4,7 @@ import {
import { spawnSync } from 'child_process'
let uname = spawnSync('uname', ['-a']).stdout.toString().toLowerCase()
window.systemOs = uname.indexOf('ubuntu') !== -1 ? 'ubuntu' : 'arch'
var systemOs = uname.indexOf('ubuntu') !== -1 ? 'ubuntu' : 'arch'
let conf = {}
@@ -16,7 +16,7 @@ conf.getAllService = "systemctl list-unit-files --state=enabled,disabled --type=
conf.trashPath = homedir() + "/.local/share/Trash/files",
conf.trashInfoPath = homedir() + "/.local/share/Trash/info"
switch (window.systemOs) {
switch (systemOs) {
case 'ubuntu': {
conf.pkgCachePath = "/var/cache/apt/archives/"
conf.getInstalledPackages = "dpkg --get-selections | cut -f 1"

752
yarn.lock
View File

File diff suppressed because it is too large Load Diff