Commit graph

890 commits

Author SHA1 Message Date
Claude
adb04d2e43
debug(obsidian): add logging to diagnose nested folder display issue
- Add debug logging to getVaultFiles() to show file counts
- Add logging to listAllNotes() to show processing details
- Add logging to buildFolderTree() to trace folder creation
- Filter .md files in getVaultFiles() for better performance
- Log sample file paths to help diagnose API response format

This will help identify why nested folders aren't appearing in the
folder tree browser.
2025-11-14 04:50:05 +00:00
Nathan Eckenrode
8561eee75d
Merge pull request #9 from n8k99/claude/claude-md-mhy85sj7tlvzwb5w-01QzBpdgGJXE5Qk3JaNupuxM
feat(obsidian): add collapsible folder tree for browsing notes
2025-11-13 23:31:11 -05:00
Claude
5cb4aeb599
feat(obsidian): add collapsible folder tree for browsing notes
Replaced flat list with hierarchical folder tree structure for better
navigation when browsing vault notes.

**Features:**
- Collapsible folders with ▼/▶ toggle arrows
- Proper indentation showing folder hierarchy
- 📁 folder and 📄 file icons
- Click folder name to expand/collapse
- Click file to select it
- Handles root-level files and nested folders
- Hover highlights for files

**Functions added:**
- buildFolderTree(): Converts flat note list to tree structure
- renderFolderTree(): Recursively renders folders with nesting
- renderFiles(): Renders files at current folder level

Perfect for vaults organized like:
```
State1/
  Province1/
    City1.md
    City2.md
  Province2/
    City3.md
State2/
  Province3/
    City4.md
```

Much easier to navigate than a flat list of 100+ notes!
2025-11-14 04:29:56 +00:00
Nathan Eckenrode
f2c9efebdc
Merge pull request #8 from n8k99/claude/claude-md-mhy85sj7tlvzwb5w-01QzBpdgGJXE5Qk3JaNupuxM
Claude/claude md mhy85sj7tlvzwb5w 01 qz bpdg gjxe5 qk3 ja nupux m
2025-11-13 23:25:18 -05:00
Claude
154145a518
feat(obsidian): persist FMG-to-note association with fmg-id in frontmatter
When a user selects or creates a note for a burg/marker, the system now
automatically links them together by adding/updating the note's frontmatter.

**How it works:**

1. **When saving a note**:
   - Adds `fmg-id: burg123` to frontmatter
   - Updates `x:` and `y:` coordinates
   - Preserves existing frontmatter fields

2. **When creating a new note**:
   - Template includes fmg-id from the start
   - Uses the proper elementId (e.g., "burg123")

3. **Next time you edit**:
   - System finds note instantly by fmg-id
   - No need to search by coordinates again
   - Permanent two-way link established

**Changes:**
- obsidian-notes-editor.js:
  - Pass elementId and coordinates to showMarkdownEditor()
  - updateFrontmatterWithFmgData() injects fmg-id on save
  - Automatically updates coordinates to keep in sync
- obsidian-bridge.js:
  - generateNoteTemplate() accepts elementId parameter
  - Uses elementId for fmg-id instead of element.id

Users no longer need to manually match notes - once linked, the
association is permanent in the note's frontmatter.
2025-11-14 04:22:24 +00:00
Claude
28cf8db82d
feat(obsidian): add text search and browse features for note finding
Enhanced the Obsidian note finding system with:

**ObsidianBridge:**
- searchNotes(query): Search vault by filename
- listAllNotes(): Browse all notes in vault

**Obsidian Notes Editor:**
- Text search box with auto-populated state/province
- "Browse All Notes" button to see full vault
- Display burg's state and province in dialog
- Pre-fill search with state name for easier finding
- Enter key triggers search
- Click any result to load that note

**getElementData enhancement:**
- Extract and include state/province names for burgs
- Extract state/province from cell data for markers

Now users can:
1. See which state/province the burg belongs to
2. Search by state name (pre-filled)
3. Search by any text in filename
4. Browse all notes manually
5. Click to select matching note

This addresses the user's organization structure where notes are
stored in State/Province folders matching the map structure.
2025-11-14 04:18:20 +00:00
Nathan Eckenrode
9367662fd3
Merge pull request #7 from n8k99/claude/claude-md-mhy85sj7tlvzwb5w-01QzBpdgGJXE5Qk3JaNupuxM
fix(obsidian): pass string elementId instead of number to editObsidia…
2025-11-13 23:12:43 -05:00
Claude
9243c43d2d
fix(obsidian): pass string elementId instead of number to editObsidianNote
The editObsidianNote function expects elementId as a string (e.g. 'burg123')
but was receiving a number. This caused elementId.replace() to fail.

