feat: implement preferences pane

This commit is contained in:
Gorjan Petrovski
2021-07-05 16:57:37 +02:00
committed by GitHub
parent b3347b75ba
commit a9870214ea
27 changed files with 572 additions and 206 deletions

View File

@@ -65,6 +65,7 @@ import { NotesContextMenuDirective } from './components/NotesContextMenu';
import { NotesOptionsPanelDirective } from './components/NotesOptionsPanel';
import { IconDirective } from './components/Icon';
import { NoteTagsContainerDirective } from './components/NoteTagsContainer';
import { PreferencesDirective } from './components/preferences';
function reloadHiddenFirefoxTab(): boolean {
/**
@@ -90,7 +91,7 @@ function reloadHiddenFirefoxTab(): boolean {
const startApplication: StartApplication = async function startApplication(
defaultSyncServerHost: string,
bridge: Bridge,
nextVersionSyncServerHost: string,
nextVersionSyncServerHost: string
) {
if (reloadHiddenFirefoxTab()) {
return;
@@ -161,7 +162,8 @@ const startApplication: StartApplication = async function startApplication(
.directive('notesContextMenu', NotesContextMenuDirective)
.directive('notesOptionsPanel', NotesOptionsPanelDirective)
.directive('icon', IconDirective)
.directive('noteTagsContainer', NoteTagsContainerDirective);
.directive('noteTagsContainer', NoteTagsContainerDirective)
.directive('preferences', PreferencesDirective);
// Filters
angular.module('app').filter('trusted', ['$sce', trusted]);
@@ -174,10 +176,12 @@ const startApplication: StartApplication = async function startApplication(
Object.defineProperties(window, {
application: {
get: () =>
(angular
.element(document)
.injector()
.get('mainApplicationGroup') as any).primaryApplication,
(
angular
.element(document)
.injector()
.get('mainApplicationGroup') as any
).primaryApplication,
},
});
}