Commit Graph

1259 Commits

Author SHA1 Message Date
Dan Brown e65655594f
Merge branch 'feature/opensearch' into development 2024-09-30 17:21:51 +01:00
Dan Brown 8bc6e75319
Code Blocks: Added SAS and R language options
For #5206
2024-09-30 16:47:55 +01:00
Maximilian Walter 1302e3c959
Add missing XML declaration to OpenSearch endpoint 2024-09-30 17:45:20 +02:00
Maximilian Walter a5b031f906
Translatable description for OpenSearch XML 2024-09-30 17:45:20 +02:00
Dan Brown 42264f402d
CSS: Fixed floating search icon on mobile
Also updated styles to use logical elements instead of conditional rules
for altered search boxes.
Related to #2504
2024-09-27 16:02:13 +01:00
Dan Brown b35b62d59f
Merge branch 'lexical' into development 2024-09-27 12:04:01 +01:00
Dan Brown 1b9310e766
Meta: Added lexical licensing info and added TS/JS CI testing 2024-09-27 10:45:48 +01:00
Dan Brown 8b32e6c15a
Page Editors: Added switching/options for new lexical editor 2024-09-22 20:06:55 +01:00
Dan Brown ef3de1050f
Lexical: Added UI translation support 2024-09-22 12:29:06 +01:00
Dan Brown e6edd9340e
Lexical: Added alignment detoggle, fixed inital focus area 2024-09-21 17:02:54 +01:00
Maximilian Walter 4f890c431c
Limit short-name for OpenSearch XML to 16 characters
The specification does not allow more than 16 characters.
2024-09-14 15:31:56 +02:00
Maximilian Walter c110a97d8a
Remove unofficial method-attribute from OpenSearch-XML 2024-09-14 15:24:42 +02:00
Maximilian Walter 476c2be5a6
Add XML for OpenSearch 2024-09-09 22:54:33 +02:00
Dan Brown 9ebbf7ce94
Lexical: Started loading real content, Improved html loading
Added more styling/layout for buttons and main content area
2024-07-01 15:10:22 +01:00
Dan Brown c2ecbf071f
Lexical: Added tracked container, added fullscreen action
Changed how the editor is loaded in, so it now creates its own DOM, and
content is passed via creation function, to be better self-contained.
2024-07-01 10:44:23 +01:00
Dan Brown f47f7dd9d2
Lexical: Added base table support and started resize handling 2024-06-21 13:47:47 +01:00
Dan Brown 5c343638b6
Added base node/button for details/summary 2024-06-06 14:43:50 +01:00
Dan Brown a74e04141c
Lexical: Started build of image node and decoration UI 2024-06-03 16:56:31 +01:00
Dan Brown 57259aee00
Lexical: Added format previews to format buttons 2024-05-30 12:25:25 +01:00
bradenterpstra01 8759fff116
Update wysiwyg.blade.php
Remove the Shift for the numeric shortcut for incline code.

Ctrl+8 instead of Ctrl+Shift+8