Fixed in both:
- burg-editor.js: Pass 'burg' + id instead of id
- markers-editor.js: Pass id (already a string) instead of marker.i
2025-11-14 04:11:45 +00:00
Nathan Eckenrode
68b572f33f
Merge pull request #6 from n8k99/claude/claude-md-mhy85sj7tlvzwb5w-01QzBpdgGJXE5Qk3JaNupuxM
Claude/claude md mhy85sj7tlvzwb5w 01 qz bpdg gjxe5 qk3 ja nupux m
2025-11-13 23:07:26 -05:00
Claude
619bea1b99
feat: integrate Obsidian notes into burg and marker editors
Replace the old TinyMCE notes editor with Obsidian integration in:
- Burg editor "Edit note" button
- Marker editor "Edit note" button

Changes:
- modules/ui/burg-editor.js: Update editBurgLegend() to call editObsidianNote()
- modules/ui/markers-editor.js: Update editMarkerLegend() to call editObsidianNote()
- Both functions fall back to old editNotes() if Obsidian is not configured
- index.html: Update version hashes to 1.108.13

Now when users click "Edit note" on a burg or marker, they get the modern
Markdown editor with Obsidian vault integration instead of the old WYSIWYG.
2025-11-14 03:59:19 +00:00
Nathan Eckenrode
fe15bd0cf0
Merge pull request #1 from n8k99/claude/claude-md-mhy85sj7tlvzwb5w-01QzBpdgGJXE5Qk3JaNupuxM
Claude/claude md mhy85sj7tlvzwb5w 01 qz bpdg gjxe5 qk3 ja nupux m
2025-11-13 22:04:09 -05:00
Nathan Eckenrode
c86bb5732e something 2025-11-13 22:03:36 -05:00
Nathan Eckenrode
428349f6fb
Merge branch 'master' into claude/claude-md-mhy85sj7tlvzwb5w-01QzBpdgGJXE5Qk3JaNupuxM 2025-11-13 22:01:51 -05:00
Claude
769d3a31bb
feat: add Obsidian vault integration for modern Markdown notes
Add comprehensive Obsidian integration as intermediate step toward
PostgreSQL migration, enabling modern Markdown-based note editing:

**Features:**
- Obsidian Local REST API integration for vault access
- Coordinate-based note matching (searches vault YAML frontmatter)
- Shows top 5-8 closest matches when clicking burgs/markers
- Modern Markdown editor with live preview
- [[Wikilink]] support for connecting notes
- "Open in Obsidian" button to jump to native app
- Configuration UI for API setup and testing

**Technical Implementation:**
- modules/io/obsidian-bridge.js - Core API integration layer
- modules/ui/obsidian-notes-editor.js - Markdown editor UI
- modules/ui/obsidian-config.js - Configuration panel
- OBSIDIAN_INTEGRATION.md - Complete setup/usage guide

**Coordinate Matching:**
- Parses YAML frontmatter for x/y coordinates
- Calculates distance to clicked element
- Supports nested (coordinates.x) and flat (x:) formats
- Handles missing FMG IDs (common with PostgreSQL imports)

**User Workflow:**
1. Configure Obsidian REST API connection
2. Click burg/marker in FMG
3. System finds matching notes by coordinates
4. Select note or create new one
5. Edit in modern Markdown editor
6. Save syncs to Obsidian vault instantly

This replaces the "Win95-style TinyMCE" editor with a clean,
modern Markdown experience while maintaining compatibility with
the eventual PostgreSQL backend migration. Users can edit notes
in either FMG or Obsidian - both stay in sync via file system.

