Skip to content

Commit

Permalink
Merge pull request #10 from Plastikmensch/v1.2
Browse files Browse the repository at this point in the history
v1.2 update
  • Loading branch information
Plastikmensch authored Aug 10, 2020
2 parents f1ad9ad + a4eea1e commit 0c7e03f
Show file tree
Hide file tree
Showing 24 changed files with 962 additions and 709 deletions.
31 changes: 29 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"rules": {
"indent": [
"error",
2
2,
{"SwitchCase" : 1}
],
"linebreak-style": [
"error",
Expand All @@ -37,6 +38,32 @@
"stroustrup"
],
"no-trailing-spaces": "error",
"no-path-concat": "error"
"no-path-concat": "error",
"eqeqeq": "error",
"no-else-return": "error",
"no-self-compare": "error",
"yoda": [
"error",
"never",
{"exceptRange": true}
],
"array-bracket-newline": [
"error",
"consistent"
],
"key-spacing": "error",
"no-inline-comments": "error",
"prefer-template": "error",
"template-curly-spacing": "error",
"no-useless-concat": "error",
"block-spacing": "error",
"comma-spacing": "error",
"no-var": "error",
"prefer-arrow-callback": [
"error",
{"allowNamedFunctions": true}
],
"func-call-spacing": "error",
"function-paren-newline": "error"
}
}
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Create a report to help us improve
about: Create a report to help this project improve
title: ''
labels: bug
assignees: ''
Expand All @@ -25,7 +25,7 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS/Distro: [e.g. Ubuntu]
- App Version [e.g. 1.1.0]
- App Version: [e.g. 1.1.0]

**Additional context**
Add any other context about the problem here.
9 changes: 4 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Fixes # .
**Fixes**
* list and link fixed issues

Changes:
-
-
-
**Changes**
* list of changes made
24 changes: 24 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "./build.sh",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "package",
"type": "shell",
"command": "./package.sh",
"group": "build",
"dependsOrder": "sequence",
"dependsOn":["build"]
}
]
}
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ The `settings.json` file is in the same folder as `Tweelectron.exe`<br>
Example:
```
{
"use-tor" :true,
"use-round-pics" :false,
"theme" :0,
"width" :1336,
"height" :720,
"use-custom-proxy" :false,
"customProxy" :"foopy:80",
"links-in-torbrowser" :false,
"tor-browser-exe" :"null"
"useTor": true,
"useRoundPics": false,
"theme": 0,
"width": 1336,
"height": 720,
"useCustomProxy": false,
"customProxy": "foopy:80",
"openInTor": false,
"torBrowserExe": null,
"logLevel": 0
}
```
Or use the in-app settings! Press `Alt` click `App` -> `Settings`
Expand Down
9 changes: 7 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/bin/bash
if ! electron-packager --version
then
echo "electron-packager not installed"
echo "install using: sudo npm install electron-packager -g"
exit
fi
npm update electron
cp package.json ./src/
electron-packager ./src --platform=linux --arch=x64,ia32 --overwrite --asar --ignore="tor-(linux|win32)" --extra-resource="./src/tor-linux" --out ./dist
Expand All @@ -9,5 +15,4 @@ cp ./tweelectron.png ./dist/Tweelectron-linux-ia32
cp ./tweelectron.png ./dist/Tweelectron-linux-x64
cp ./tweelectron.desktop ./dist/Tweelectron-linux-ia32
cp ./tweelectron.desktop ./dist/Tweelectron-linux-x64
echo "done"
read -n1 -r -p "Press any key..." key
echo "Finished build at $(date +%H:%M:%S)"
10 changes: 10 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
#!/bin/bash
# check if script is run as root
if [ "$EUID" -ne 0 ]
then
echo "[Error] Please run as root"
exit
fi
# check if Tweelectron is running
if pgrep Tweelectron >/dev/null
then
echo "[Error] Tweelectron is running"
exit
fi
# check if directory exists
if [ -d "/usr/share/tweelectron" ]
then
echo "Old version exists. Removing..."
# remove directory
rm -r /usr/share/tweelectron
fi
echo "Copying new files"
# copy directory to /usr/share
cp -r ./dist/Tweelectron-linux-x64/ /usr/share/tweelectron
echo "Done"
20 changes: 13 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"productName": "Tweelectron",
"version": "1.1.3",
"version": "1.2.0",
"main": "main.js",
"description": "TweetDeck for Desktop",
"author": {
Expand All @@ -25,7 +25,7 @@
}
},
"devDependencies": {
"electron": "^7.3.2",
"electron": "^9.2.0",
"standardx": "^5.0.0"
},
"dependencies": {}
Expand Down
6 changes: 6 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ tar -C ./dist -zcf Tweelectron-linux-ia32-$version.tar.gz Tweelectron-linux-ia32
cd ./dist
zip -r ../Tweelectron-win32-ia32-$version.zip Tweelectron-win32-ia32
zip -r ../Tweelectron-win32-x64-$version.zip Tweelectron-win32-x64
# create checksums
cd ..
sha256sum Tweelectron-linux-x64-$version.tar.gz > SHA256SUMS.txt
sha256sum Tweelectron-linux-ia32-$version.tar.gz >> SHA256SUMS.txt
sha256sum Tweelectron-win32-x64-$version.zip >> SHA256SUMS.txt
sha256sum Tweelectron-win32-ia32-$version.zip >> SHA256SUMS.txt
30 changes: 12 additions & 18 deletions src/about.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="pages.css">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'sha256-fcvsOwr5JlJCGhCpDXIWrowx3Dpcr5PnWMaRVxCt4JA='">
</head>
<body>
<h1>About Tweelectron</h1>
<p class="about">
Tweelectron version:
<script>
const fs = require('fs')
const path = require('path')
document.write(fs.readFileSync(path.join(__dirname, 'tweelectron-version'),'utf8'))
</script><br>
Electron version: <script>document.write(process.versions.electron)</script><br>
Tor version:
<script>
if(process.platform == "linux"){
document.write(fs.readFileSync(path.join(__dirname, 'tor-version-linux'),'utf8'))
}
else if(process.platform=="win32"){
document.write(fs.readFileSync(path.join(__dirname, 'tor-version-win'), 'utf8'))
}
</script><br>
GitHub Page: <a href="https://github.com/Plastikmensch/Tweelectron">https://github.com/Plastikmensch/Tweelectron</a>
Tweelectron version: <span id="app-version"></span><br>
Electron version: <span id="electron-version"></span><br>
Tor version: <span id="tor-version"></span><br>
GitHub Page: <a href="https://github.com/Plastikmensch/Tweelectron">https://github.com/Plastikmensch/Tweelectron</a> *<br>
* Opens in default browser
</p>
<script type="text/javascript">
document.getElementById("app-version").innerText = window.version.app
document.getElementById("electron-version").innerText = window.version.electron
document.getElementById("tor-version").innerText = window.version.tor
</script>
</body>
</html>
Loading

0 comments on commit 0c7e03f

Please sign in to comment.