Skip to content

Commit

Permalink
feat: remove extensions manager (#696)
Browse files Browse the repository at this point in the history
* feat: remove extensions manager

* fix: remove unused code

Co-authored-by: Aman Harwara <amanharwara@protonmail.com>
  • Loading branch information
Mo and amanharwara authored Oct 21, 2021
1 parent e79811a commit 8d9b192
Show file tree
Hide file tree
Showing 17 changed files with 12 additions and 332 deletions.
2 changes: 0 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ SECRET_KEY_BASE=test
APP_HOST=http://localhost:3001
PURCHASE_URL=https://standardnotes.com/purchase

EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html
SF_DEFAULT_SERVER=http://localhost:3000

# Development options
DEV_DEFAULT_SYNC_SERVER=https://api.standardnotes.com
DEV_EXTENSIONS_MANAGER_LOCATION=public/extensions/extensions-manager/dist/index.html
ENABLE_UNFINISHED_FEATURES=false
DEV_WEBSOCKET_URL=wss://sockets-dev.standardnotes.com

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Initiate submodules
run: git submodule update --init

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Initiate submodules
run: git submodule update --init

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Initiate submodules
run: git submodule update --init

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
Expand Down
10 changes: 0 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
[submodule "vendor/extensions/extensions-manager"]
path = vendor/extensions/extensions-manager
url = https://github.com/sn-extensions/extensions-manager.git
[submodule "app/extensions/extensions-manager"]
path = app/extensions/extensions-manager
url = https://github.com/sn-extensions/extensions-manager.git
[submodule "public/extensions/extensions-manager"]
path = public/extensions/extensions-manager
url = https://github.com/sn-extensions/extensions-manager.git

3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ GEM
racc (~> 1.4)
nokogiri (1.11.1-x64-mingw32)
racc (~> 1.4)
nokogiri (1.11.1-x86_64-darwin)
racc (~> 1.4)
non-stupid-digest-assets (1.0.9)
sprockets (>= 2.0)
puma (4.3.5)
Expand Down Expand Up @@ -200,6 +202,7 @@ GEM
PLATFORMS
ruby
x64-mingw32
x86_64-darwin-18

DEPENDENCIES
byebug
Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@ Then open your browser to `http://localhost:3001`.

---

**Extensions Manager and Batch Manager:**

The web app makes use of two optional native extensions, which, when running the app with Rails, can be configured to work as follows:

1. `git submodule update --init` (will load the submodules in the `public/extensions` folder)
1. Set the following environment variables in the .env file:
```
EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html
```

You can also set the `SF_DEFAULT_SERVER` environment variable to set the default server for login and registration.

```
Expand Down
118 changes: 0 additions & 118 deletions app/assets/javascripts/services/nativeExtManager.ts

This file was deleted.

6 changes: 0 additions & 6 deletions app/assets/javascripts/ui_models/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { AutolockService } from '@/services/autolock_service';
import { ArchiveManager } from '@/services/archiveManager';
import { DesktopManager } from '@/services/desktopManager';
import { IOService } from '@/services/ioService';
import { NativeExtManager } from '@/services/nativeExtManager';
import { StatusManager } from '@/services/statusManager';
import { ThemeManager } from '@/services/themeManager';
import { AppVersion } from '@/version';
Expand All @@ -32,7 +31,6 @@ type WebServices = {
desktopService: DesktopManager;
autolockService: AutolockService;
archiveService: ArchiveManager;
nativeExtService: NativeExtManager;
statusManager: StatusManager;
themeService: ThemeManager;
io: IOService;
Expand Down Expand Up @@ -133,10 +131,6 @@ export class WebApplication extends SNApplication {
return this.webServices.archiveService;
}

public getNativeExtService() {
return this.webServices.nativeExtService;
}

getStatusManager() {
return this.webServices.statusManager;
}
Expand Down
3 changes: 0 additions & 3 deletions app/assets/javascripts/ui_models/application_group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { DesktopManager } from '@/services/desktopManager';
import { IOService } from '@/services/ioService';
import { AutolockService } from '@/services/autolock_service';
import { StatusManager } from '@/services/statusManager';
import { NativeExtManager } from '@/services/nativeExtManager';
import { ThemeManager } from '@/services/themeManager';

export class ApplicationGroup extends SNApplicationGroup {
Expand Down Expand Up @@ -85,7 +84,6 @@ export class ApplicationGroup extends SNApplicationGroup {
platform === Platform.MacWeb || platform === Platform.MacDesktop
);
const autolockService = new AutolockService(application);
const nativeExtService = new NativeExtManager(application);
const statusManager = new StatusManager();
const themeService = new ThemeManager(application);
application.setWebServices({
Expand All @@ -94,7 +92,6 @@ export class ApplicationGroup extends SNApplicationGroup {
desktopService,
io,
autolockService,
nativeExtService,
statusManager,
themeService,
});
Expand Down
32 changes: 0 additions & 32 deletions app/assets/javascripts/views/footer/footer-view.pug
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,6 @@
app-state='ctrl.appState'
application='ctrl.application'
ng-if='ctrl.showQuickSettingsMenu',)
.sk-app-bar-item
a.no-decoration.sk-label.title(
href='https://standardnotes.com/help',
rel='noopener',
target='_blank'
)
| Help
.sk-app-bar-item.border
.sk-app-bar-item(ng-repeat='room in ctrl.rooms track by room.uuid')
.sk-app-bar-item-column(ng-click='ctrl.selectRoom(room)')
.sk-label {{room.name}}
component-modal(
component-uuid='room.uuid',
ng-if='ctrl.roomShowState[room.uuid]',
on-dismiss='ctrl.onRoomDismiss(room)',
application='ctrl.application'
)
.sk-app-bar-item.border(ng-if="ctrl.state.showBetaWarning")
.sk-app-bar-item(ng-if="ctrl.state.showBetaWarning")
a.no-decoration.sk-label.title(
Expand Down Expand Up @@ -89,21 +72,6 @@
)
.sk-app-bar-item(ng-if='ctrl.offline')
.sk-label Offline
.sk-app-bar-item.border(ng-if='ctrl.state.dockShortcuts.length > 0')
.sk-app-bar-item.dock-shortcut(ng-repeat='shortcut in ctrl.state.dockShortcuts')
.sk-app-bar-item-column(
ng-class="{'underline': shortcut.component.active}",
ng-click='ctrl.selectShortcut(shortcut)'
)
.div(ng-if="shortcut.icon.type == 'circle'" title='{{shortcut.name}}')
.sk-circle.small(
ng-style="{'background-color': shortcut.icon.background_color, 'border-color': shortcut.icon.border_color}"
)
.div(ng-if="shortcut.icon.type == 'svg'" title='{{shortcut.name}}')
.svg-item(
elem-ready='ctrl.initSvgForShortcut(shortcut)',
ng-attr-id='dock-svg-{{shortcut.component.uuid}}'
)
.sk-app-bar-item.border(ng-if='ctrl.state.hasAccountSwitcher')
.sk-app-bar-item(
ng-if='ctrl.state.hasAccountSwitcher'
Expand Down
Loading

0 comments on commit 8d9b192

Please sign in to comment.