From 11db2874fb27eeee3c2f3a4d1bc5a01e0305112a Mon Sep 17 00:00:00 2001 From: isark Date: Sun, 26 Nov 2023 04:01:56 +0100 Subject: [PATCH] Design improvements, some help tooltips. --- src-tauri/src/config.rs | 17 +++++++++++-- src-tauri/tauri.conf.json | 2 +- src/app/app.component.html | 20 ++++++++++++++++ src/app/app.component.scss | 15 ++++++++++++ src/app/app.module.ts | 2 ++ .../editor/notes/edit-notes.component.html | 1 + src/app/editor/notes/notes.component.scss | 6 ++++- src/app/editor/notes/notes.component.ts | 3 ++- .../plan-display/plan-display.component.html | 11 +++++---- .../plan-display/plan-display.component.scss | 24 +++++++++---------- src/app/plan-display/plan-display.module.ts | 4 +++- src/app/settings/settings.component.html | 17 +++++++++---- src/app/settings/settings.component.ts | 3 +-- src/app/tooltip/tooltip.component.html | 6 +++++ src/app/tooltip/tooltip.component.ts | 13 ++++++++++ 15 files changed, 114 insertions(+), 30 deletions(-) create mode 100644 src/app/tooltip/tooltip.component.html create mode 100644 src/app/tooltip/tooltip.component.ts diff --git a/src-tauri/src/config.rs b/src-tauri/src/config.rs index 5797680..d4f8744 100644 --- a/src-tauri/src/config.rs +++ b/src-tauri/src/config.rs @@ -42,6 +42,11 @@ pub struct Config { pub note_default_fg: String, #[serde(default = "Config::default_poe_client_log_path")] pub poe_client_log_path: Option, + + #[serde(default = "Config::default_plan_num_visible")] + pub num_visible: u16, + #[serde(default = "Config::default_plan_offset")] + pub offset: i16, } impl Default for Config { @@ -59,6 +64,8 @@ impl Default for Config { #[cfg(not(build_only))] poe_client_log_path: Self::default_poe_client_log_path(), note_default_fg: Self::default_note_default_fg(), + num_visible: Self::default_plan_num_visible(), + offset: Self::default_plan_offset(), } } } @@ -96,7 +103,7 @@ impl Config { fn default_poe_client_log_path() -> Option { poe_reader::get_poe_path() } - #[cfg(not(build_only))] + #[cfg(not(build_only))] fn default_poe_client_log_path() -> Option { None } @@ -104,5 +111,11 @@ impl Config { fn default_note_default_fg() -> String { "#bfbfbfff".to_string() } -} + fn default_plan_num_visible() -> u16 { + 3 + } + fn default_plan_offset() -> i16 { + 1 + } +} diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index c0fb379..b05a0bd 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Nothing", - "version": "1.1.1" + "version": "1.2.0" }, "tauri": { "systemTray": { diff --git a/src/app/app.component.html b/src/app/app.component.html index 5a71670..e6ece7b 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -12,6 +12,26 @@ + + +
+ +
Plan window background is lets you configure the background color of the "plan window"
+The overlay backdrop color covers the whole area when the overlay is toggled into interactable* mode.
+    *Interactable means you can move and resize the "plan window"
+The overlay default font color is the default color for notes in the plan window
+
+The "plan window" proceeds automatically when you go into the next zone ingame if it matches the next one in the plan.
+
+ +
Right click to edit note
+Double click to quick add
+Notes are in markdown extended with color support, e.g:
+    {{'{'}}css-compatible-color{{'}'}}(The colored text inside)
+ +
+
+
diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 6bbad82..77185b5 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -39,4 +39,19 @@ mat-tab-group { .settings { height: 100%; +} + +.tooltip { + position: absolute; + top: 0; + right: 0; + z-index: 5000; + cursor: help; +} + +.tooltip-area { + background-color: rgba(50, 50, 50, 1); + color: white; + + // width: 500px; } \ No newline at end of file diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0790f24..34ea19c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -14,6 +14,7 @@ import { OverlayModule } from "@angular/cdk/overlay"; import { SettingsComponent } from "./settings/settings.component"; import { MatTabsModule } from '@angular/material/tabs'; import { MAT_DIALOG_DEFAULT_OPTIONS } from "@angular/material/dialog"; +import { TooltipComponent } from "./tooltip/tooltip.component"; // import { GemFinderComponent } from "./gem-finder/gem-finder.component"; export function initializeApp(configService: ConfigService) { @@ -37,6 +38,7 @@ export function initializeApp(configService: ConfigService) { OverlayModule, SettingsComponent, MatTabsModule, + TooltipComponent ], providers: [ { diff --git a/src/app/editor/notes/edit-notes.component.html b/src/app/editor/notes/edit-notes.component.html index 8712875..7973f68 100644 --- a/src/app/editor/notes/edit-notes.component.html +++ b/src/app/editor/notes/edit-notes.component.html @@ -5,6 +5,7 @@ + Preview (Unscaled)
diff --git a/src/app/editor/notes/notes.component.scss b/src/app/editor/notes/notes.component.scss index 3fd8c0a..4f4d42b 100644 --- a/src/app/editor/notes/notes.component.scss +++ b/src/app/editor/notes/notes.component.scss @@ -23,4 +23,8 @@ & { font-size: 1.3em; } -} \ No newline at end of file + + .note-preview { + min-height: 400px; + } +} diff --git a/src/app/editor/notes/notes.component.ts b/src/app/editor/notes/notes.component.ts index 7620521..f1dc5d4 100644 --- a/src/app/editor/notes/notes.component.ts +++ b/src/app/editor/notes/notes.component.ts @@ -6,6 +6,7 @@ import { FormsModule } from '@angular/forms'; import { MatInputModule } from '@angular/material/input'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MarkdownService } from 'src/app/_services/markdown.service'; +import { ScalableComponent } from 'src/app/Scalable/scalable.component'; interface DialogData { @@ -36,7 +37,7 @@ export class NotesComponent implements AfterViewInit { selector: 'notes-editor', templateUrl: 'edit-notes.component.html', standalone: true, - imports: [CommonModule, FormsModule, MatDialogModule, MatFormFieldModule, MatInputModule, FormsModule, MatButtonModule, NotesComponent], + imports: [CommonModule, FormsModule, MatDialogModule, MatFormFieldModule, MatInputModule, FormsModule, MatButtonModule, NotesComponent, ScalableComponent], encapsulation: ViewEncapsulation.None, }) export class EditNotesComponentDialog { diff --git a/src/app/plan-display/plan-display.component.html b/src/app/plan-display/plan-display.component.html index b966b3f..d877ca6 100644 --- a/src/app/plan-display/plan-display.component.html +++ b/src/app/plan-display/plan-display.component.html @@ -37,10 +37,13 @@ - + +
+ (W) = Waypoint + (T) = Trial + The plan window's will have a glow in the corresponding color(s) above to help indicate if the current zone has any of those. +
+
-
- -
-
- +
+ + Number of zones to display + + +
+
+ + Offset + +
\ No newline at end of file diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index 79990d1..843a680 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -12,13 +12,12 @@ import { MatInputModule } from '@angular/material/input'; import { MatButtonModule } from '@angular/material/button'; import { ShortcutService } from '../_services/shortcut.service'; import { RecordKeyChord } from '../directives/record-key-chord.directive'; -import { Config } from '../_models/generated/Config'; import { MatDividerModule } from '@angular/material/divider'; @Component({ selector: 'settings', standalone: true, - imports: [CommonModule, FormsModule, ColorPickerComponent, MatSlideToggleModule, MatDialogModule, MatButtonModule, MatDividerModule], + imports: [CommonModule, FormsModule, ColorPickerComponent, MatSlideToggleModule, MatDialogModule, MatButtonModule, MatDividerModule, MatFormFieldModule, MatInputModule], templateUrl: './settings.component.html', styleUrls: ['./settings.component.scss'] }) diff --git a/src/app/tooltip/tooltip.component.html b/src/app/tooltip/tooltip.component.html new file mode 100644 index 0000000..dfdb948 --- /dev/null +++ b/src/app/tooltip/tooltip.component.html @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/src/app/tooltip/tooltip.component.ts b/src/app/tooltip/tooltip.component.ts new file mode 100644 index 0000000..53662c7 --- /dev/null +++ b/src/app/tooltip/tooltip.component.ts @@ -0,0 +1,13 @@ +import { OverlayModule } from '@angular/cdk/overlay'; +import { Component } from '@angular/core'; +import { MatCardModule } from '@angular/material/card'; + +@Component({ + selector: 'tooltip', + templateUrl: './tooltip.component.html', + imports: [OverlayModule, MatCardModule,], + standalone: true +}) +export class TooltipComponent { + show: boolean = false; +}