I assume Mac is the same but I do not have a Mac to test with.
2024-05-29 18:01:48 -04:00
Dan Brown dc1a40ea74
Lexical: Added ui container type
Structured UI logical to be fairly standard and mostly covered via
a base class that handles context and core dom work.
2024-05-29 20:38:31 +01:00
Dan Brown b24d60e98d
Lexical: Started UI fundementals with basic button 2024-05-28 18:04:48 +01:00
Dan Brown 0f8bd869d8
Lexical: Added custom id-supporting paragraph blocks 2024-05-28 15:09:50 +01:00
Dan Brown 6e852d2e65
Lexical: Played with commands, extracted & improved callout node 2024-05-27 20:23:45 +01:00
Dan Brown 5a4f595341
Editors: Added lexical editor for testing
Started basic playground for testing lexical as a new WYSIWYG editor.
Moved out tinymce to be under wysiwyg-tinymce instead so lexical is the
default, but TinyMce code remains.
2024-05-27 15:39:41 +01:00
Dan Brown d133f904d3
Auth: Changed email confirmations to use login attempt user
Negates the need for a public confirmation resend form
since we can instead just send direct to the last session login attempter.
2024-05-20 17:23:15 +01:00
Dan Brown d54c7b4783
Audit Log: Fixed bad reference to linked entity item 2024-05-05 16:05:21 +01:00
Dan Brown 67df127c26
API: Added to, and updated, testing to cover audit log additions 2024-05-05 15:44:58 +01:00
Dan Brown 5c28bcf865
Registration: Reviewed added simple honeypot, added testing
Also cleaned up old RegistrationController syntax.
Review of #4970
2024-05-04 13:59:41 +01:00
nesges 16399b63be better accessibility for honepot formfield 2024-04-21 16:08:28 +02:00
nesges 31272e60b6 add ambrosia-container to registration form as honeypot for bots: new form field "username" must not be filled 2024-04-19 09:35:09 +02:00
nesges 1b1cb18839 fixed mislabeling of name input 2024-04-19 09:18:34 +02:00
Dan Brown 80ac66e0a6
Code Editor: Added scala to language list
For #4953
2024-04-16 14:44:17 +01:00
Dan Brown a2fd80954b
Licensing: Added links and tests for new licenses endpoint
For #4907
2024-03-23 22:04:18 +00:00
Dan Brown 0c524c7c8f
Licensing: Added licenses app view
Extracted many methods to a new "MetaController" in the process.
2024-03-23 16:31:13 +00:00
Dan Brown c9d9ad10f2
Merge branch 'totp-patch' into development 2024-03-10 18:32:02 +00:00
Dan Brown d5a689366c
MFA: Copied autocomplete changes from totp to backup codes
Also added tests to cover.
Related to #4849
2024-03-10 18:31:01 +00:00
Dan Brown bc24a1360f
TOTP: Added one-time-code autofill
During review of #4849
Tested on Firefox & Chromium desktop.
2024-03-10 18:24:42 +00:00
Dan Brown bbb41e8b5c
Breadcrumbs: Fixed bad dropdown menu placement at small sizes
For #4824
2024-02-20 18:03:32 +00:00
Mattic c53c9f6866
Turned off autocomplete for TOTP codes
Small QOL change to turn off autocomplete when entering TOTP codes since they're one time use only.
2024-02-15 09:22:35 -06:00
Dan Brown 12daa1c2b9
Header: Fixed mobile menu falling out of header
Changed button to be within-DOM rather than absolute positioned.
Also improves RTL handling by showing menu on the right side.

Fixes #4841
2024-02-13 14:00:34 +00:00
Dan Brown ed21a6d798
Queries: Updated old use-specific entity query classes
- Updated name to align, and differentate from new 'XQueries' clases.
- Removed old sketchy base class with app resolving workarounds, to a
  proper injection-based approach.
- Also fixed wrong translation text used in PageQueries.
2024-02-08 16:39:59 +00:00
Dan Brown 779f09bff6
Merge branch 'chapter-templates' into development 2024-02-01 12:55:38 +00:00
Dan Brown 06901b878f
Comments: Added HTML filter on load, tinymce elem filtering
- Added filter on load to help prevent potentially dangerous comment
  HTML in DB at load time (if it gets passed input filtering, or is
  existing).
- Added TinyMCE valid_elements for input wysiwygs, to gracefully degrade
  content at point of user-view, rather than surprising the user by
  stripping content, which TinyMCE would show, post-save.
2024-01-31 16:20:22 +00:00
Dan Brown e9a19d5878
Comments: Added wysiwyg link selector, updated tests, removed command
- Updated existing tests with recent back-end changes, mainly to use
  HTML data.
