Skip to content

Commit

Permalink
1st commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KillingJacky committed Dec 27, 2020
0 parents commit b33ab6a
Show file tree
Hide file tree
Showing 44 changed files with 15,031 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> 1%
last 2 versions
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-unused-vars': 'off',
'no-console': 'off',
'no-unreachable': 'off'
}
}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

#Electron-builder output
/dist_electron
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v12.18.3
43 changes: 43 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
matrix:
include:
- os: osx
osx_image: xcode10
language: node_js
node_js: "12"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder

- os: linux
services: docker
language: generic

cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder

script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker run --rm \
--env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn electron:build --linux --publish onTagOrDraft"
else
yarn electron:build --mac --publish onTagOrDraft
fi
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine

branches:
only:
- master
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SenseCAP One Configuration Tool




24 changes: 24 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
image: Visual Studio 2017

platform:
- x64

cache:
- node_modules
- '%USERPROFILE%\.electron'

init:
- git config --global core.autocrlf input

install:
- ps: Install-Product node 12 x64
- yarn

build_script:
- yarn electron:build --win

test: off

branches:
only:
- master
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
12 changes: 12 additions & 0 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
Binary file added build/icon.ico
Binary file not shown.
Binary file added build/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions doc/dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Dev Guide

## How to Add Another Slave Board

- Add description to `src/global-defines.js`, including units, misc group and main measurement group
- Add setting fields to `src/views/Settings.vue`, including Vue Compoments, form validation rules, show/hide control logic
- Change `slaveRegs` in `src/views/Settings.vue`
- Change `configMap` in `src/views/Settings.vue`
- Please note that if you add a validation rule on a field expecting a number value, you MUST add the initial value as a number to the `configMap` object
- If you wanna relocate the y Axis of the plot, edit `genPlotExtendSettings` in `src/views/Home.vue`
- Don't forget to extract the string / sentences which are required to be multilingual, replace them with vue-i18n functions (`this.$t` in script context or `$t` in Vue's template context), and put the translations in the `<i18n>` section on the top of each page's Vue file



61 changes: 61 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "sensecap_one_cfg_tool",
"version": "0.0.1",
"private": true,
"description": "SenseCAP One Configuration Tool",
"author": "Jack Shao <[email protected]>",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"electron:build": "vue-cli-service electron:build",
"electron:serve": "vue-cli-service electron:serve",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps"
},
"main": "background.js",
"dependencies": {
"core-js": "^3.6.4",
"crc": "^3.8.0",
"dateformat": "^3.0.3",
"echarts": "^4.9.0",
"electron-create-menu": "^3.0.1",
"electron-log": "^4.0.7",
"electron-store": "^6.0.0",
"electron-updater": "4.3.1",
"element-ui": "^2.4.5",
"i18next": "^19.3.2",
"serialport": "^9.0.3",
"svg-sprite-loader": "^5.1.1",
"v-charts": "^1.19.0",
"vue": "^2.6.11",
"vue-i18n": "^8.15.5",
"vue-router": "^3.1.5",
"vuex": "^3.1.2"
},
"devDependencies": {
"@intlify/vue-i18n-loader": "^1.0.0",
"@vue/cli-plugin-babel": "~4.4.6",
"@vue/cli-plugin-eslint": "~4.4.6",
"@vue/cli-plugin-router": "~4.4.6",
"@vue/cli-plugin-vuex": "~4.4.6",
"@vue/cli-service": "~4.4.6",
"babel-eslint": "^10.0.3",
"electron": "^9.1.2",
"electron-devtools-installer": "^3.1.1",
"electron-notarize": "^1.0.0",
"eslint": "^7.6.0",
"eslint-plugin-vue": "^6.1.2",
"node-sass": "^4.9.2",
"sass": "^1.19.0",
"sass-loader": "^9.0.3",
"vue-cli-plugin-electron-builder": "~2.0.0-rc.4",
"vue-cli-plugin-element": "~1.0.1",
"vue-template-compiler": "^2.6.11"
},
"homepage": "https://github.com/Seeed-Solution/SenseCAP-One-Configuration-Tool",
"repository": {
"type": "git",
"url": "https://github.com/Seeed-Solution/SenseCAP-One-Configuration-Tool"
}
}
Binary file added public/favicon.ico
Binary file not shown.
37 changes: 37 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<style>
html {
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
padding: 0px;
margin: 0px;
height: 100%;
}
body {
padding: 0px;
margin: 0px;
height: 100%;
overflow-x: hidden;
}
/* ::-webkit-scrollbar {
display: none;
} */
</style>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
18 changes: 18 additions & 0 deletions scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require('dotenv').config();
const { notarize } = require('electron-notarize');

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}

const appName = context.packager.appInfo.productFilename;

return await notarize({
appBundleId: 'cc.seeed.sensecap.tools.one',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
});
};
22 changes: 22 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template>
<div id="app">
<router-view/>
</div>
</template>

<script>
export default {
name: 'app',
}
</script>

<style>
#app {
padding: 10px;
/* this makes padding included inside height/width */
box-sizing: border-box;
margin: 0px;
height: 100%;
}
</style>
Binary file added src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/sensecap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/sensecap_logo_1024pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b33ab6a

Please sign in to comment.