Version: 1.108.13
2025-11-14 02:57:07 +00:00
Azgaar
538cc3423a fix: 1227 2025-08-29 14:36:34 +02:00
Azgaar
738732364e fix(ui): correct marker note lookup by adding prefix 2025-07-02 00:52:41 +02:00
Azgaar
c26827bfe5 fix(markers-overview): correct note lookup by marker id 2025-07-01 23:16:07 +02:00
Azgaar
c891689796 feat(ai-generator): update supported AI models list 2025-06-14 15:24:23 +02:00
Azgaar
bba3587e50 refactor: ollama generation 2025-06-14 15:20:01 +02:00
Krory
fe2fa6d6b8
Ollama integration as a new AI provider (#1208)
* ollama implementation

* ollama implementation

* Update ai-generator.js

* Update README.md

* Create OLLAMAREADME.MD

* Update OLLAMAREADME.MD

* Update notes-editor.js

* Update index.html

* Update OLLAMAREADME.MD

* Update ai-generator.js
2025-06-14 14:03:06 +02:00
Greger
004097ef93
Make id field in exports more consistent. (#1210)
The id field for geojson export was not consistent with csv exports.
Removes the prefix on routes, rivers and markers geojson, and on
markers csv, to make them all use only an integer as id.

This makes it easier to import and do joins in other software.
2025-06-11 00:42:31 +02:00
Ruichka
8131f25456
Allow data URI scheme for custom images (#1196)
* Allow data URL external images

* fix

* removed inconsistency
2025-03-08 14:51:48 +01:00
Azgaar
4dd34e13d1 refactor: drawReliefIcons, v1.108.4 2025-02-15 18:03:54 +01:00
Azgaar
791347b1ee feat: generate less water ice, v1.108.3 2025-02-15 17:45:16 +01:00
Azgaar
d98ef5717e perf: set text-rendering to optimizeSpeed, v1.108.1 2025-02-15 14:43:51 +01:00
Azgaar
e526646076 fix: notes editor size to be relative to canvas size 2025-02-10 12:41:14 +01:00
Azgaar
51c47a18d2 fix: external icons - battle screen 2025-02-10 01:39:21 +01:00
Azgaar
d51deffdac feat: make lined icons work for all elements, v1.107.0 2025-02-08 14:05:28 +01:00
Issac411
7b8ffd025f
custom pictures for regiments (#1183)
* forms and ajustements

* variable size for style as requested
2025-01-19 23:29:27 +01:00
Azgaar
04c6fb3ee7 feat: like temp likeness, 1.106.6 2024-12-17 12:48:41 +01:00
Azgaar
ced7b88054 fix: submap - generate in current canvas size 2024-12-13 13:15:01 +01:00
Azgaar
50ee5150c1 fix: #1174 2024-12-13 11:58:53 +01:00
Azgaar
66d22f26c0
[Draft] Submap refactoring (#1153)
* refactor: submap - start

* refactor: submap - continue

* Merge branch 'master' of https://github.com/Azgaar/Fantasy-Map-Generator into submap-refactoring

* refactor: submap - relocate burgs

* refactor: submap - restore routes

* refactor: submap - restore lake names

* refactor: submap - UI update

* refactor: submap - restore river and biome data

* refactor: submap - simplify options

* refactor: submap - restore rivers

* refactor: submap - recalculateMapSize

* refactor: submap - add middle points

* refactor: submap - don't add middle points, unified findPath fn

* chore: update version

* feat: submap - relocate out of map regiments

* feat: submap - fix route gen

* feat: submap - allow custom number of cells

* feat: submap - add checkbox submapRescaleBurgStyles

* feat: submap - update version hash

* chore: supporters update

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-12-12 13:11:54 +01:00
Azgaar
fa03b2d705 fix: #1170 2024-11-24 15:02:56 +01:00
Azgaar
8d621ba9ce
AI Claude support (#1167)
* Add Claude AI support (#1165)

* feat: ai generator - add support for claude

* feat: ai generator - add claude support

* refactor: clean up API calls

---------

Co-authored-by: Azgaar <maxganiev@yandex.com>

* feat: ai - claude support

---------

Co-authored-by: aesli <37640637+aesliva@users.noreply.github.com>
Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-11-14 02:05:34 +01:00
Dyxang
ca8e723006
Temperature parameters can be customized (#1162)
* Temperature parameters can be customized

* fix typo

* update to 1.105.22

* Update index.html
2024-11-07 14:23:38 +01:00
Ángel Montero Lamas
91dc16878e
Stroke dash to cells (#1159)
* style.js sorted items alphabetically

* style.js added strokeDash to "cells"
2024-10-26 14:40:43 +02:00
Azgaar
54491cfd09 feat: zones editor - don't close other editors on open 2024-10-22 23:04:57 +02:00
Azgaar
6d69eb855f fix: zones editor - legend to be toggable 2024-10-19 14:02:04 +02:00
Azgaar
87e1dc2c5d
Draw state labels improvement (#1155)
* chore: render debug elements

* feat: redo draw state labels algo

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-10-19 13:25:34 +02:00
Azgaar
efbe0373b0 fix: lock all burgs 2024-10-16 15:20:44 +02:00
Azgaar
c447afb829 fix: features rendering - close the ring 2024-10-13 20:32:37 +02:00
Azgaar
26b659a59e fix #1152 2024-10-11 12:17:33 +02:00
Azgaar
c795ac6c30 fix: allow to load smaller namesbase without issues on regeneration 2024-10-09 01:08:47 +02:00
Azgaar
c04fb2bfca refactor: burg types 2024-09-27 13:32:22 +02:00
Azgaar
879cf6b692 fix: typo 2024-09-25 12:13:16 +02:00
Azgaar
ea27276558 fix: disable double-click on heightmap edit 2024-09-22 20:07:55 +02:00
Azgaar
b66874ddda feat: battles - move Regiments back to init position after the battle 2024-09-22 18:20:22 +02:00
Azgaar
e25f231697
AI Assistant widget (#1115)
* feat: add assistan widget

* feat: remove gtm

* feat: assistant - minify js, add option UI

* feat: assistant - ability to toggle assistant

* chore: update version to 1.102.00

* chore: resolve version conflict

* chore: cleanup

* chore: cleanup

* feat: ai widget - improve style

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-09-22 14:59:53 +02:00
Azgaar
6d3b88b36f fix: split regiment v1.104.14 2024-09-22 12:14:30 +02:00