- Removed old comment regen command that's no longer required.
2024-01-31 14:22:04 +00:00
Dan Brown adf0baebb9
Comments: Added back-end HTML support, fixed editor focus
Also fixed handling of editors when moved in DOM, to properly remove
then re-init before & after move to avoid issues.
2024-01-30 15:16:58 +00:00
Dan Brown 5c92b72fdd
Comments: Added input wysiwyg for creating/updating comments
Not supporting old content, existing HTML or updating yet.
2024-01-30 14:27:09 +00:00
Sascha 64c783c6f8
extraded template form to own file and changed translations 2024-01-29 19:55:39 +01:00
Dan Brown 5903823eed
Merge pull request #4796 from BookStackApp/v23-12
Merge in v23.12.2 changes
2024-01-24 10:38:14 +00:00
Dan Brown 788327fffb
Attachment List: Fixed broken ctrl-click functionality
Fixes #4782
2024-01-23 15:01:07 +00:00
Dan Brown c1552fb799
Attachments: Drag and drop video support
Supports dragging and dropping video attahchments to embed them in the
editor as HTML video tags.
2024-01-15 11:57:20 +00:00
Sascha 70bfebcd7c
Added Default Templates for Chapters 2024-01-01 21:58:49 +01:00
Dan Brown 3668949705
Input WYSIWYG: Fixed up some dark mode elements 2023-12-22 15:16:06 +00:00
Dan Brown 7cd0629a75
Input WYSIWYG: Updated exports to handle HTML descriptions 2023-12-22 14:57:20 +00:00
Dan Brown ed5d67e609
Input WYSIWYG: Aligned newline handling with old descriptions
To ensure consistenent behaviour before/after changes.
Added tests to cover.
2023-12-20 17:40:58 +00:00
Dan Brown 2fbed3919b
Input WYSIWYG: Added dynamic options for entity selector popups
So that multiple elements on the page can share the same popup, with
different search options.
2023-12-19 12:09:57 +00:00
Dan Brown c07aa056c2
Input WYSIWYG: Updated UpdateUrlCommand, Added chapter HTML display 2023-12-18 18:31:16 +00:00
Dan Brown 307fae39c4
Input WYSIWYG: Added reference store & fetch handling
For book, shelves and chapters.
Made much of the existing handling generic to entity types.
Added new MixedEntityListLoader to help load lists somewhat efficiently.
Only manually tested so far.
2023-12-18 16:23:40 +00:00
Dan Brown c622b785a9
Input WYSIWYG: Added description_html field, added store logic
Rolled out HTML editor field and store logic across all target entity
types. Cleaned up WYSIWYG input logic and design.
Cleaned up some injected classes while there.
2023-12-17 15:02:15 +00:00
Dan Brown 569542f0bb
Input WYSIWYG: Added compontent and rough logic to book form
Just as a draft for prototyping and playing around to get things
started.
2023-12-16 14:48:35 +00:00
Dan Brown 56d07f1909
Users API: Fixed sending invite when using form requests
- Cast send_invite value in cases where it might not have been a boolean,
  which occurs on non-JSON requests.
- Added test to cover.
- Updated API docs to mention and shown boolean usage.
2023-12-13 15:13:54 +00:00
Dan Brown 3af07addf6
Default templates: Fixed syntax for php8.0, added test
Null accessor is akward in php8.0 and throws warnings, so removed.
Added test to check template assingment handling on page delete.
2023-12-12 15:59:12 +00:00
Dan Brown 2081a783f3
Default templates: Cleaned up ux, added case for added endpoint
Cleaned up and updated page picker a bit, allowing longer names to show,
clicking through to item without triggering popup, and updated to use
hidden attributes instead of styles.

Added phpunit tests to cover supporting entity-selector-templates
endpoint.
2023-12-12 15:38:09 +00:00
Dan Brown 4017048555
Page Templates: Changed template field name, added API support 2023-12-12 12:14:00 +00:00
Dan Brown 7ebe7d4e58
Default templates: Added page picker and working forms
- Adapted existing page picker to be usable elsewhere.
- Added endpoint for getting templates for entity picker.
- Added search template filter to support above.
- Updated book save handling to check/validate submitted template.
  - Allows non-visible pages to flow through the save process, if not
    being changed.
- Updated page deletes to handle removal of default usage on books.
- Tweaked wording and form styles to suit.
- Updated migration to explicity reflect default value.
2023-12-11 15:58:27 +00:00
Dan Brown d61f42a377
Default Templates: Started review and updates from PR code 2023-12-11 12:33:20 +00:00
Dan Brown 968bc8cdf3
Merge branch 'development' into default-templates 2023-12-11 11:41:43 +00:00
Dan Brown 45ce7a7126
URL Handling: Removed referrer-based redirect handling
Swapped back handling to instead be pre-determined instead of being
based upon session/referrer which would cause inconsistent results when
referrer data was not available (redirect to app-loaded images/files).

