Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
52e6e8a
* made "prettier"
Jul 13, 2022
72aa449
Revert "* made "prettier""
Sep 24, 2022
5ab971f
Merge branch 'development' of /home/leprechaun/Source/ecency-vision i…
Sep 26, 2022
b66ec20
Merge branch 'development' of ssh://github.com/ecency/ecency-vision i…
Sep 26, 2022
f333972
* added runtime validation checks
Oct 1, 2022
8571752
Merge remote-tracking branch 'upstream/development' into development
Oct 1, 2022
9ad86b8
* migrated changes for Hive Engine token management to transfer-he/in…
Oct 7, 2022
5a5b6ec
* regression fixes
Oct 7, 2022
af267cb
* show those who have been delegated to in the drop down list when un…
Oct 12, 2022
36e2b86
Merge commit 'cad8ec13254811ea783b3f80d4ef4dbb66129f28' into development
Oct 12, 2022
b0d106f
* proofofbrain branding
Oct 14, 2022
7e21a76
* adjusted JSON files for branding of Proof of Brain.blog
Oct 19, 2022
ef104c0
* added a detailed wallet for Engine tokens
Oct 26, 2022
3aea4ff
* now shows recent transactions in the Hive Engine detail
Oct 28, 2022
f357a3b
* merge
Nov 2, 2022
b3cce33
* removed testnet code as there are no testnet RPC nodes that really …
Nov 3, 2022
214aabd
* updated README file
Nov 4, 2022
4685444
* undid unintentional change to defaults.json
Nov 4, 2022
d9dc79b
* removed need for client_config file
Nov 4, 2022
8de04d4
Merge branch 'development' into proofofbrainbranding
Nov 4, 2022
9ad8754
* proof of brain branding defaults.json
Nov 6, 2022
6fc4a49
* redirect to the site being used rather than the site of the backend…
Nov 6, 2022
806c760
* added site value for where to redirect with Hive Signer
Nov 9, 2022
86cf5f1
Merge remote-tracking branch 'upstream/development' into development
shawnpringle Nov 20, 2022
2bc6229
* test correction
Nov 20, 2022
e64a4c7
* more substitutions for ecency.app
Nov 20, 2022
b46df07
* migrated constants from client_config.ts to constants/defaults.json
Nov 21, 2022
9d6b936
* added card-link style to the listed Hive Engine tokens
Nov 21, 2022
c30bb22
Merge branch 'development' of ssh://github.com/ecency/ecency-vision i…
shawnpringle Nov 21, 2022
d0dd470
Merge branch 'development' of ssh://github.com/ecency/ecency-vision i…
shawnpringle Nov 21, 2022
3230e33
Merge branch 'development' of ssh://github.com/ecency/ecency-vision i…
Nov 21, 2022
36a6c56
Merge branch 'development' of /home/leprechaun/Source/ecency-vision i…
Nov 21, 2022
2e2a960
Merge branch 'ecency:development' into detailed-hive-engine-wallet
shawnpringle Nov 21, 2022
902a16d
* additional fixes for merge
shawnpringle Nov 22, 2022
8bf81c9
* removed duplicate symbol, made formated-number round rather than tr…
Nov 22, 2022
bcdb48d
Merge branch 'development' into detailed-hive-engine-wallet
Nov 22, 2022
326abeb
* merge
Nov 22, 2022
8626f90
* merge
Nov 23, 2022
a0c47a3
* now derives the via-app value from the appURL constant
Nov 25, 2022
1bd1912
* merge
shawnpringle Nov 25, 2022
e1fd0e3
Merge branch 'detailed-hive-engine-wallet' into proofofbrainbranding
Nov 25, 2022
fe7fd25
* allow showing extra post information according to flags set in the …
Nov 28, 2022
a76a874
* connecting new postingflags to the preferences pane.
Nov 28, 2022
6b10ca8
* progress: able to set showSelfVote, showRewardSplit and lowRewardTh…
Nov 28, 2022
d532713
* fixed bugs: now the settings page updates
Nov 29, 2022
881f351
* test updates
Nov 29, 2022
b2a13eb
* add tests
Nov 29, 2022
09ee1d0
* merge
Nov 29, 2022
cd01830
* merge
shawnpringle Dec 2, 2022
ddd882e
* add spacing around via frontend line in entry list item. Added all…
shawnpringle Dec 4, 2022
fd5f76c
Merge branch 'postingflags' into proofofbrainbranding
Dec 4, 2022
36344af
* added control of showing which front end was used in entry-items
shawnpringle Dec 6, 2022
b07cb17
* use camel case and other small improvements. Thank you Mr/Ms. Time…
shawnpringle Dec 8, 2022
94c5d19
* merge
Dec 12, 2022
c824766
Merge branch 'development' of /home/leprechaun/Source/ecency-vision i…
Dec 12, 2022
d762707
Merge branch 'development' into development-make-hive-signer-account-…
Dec 12, 2022
7db6463
Merge branch 'development-make-hive-signer-account-a-configured-varia…
Dec 12, 2022
bd45034
Merge branch 'postingflags' into proofofbrainbranding
Dec 24, 2022
3cf84fe
* removed unused defalts.json reference
Jan 8, 2023
fb2d921
* simplify
Jan 8, 2023
9fff832
* added test cases
Jan 8, 2023
ba86bc1
* eliminate Captchas. Not all change is progress.
shawnpringle Jan 16, 2023
48e9195
Merge tag 'nocaptchas' of /home/leprechaun/Source/ecency-vision into …
Jan 16, 2023
80838cc
* merge character removal
Feb 16, 2023
6934c9f
* added newline after Entry Item View Options title
Feb 16, 2023
c22c4c8
* removed errant hr tag
Feb 16, 2023
62d6644
* removed tracker
Feb 17, 2023
a8cc293
* login page will display KeyChain Login prompt instead of password p…
Feb 21, 2023
be9c0fd
* record the correct app name when posting
Feb 24, 2023
dc8220f
* display the age of posts correctly even when running with the timez…
Feb 24, 2023
d26df13
* use domain name for sitename (as it is for the via line which will …
Mar 8, 2023
aa72a7f
Merge branch 'feature/login-page-change' into proofofbrainbranding
Mar 8, 2023
ae4b644
* log users to the console when a user logs in
Mar 20, 2023
fd1e4f9
* update URL when showing details on a Hive Engine token. These chan…
Mar 20, 2023
1cc12bd
* make wallet-menu order configurable from the .../defaults.json file
Mar 21, 2023
2d7d53a
* migrated detail wallet to display as almost an entire page
Mar 24, 2023
9d00a2c
* do not let blog URL be replaced by the HE asset
Apr 5, 2023
74e857f
* added a textarea box for editing the about section for a profile.
May 13, 2023
7964092
* support loading more of parse transactions in the Hive wallet
Dec 4, 2023
adb6d3e
* updated snapshots, footers now added to each post posted.
Dec 9, 2023
6ed4660
* allow login with QR code
Dec 9, 2023
c1a5f01
* ignore files like defaults-*.json
Dec 13, 2023
bd7195a
* now showing HE rewards on entry page again
Dec 14, 2023
3c48214
* display the He rewards in lists of entries and when viewing a post
Dec 16, 2023
ce48c40
* protect against a null value sometimes used for the quantityHive va…
Dec 28, 2023
01be377
* allow for loading more in Hive Engine wallet
Dec 31, 2023
0086693
* load more hive engine transactions
Dec 31, 2023
67decd8
* merge
Dec 31, 2023
0e5b15d
* do not show interest option for Hive Engine tokens.
Dec 31, 2023
64eed79
* avoid the claim in -5 hours message in the hive/hive dollar wallet.
Jan 23, 2024
0c975f7
* use micro, milli, satoshis so the amount of Bitcoin is displayed wi…
Mar 17, 2024
063d011
* update post in view when a notification indicates it is not up to date
Apr 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ npm-debug.log*
.DS_Store
.idea
cache

coverage
node_modules
build
Expand All @@ -13,8 +12,9 @@ public/static
.env.development.local
.env.test.local
.env.production.local

src/config.ts
.vscode

dev.sh
*~
*.marks
defaults-proofofbrain.json
defaults-localhost.json
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Feel free to test it out and submit improvements and pull requests.

##### Clone

`$ git clone https://github.com/ecency/ecency-vision`

`$ git clone https://github.com/steemfiles/ecency-vision`
`$ git checkout proofofbrainbranding`
`$ cd ecency-vision`

##### Install dependencies
Expand All @@ -54,32 +54,49 @@ Feel free to test it out and submit improvements and pull requests.

* `REDIS_URL` - support for caching amp pages

###### Hivesigner Variables
##### Hivesigner Variables

When setting up another service like Ecency with Ecency-vision software:

- `HIVESIGNER_ID` - iff USE_PRIVATE is 0, set this to what account will handle the permissions for posting level operations.
- `HIVESIGNER_SECRET` - iff USE_PRIVATE is 0, set this to the "secret" field value in the [Hive Signer profile](https://hivesigner.com/profile) for the user named as your `HIVESIGNER_ID`. This should be a lengthy lowercase hex string.

1. You may leave `HIVESIGNER_ID` and `HIVESIGNER_SECRET` environment variables unset and optionally set USE_PRIVATE=1 and leave "base" in the constants/defaults.json set to "https://ecency.com". Your new site will contain more features as it will use Ecency's private API. This is by far the easiest option.
2. You may change `base` to the URL of your own site, but you will have to set environment variables `HIVESIGNER_ID` and `HIVESIGNER_SECRET`; set USE_PRIVATE=0 as well as configure your the `HIVESIGNER_ID` account at the [Hivesigner website.](https://hivesigner.com/profile). Hivesigner will need a `secret`, in the form of a long lowercase hexadecimal number. The HIVESIGNER_SECRET should be set to this value.

###### Hivesigner Login Process
##### Hivesigner Login Process

In order to validate a login, and do posting level operations, this software relies on Hivesigner. A user @alice will use login credentials to login to the site via one of several methods, but the site will communicate with Hivesigner and ask it to do all posting operations on behalf of @alice. Hivesigner can and will do this because both @alice will have given posting authority to the `HIVESIGNER_ID` user and the `HIVESIGNER_ID` user will have given its posting authority to Hivesigner.

##### Edit "default" values
Also for URLs other than https://ecency.com\_...

If you are setting up your own website other than Ecency.com, you can still leave the value `base` as "https://ecency.com". However, you should change `name`, `title` and `twitterHandle`. There are also a lot of static pages that are Ecency specific.
The 'appURL' member should be the URL of the front end you are running. If you are running this testing, it should be "http://localhost" so hiveSigner redirects you back to localhost. The default is 'https://ecency.com'.
The testnet member should be set to false, unless you want to use a Hive testnet

#### defaults.json file

The defaults.json set site settings. Some of these are defaults that the user can change. Some are default and
cannot be changed. The key difference here is that data here is exported to the front end and thus readable by the
front end and at some point, even the user. Things that should not be secret from the user can go here, even if they
may not be able to change some things.

###### menuOrder

The menuOrder item determines which order the wallet menu order items should occur. Possible values are,
"pob", "points", "hive", "engine" and "spk". Nothing else is supported.

##### Start website in dev
## Start website in dev

`$ yarn start`

##### Start desktop in dev
## Start desktop in dev

`$ cd src/desktop`
`$ yarn`
`$ yarn dev`

##### Pushing new code / Pull requests
## Pushing new code / Pull requests

- Make sure to branch off your changes from `development` branch.
- Make sure to run `yarn test` and add tests to your changes.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@firebase/analytics": "^0.8.0",
"@firebase/app": "^0.7.28",
"@firebase/messaging": "^0.9.16",
"@hiveio/dhive": "^1.2.1",
"@hiveio/dhive": "^1.2.8",
"@hiveio/hivescript": "^1.2.7",
"@loadable/component": "^5.15.2",
"@loadable/server": "^5.15.2",
Expand All @@ -43,6 +43,7 @@
"hive-uri": "^0.2.3",
"hivesigner": "^3.2.8",
"html-react-parser": "^1.2.1",
"html5-qrcode": "^2.3.8",
"i18next": "^19.4.4",
"i18next-browser-languagedetector": "^4.2.0",
"immutability-helper": "^3.0.2",
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
Binary file modified public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 21 additions & 21 deletions public/firebase-messaging-sw.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Scripts for firebase and firebase messaging
importScripts('https://www.gstatic.com/firebasejs/8.2.0/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/8.2.0/firebase-messaging.js');
importScripts("https://www.gstatic.com/firebasejs/8.2.0/firebase-app.js");
importScripts("https://www.gstatic.com/firebasejs/8.2.0/firebase-messaging.js");

// Initialize the Firebase app in the service worker by passing the generated config
var firebaseConfig = {
apiKey: 'AIzaSyDKF-JWDMmUs5ozjK7ZdgG4beHRsAMd2Yw',
authDomain: 'esteem-ded08.firebaseapp.com',
databaseURL: 'https://esteem-ded08.firebaseio.com',
projectId: 'esteem-ded08',
storageBucket: 'esteem-ded08.appspot.com',
messagingSenderId: '211285790917',
appId: '1:211285790917:web:c259d25ed1834c683760ac',
measurementId: 'G-TYQD1N3NR3'
apiKey: "AIzaSyDKF-JWDMmUs5ozjK7ZdgG4beHRsAMd2Yw",
authDomain: "esteem-ded08.firebaseapp.com",
databaseURL: "https://esteem-ded08.firebaseio.com",
projectId: "esteem-ded08",
storageBucket: "esteem-ded08.appspot.com",
messagingSenderId: "211285790917",
appId: "1:211285790917:web:c259d25ed1834c683760ac",
measurementId: "G-TYQD1N3NR3"
};

firebase.initializeApp(firebaseConfig);
Expand All @@ -21,28 +21,28 @@ const messaging = firebase.messaging();

messaging.onBackgroundMessage(function (payload) {
//console.log('Received bg notification', payload);
const notificationTitle = payload.notification?.title || 'Ecency';
const notificationTitle = payload.notification?.title || "Ecency";

self.registration.showNotification(notificationTitle, {
body: payload.notification?.body,
icon: payload.notification?.image || 'https://ecency.com/static/media/logo-circle.2df6f251.svg',
data: payload.data,
icon: payload.notification?.image || "https://ecency.com/static/media/logo-circle.2df6f251.svg",
data: payload.data
});
});

self.addEventListener('notificationclick', function (event) {
self.addEventListener("notificationclick", function (event) {
const data = event.notification.data;
let url = 'https://ecency.com';
let url = "https://ecency.com";
const fullPermlink = data.permlink1 + data.permlink2 + data.permlink3;
if (['vote', 'unvote', 'spin', 'inactive'].includes(data.type)) {
url += '/@' + data.target;
if (["vote", "unvote", "spin", "inactive"].includes(data.type)) {
url += "/@" + data.target;
} else {
// delegation, mention, transfer, follow, unfollow, ignore, blacklist, reblog
url += '/@' + data.source;
url += "/@" + data.source;
}
if (fullPermlink) {
url += '/' + fullPermlink;
url += "/" + fullPermlink;
}

clients.openWindow(url, '_blank');
});
clients.openWindow(url, "_blank");
});
Binary file modified public/logo192.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 modified public/logo512.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 modified public/og.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/placeholder.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 14 additions & 12 deletions razzle.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
'use strict';
const LoadableWebpackPlugin = require('@loadable/webpack-plugin');
const { loadableTransformer } = require('loadable-ts-transformer');
const path = require('path');
"use strict";
const LoadableWebpackPlugin = require("@loadable/webpack-plugin");
const { loadableTransformer } = require("loadable-ts-transformer");
const path = require("path");

module.exports = {
plugins: ['typescript', 'scss'],
plugins: ["typescript", "scss"],
options: {
buildType: 'iso'
buildType: "iso"
},
modifyWebpackConfig({
env: {
target, // the target 'node' or 'web'
dev, // is this a development build? true or false
dev // is this a development build? true or false
},
webpackConfig, // the created webpack config
webpackObject, // the imported webpack node module
options: {
pluginOptions, // the options passed to the plugin ({ name:'pluginname', options: { key: 'value'}})
razzleOptions, // the modified options passed to Razzle in the `options` key in `razzle.config.js` (options: { key: 'value'})
webpackOptions, // the modified options that was used to configure webpack/ webpack loaders and plugins
webpackOptions // the modified options that was used to configure webpack/ webpack loaders and plugins
},
paths, // the modified paths that will be used by Razzle.
paths // the modified paths that will be used by Razzle.
}) {
// Do some stuff to webpackConfig
if (target === "web") {
Expand All @@ -31,16 +31,18 @@ module.exports = {
webpackConfig.plugins.push(
new LoadableWebpackPlugin({
outputAsset: true,
writeToDisk: { filename },
writeToDisk: { filename }
})
);
}

// Enable SSR lazy-loading
const tsLoader = webpackConfig.module.rules.find(rule => !(rule.test instanceof Array) && rule.test && rule.test.test('.tsx'));
const tsLoader = webpackConfig.module.rules.find(
(rule) => !(rule.test instanceof Array) && rule.test && rule.test.test(".tsx")
);
tsLoader.use[0].options.getCustomTransformers = () => ({ before: [loadableTransformer] });

webpackConfig.devtool = dev ? 'source-map' : false;
webpackConfig.devtool = dev ? "source-map" : false;
return webpackConfig;
}
};
3 changes: 2 additions & 1 deletion src/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import "../style/theme-day.scss";
import "../style/theme-night.scss";
import "./base-handlers";
import { loadableReady } from "@loadable/component";

import { toggleLoginKcAct } from "../common/store/ui";
declare var window: AppWindow;

const store = configureStore(window["__PRELOADED_STATE__"]);
Expand Down Expand Up @@ -53,6 +53,7 @@ loadableReady().then(() => {
setTimeout(() => {
if (window.hive_keychain) {
window.hive_keychain.requestHandshake(() => {
store.dispatch(toggleLoginKcAct());
store.dispatch(hasKeyChainAct());
});
}
Expand Down
4 changes: 4 additions & 0 deletions src/common/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.tracker {
width: 100%;
height: 100%;
}
Loading