Skip to content

Commit

Permalink
Merge pull request #1488 from ecency/remove-desktop-app
Browse files Browse the repository at this point in the history
Remove Desktop App
  • Loading branch information
feruzm authored Oct 28, 2023
2 parents 8a3f760 + 1698360 commit 0e08017
Show file tree
Hide file tree
Showing 143 changed files with 158 additions and 13,826 deletions.
113 changes: 0 additions & 113 deletions .github/workflows/desktop.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
- name: npm install, lint and/or test
run: |
yarn
cd src/desktop
yarn
cd ../../
yarn test --runInBand --updateSnapshot
env:
CI: true
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
- name: npm install, lint and/or test
run: |
yarn
cd src/desktop
yarn
cd ../../
yarn test --runInBand --updateSnapshot
env:
CI: true
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ FROM node:16.13.2 as base
WORKDIR /var/app

COPY package.json yarn.lock ./
COPY src/desktop/package.json src/desktop/yarn.lock ./src/desktop/

RUN yarn install --non-interactive --frozen-lockfile --ignore-optional
RUN yarn install --non-interactive --frozen-lockfile --ignore-optional --cwd src/desktop

COPY . .

Expand Down
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a href="https://discord.gg/WywwJEu">![Discord](https://img.shields.io/discord/385034494555455488?label=Ecency%20discord&logo=discord)</a> <a href="https://twitter.com/ecency_official">![Twitter Follow](https://img.shields.io/twitter/follow/ecency_official?style=social)</a> <a href="https://github.com/ecency/ecency-vision">![GitHub Repo stars](https://img.shields.io/github/stars/ecency/ecency-vision?style=social)</a>

# [Ecency vision][ecency_vision] – Ecency Web/Desktop client
# [Ecency vision][ecency_vision] – Ecency Web client

![ecency](https://ecency.com/assets/github-cover.png)

Expand All @@ -13,14 +13,6 @@ Fast, simple and clean source code with Reactjs + Typescript.
- [Production version][ecency_vision] - master branch
- [Alpha version][ecency_alpha] - development branch

## Desktop app

Please check latest version on [Release page][ecency_release] or [Ecency link][ecency_desktop].

- Mac users: `Ecency-3.x.x.dmg`
- Windows users: `Ecency.Setup.3.x.x.exe`
- Linux users: `ecency-surfer_3.x.x_amd_64.deb`, `Ecency-3.x.x.AppImage`, `ecency-surfer-3.x.x.x86_64.rpm`, `ecency-surfer-3.x.x.tar.gz`

## Developers

Feel free to test it out and submit improvements and pull requests.
Expand Down Expand Up @@ -73,12 +65,6 @@ If you are setting up your own website other than Ecency.com, you can still leav

`$ yarn start`

##### Start desktop in dev

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

##### Pushing new code / Pull requests

- Make sure to branch off your changes from `development` branch.
Expand Down Expand Up @@ -133,6 +119,5 @@ We will evaluate the risk and make a patch available before filing the issue.

[//]: # "LINKS"
[ecency_vision]: https://ecency.com
[ecency_desktop]: https://desktop.ecency.com
[ecency_alpha]: https://alpha.ecency.com
[ecency_release]: https://github.com/ecency/ecency-vision/releases
6 changes: 0 additions & 6 deletions src/common/api/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ export const getCurrencyRate = (cur: string): Promise<number> => {
.then((r) => r.hive_dollar[cur]);
};

export const geLatestDesktopTag = (): Promise<string> =>
axios
.get("https://api.github.com/repos/ecency/ecency-vision/releases/latest")
.then((r) => r.data)
.then((r) => r.tag_name);

export const GIPHY_API_KEY = "DQ7mV4VsZ749GcCBZEunztICJ5nA4Vef";
export const GIPHY_API = `https://api.giphy.com/v1/gifs/trending?api_key=${GIPHY_API_KEY}&limit=10&offset=0`;
export const GIPHY_SEARCH_API = `https://api.giphy.com/v1/gifs/search?api_key=${GIPHY_API_KEY}&limit=40&offset=0&q=`;
Expand Down
10 changes: 2 additions & 8 deletions src/common/api/notifications-ws-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ declare var window: Window & {

export class NotificationsWebSocket {
private activeUser: ActiveUser | null = null;
private isElectron = false;
private hasNotifications = false;
private hasUiNotifications = false;
private onSuccessCallbacks: Function[] = [];
Expand Down Expand Up @@ -55,11 +54,11 @@ export class NotificationsWebSocket {
const permission = await requestNotificationPermission();
if (permission !== "granted") return;

playNotificationSound(this.isElectron);
playNotificationSound();
}

private async onMessageReceive(evt: MessageEvent) {
const logo = this.isElectron ? "./img/logo-circle.svg" : require("../img/logo-circle.svg");
const logo = require("../img/logo-circle.svg");

const data = JSON.parse(evt.data);
const msg = NotificationsWebSocket.getBody(data);
Expand Down Expand Up @@ -139,11 +138,6 @@ export class NotificationsWebSocket {
return this;
}

public withElectron(isElectron: boolean) {
this.isElectron = isElectron;
return this;
}

public withToggleUi(toggle: Function) {
this.toggleUiProp = toggle;
return this;
Expand Down
3 changes: 1 addition & 2 deletions src/common/api/private-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { getAccessToken } from "../helper/user-token";

import { apiBase } from "./helper";
import { AppWindow } from "../../client/window";
import isElectron from "../util/is-electron";
import { NotifyTypes } from "../enums";
import { BeneficiaryRoute, MetaData, RewardType } from "./operations";
import { ThreeSpeakVideo } from "./threespeak";
Expand Down Expand Up @@ -528,7 +527,7 @@ export const saveNotificationsSettings = (
) => {
return saveNotificationSetting(
username,
isElectron() ? "desktop" : "web",
"web",
Number(isEnabled),
notifyTypes as number[],
token
Expand Down
7 changes: 1 addition & 6 deletions src/common/components/404/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Link } from "react-router-dom";

import Meta from "../meta";
import { Global } from "../../store/global/types";
import isElectron from "../../util/is-electron";

const logoCircle = require("../../img/logo-circle.svg");
import "./_index.scss";
Expand Down Expand Up @@ -58,11 +57,7 @@ export class NotFound extends Component<Props, State> {
<>
<Meta {...metaProps} />
<div className="not-found-404">
<img
src={isElectron() ? "./img/logo-circle.svg" : logoCircle}
className="logo"
alt="Ecency"
/>
<img src={logoCircle} className="logo" alt="Ecency" />
<h1>This page doesn't exist.</h1>
<p className="links">
{canGoBack && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ exports[`(1) Default render 1`] = `
"hasKeyChain": false,
"hsClientId": "ecency.app",
"intro": true,
"isElectron": false,
"isMobile": false,
"lang": "en-US",
"lastIndexPath": null,
Expand Down Expand Up @@ -643,7 +642,6 @@ exports[`(2) Cancellable, in progress 1`] = `
"hasKeyChain": false,
"hsClientId": "ecency.app",
"intro": true,
"isElectron": false,
"isMobile": false,
"lang": "en-US",
"lastIndexPath": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ export const DeckThreadsFormToolbarImagePicker = ({ onAddImage }: Props) => {
e.preventDefault();
}

if (files.length > 1 && global.isElectron) {
let isWindows = process.platform === "win32";
if (isWindows) {
files = files.reverse();
}
}

files.forEach((file) => upload(file));

// reset input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ export const DeckToolbarUser = ({ isExpanded, items, setIsExpanded }: Props) =>
</Dropdown>
) : (
<Link to="/">
<img
className="user-avatar medium"
src={
global.isElectron ? "./img/logo-circle.svg" : require("../../../img/logo-circle.svg")
}
/>
<img className="user-avatar medium" src={require("../../../img/logo-circle.svg")} />
</Link>
)}
{isExpanded ? (
Expand Down
7 changes: 0 additions & 7 deletions src/common/components/download-trigger/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ Object.defineProperty(global.navigator, "appVersion", {
}
});

jest.mock("../../api/misc", () => ({
geLatestDesktopTag: () =>
new Promise((resolve) => {
resolve("3.0.16");
})
}));

it("(1) Mac.", async () => {
MOCK = "MacOS";
const component = await renderer.create(<DialogContent />);
Expand Down
Loading

0 comments on commit 0e08017

Please sign in to comment.