To support, this adds a mechansism to provide a URL through request
data.

Also cleaned up some imports in code while making changes.
Closes #4656.
2023-12-10 12:37:21 +00:00
Dan Brown bba7dcce49
Auth: Refactored OIDC RP-logout PR code, Extracted logout
Extracted logout to the login service so the logic can be shared instead
of re-implemented at each stage. For this, the SocialAuthService was
split so the driver management is in its own class, so it can be used
elsewhere without use (or circular dependencies) of the
SocialAuthService.

During review of #4467
2023-12-06 13:49:53 +00:00
Dan Brown cc10d1ddfc
Merge branch 'fix/oidc-logout' into development 2023-12-06 12:14:43 +00:00
Dan Brown 0254527bd9
RTL: Made a range of fixes & improvments for RTL text
- Updated HTML exports to have auto direction to properly react to RTL
  text when in the content.
- Fixed RTL spacing issues in new editor design changes.
- Fixed pointer arrow being angled wrong on RTL languages.

Related to #4645
2023-12-05 18:53:48 +00:00
Dan Brown fa6ac211b6
Dropdowns: Fixed bad direction logic, added dynmaic height
Changes since adding notifications would cause direction to be assessed
upon max height of 80vh, which caused large dropdowns like the audit log
dropdown to drop up and/or go offscreen.
This restores the default assessment of 500px, and adds dynamic
max-height adjustment to provide more room for large dropdowns.

For #4652
2023-11-07 15:07:11 +00:00
Dan Brown ea0469e61a
PWA: Prevent passing credentials to avoid redirection issues
For #4649
More of a patch around the issue for now.
Have opened #4656 to properly address.
2023-11-07 14:33:37 +00:00
Dan Brown 9b4f1fb981
Styles: Aligned empty state alignment & consistency
- Fixed inital empty state margins/paddings to be aligned and not differ
when lists are empty.
- Aligned button/action display when viewing empty entities.
- Fixed use of non-existing permission in books for book empty state
  button.

Fixes #4563
2023-10-23 11:53:19 +01:00
Dan Brown 02bfaffeb4
My Acount: Updated old preference url reference for watches 2023-10-19 16:37:55 +01:00
Dan Brown fabc854390
My Account: Updated and started adding to tests
- Updated existing tests now affected by my-account changes.
- Updated some existing tests to more accuractly check the scenario.
- Updated some code styling in SocialController.
- Fixed redirects for social account flows to fit my-account.
- Added test for social account attaching.
- Added test for api token redirect handling.
2023-10-19 14:18:42 +01:00
Dan Brown 12946414b0
API Tokens: Updated interfaces to return to correct location
Since management of API tokens can be accessed via two routes, this adds
tracking and handling to reutrn the user to the correct place.
2023-10-19 11:31:45 +01:00
Dan Brown f9422dff18
My Account: Added self-delete flow 2023-10-19 10:48:27 +01:00
Dan Brown cf72e48d2a
User form: Always show external auth field, update access control
Updated old user management routes to only be accessible with permission
to manage users, so also removed old content controls checking for that
permission.
2023-10-19 10:20:04 +01:00
Dan Brown e4ea73ee25
My Account: Cleaned-up/reorganised user header dropdown 2023-10-18 17:57:14 +01:00
Dan Brown 03c44b3992
My Account: Extracted/tweaked profile text, removed old index 2023-10-18 17:53:58 +01:00
Dan Brown c1b01639c1
My Account: Built out profile page & endpoints
Text currently hard-coded, needs finalising and extracting.
2023-10-18 12:39:57 +01:00
Dan Brown a868012048
Users: Built out auth page for my-account section 2023-10-17 17:38:07 +01:00
Dan Brown a9d0f36766
User: Started cleanup of user self-management
- Moved preference views to more general "my-account" area.
- Started new layout for my-account with sidebar.
- Added MFA to prefeences view (to be moved).
2023-10-17 13:11:10 +01:00
Dan Brown 8ffa436f3d
Editors: Adjusted new design for mobile and dark mode
Tested new design across FF, Chrome, and Gnome web (webkit)
2023-10-14 17:10:29 +01:00
Dan Brown 8c10959339
Editors: Tightened up new design, adjusted for MD editor 2023-10-14 16:33:48 +01:00
Dan Brown 45c7409092
Editor: Started toying with more singificant design update 2023-10-13 17:33:11 +01:00
Dan Brown a12b60e1ad
Editor: Started attempts to improve design elements 2023-10-08 15:04:07 +01:00
Dan Brown ccb3c2516a
Homepage: Made much nicer at ipad-like widths
Updated default homepage layout to be much nicer at ipad-like widths by
switching to css-column approach at those breakpoints.
Also neated top actions by switching to simpler flexbox layout.

