+
+ Warning: downloading files from Google with a delay less than about 30 seconds will eventually cause Google to
+ refuse download requests from this program for a few hours. If you can find a way around this limitation, contact the devs.
+
+
Theme
@@ -26,4 +44,11 @@
{{theme}}
+
+
+
+
\ No newline at end of file
diff --git a/src/app/components/settings/settings.component.scss b/src/app/components/settings/settings.component.scss
index b1ac3b1..e258e7b 100644
--- a/src/app/components/settings/settings.component.scss
+++ b/src/app/components/settings/settings.component.scss
@@ -7,4 +7,14 @@
.default-cursor {
cursor: default;
pointer-events: none;
+}
+
+#rateLimitInput {
+ width: unset !important;
+}
+
+.bottom {
+ position: absolute;
+ bottom: 2em;
+ right: 2em;
}
\ No newline at end of file
diff --git a/src/app/components/settings/settings.component.ts b/src/app/components/settings/settings.component.ts
index f3a0420..b782a83 100644
--- a/src/app/components/settings/settings.component.ts
+++ b/src/app/components/settings/settings.component.ts
@@ -12,7 +12,7 @@ export class SettingsComponent implements OnInit, AfterViewInit {
cacheSize = 'Calculating...'
- constructor(private settingsService: SettingsService, private electronService: ElectronService) { }
+ constructor(public settingsService: SettingsService, private electronService: ElectronService) { }
async ngOnInit() {
const cacheSize = await this.settingsService.getCacheSize()
@@ -49,4 +49,19 @@ export class SettingsComponent implements OnInit, AfterViewInit {
async openLibraryDirectory() {
this.electronService.openFolder(this.settingsService.libraryDirectory)
}
+
+ changeRateLimit(event: Event) {
+ const inputElement = event.srcElement as HTMLInputElement
+ this.settingsService.rateLimitDelay = Number(inputElement.value)
+ }
+
+ toggleDevTools() {
+ const toolsOpened = this.electronService.currentWindow.webContents.isDevToolsOpened()
+
+ if (toolsOpened) {
+ this.electronService.currentWindow.webContents.closeDevTools()
+ } else {
+ this.electronService.currentWindow.webContents.openDevTools()
+ }
+ }
}
\ No newline at end of file
diff --git a/src/app/core/services/settings.service.ts b/src/app/core/services/settings.service.ts
index 3feea91..c6bf824 100644
--- a/src/app/core/services/settings.service.ts
+++ b/src/app/core/services/settings.service.ts
@@ -62,4 +62,12 @@ export class SettingsService {
this.changeTheme(newValue)
this.saveSettings()
}
+
+ get rateLimitDelay() {
+ return this.settings == undefined ? NaN : this.settings.rateLimitDelay
+ }
+ set rateLimitDelay(delay: number) {
+ this.settings.rateLimitDelay = delay
+ this.saveSettings()
+ }
}
\ No newline at end of file
diff --git a/src/electron/shared/Settings.ts b/src/electron/shared/Settings.ts
index 720740f..450b11a 100644
--- a/src/electron/shared/Settings.ts
+++ b/src/electron/shared/Settings.ts
@@ -7,5 +7,5 @@ export interface Settings {
export const defaultSettings: Settings = {
rateLimitDelay: 31,
theme: 'Default',
- libraryPath: 'C:/Users/bouviejs/Desktop/Bridge Notes/TestLibrary' // TODO: default should be undefined
+ libraryPath: undefined
}
\ No newline at end of file