Fixes #4596
2023-10-07 12:38:54 +01:00
Dan Brown 2e2272343b
Merge branch 'LawssssCat/development' into development 2023-10-06 12:03:38 +01:00
Dan Brown 031067745b
Layout: Restructured tri-layout for sidebar control
Restructured tri-layout grid system, so the sidebars are contained in
their own child grid system, mimicking the parent grid, so we can treat
them as part of the same parent scroll container at smaller screen
sizes for consistent scroll/sticky behavior.

Tested on Firefox, Chromium, Gnome Web and Safari (MacOS).

For #4394
Changes made during review of #4562
2023-10-06 12:03:38 +01:00
Dan Brown bd7c7eb8d6
Print Styles: Removed use of seperate style sheet
Seemed a bit redundant and complicated, since we're only adding a few
extra styles. Just merged into main styles instead.
2023-10-03 15:14:21 +01:00
Dan Brown c5d5b6e3c1
Print Styles: Fixed header/footer content showing
Extra bits were showing due to recent changes.
Done a quick pass through major display views.

Fixes #4594
2023-10-03 14:59:35 +01:00
Dan Brown d1f28ed245
Merge branch 'basic-pwa-support' into development 2023-10-02 15:58:07 +01:00
Dan Brown 1d91b4d8a6
PWA Manifest: Tweaks during review of PR #4430
- Updated to go through HomeController with the builder as a helper
  class.
- Extracted some reapeated items into variables in manifest.
- Updated background color to match those used by BookStack.
- Removed reference of icon.ico since its not intended to be used.
- Added tests to cover functionality.

Review of #4430
2023-10-02 15:54:39 +01:00
Dan Brown b2d48d9a7f
Images: Rolled out image memory handling to image actions
- Moved thumnbail loading out of repo into ImageResizer.
- Updated gallery and editor image handling to show errors where
  possible to indicate memory issues for resizing/thumbs.
- Updated gallery to load image data in a per-image basis via edit form
  for more resiliant thumb/data fetching. Data was previously provided
  via gallery listing, which could be affected by failing generation
  of other images.
- Updated image manager double click handling to be more pleasant and
  not flash away the edit form.
- Updated editor handlers to use main URL when thumbs fail to load.
2023-10-01 13:05:18 +01:00
Dan Brown 5af3041b9b
Thumbnails: Added OOM handling and regen endpoint
- Added some level of app out-of-memory handling so we can show a proper
  error message upon OOM events.
- Added endpoint and image-manager button/action for regenerating
  thumbnails for an image so they can be re-created upon failure.
2023-09-29 13:54:08 +01:00
Dan Brown d5a3bdb7aa
Header: Simplified, split and re-orgranised view file(s)
- Moved "common" template partials, that are only used in layouts, to
  layouts/parts folder.
- Simplified HTML structure of header template.
- Extracted logo and links from header template to simplify.
- Added header-links-start template for easier extension/customization
  without needing to override full list of links.
  - Added test to cover usage of this.

For #4564
2023-09-24 10:29:51 +01:00
Dan Brown c3b4128a38
Homepage: Added tags button to non-default home views
For #4558
2023-09-24 09:31:44 +01:00
JonatanRek 57791c1466 Fix Reloading changes on dark mode switch 2023-09-22 11:31:24 +02:00