mirror of
https://github.com/unraid/api.git
synced 2026-01-06 00:30:22 -06:00
feat: move to iframe for changelog (#1388)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Changelog modal now displays changelog documentation within an embedded iframe if a URL is available, allowing navigation within the iframe and providing a "Back to Changelog" button to return to the original view. - "View on Docs" button dynamically updates to reflect the current page within the iframe. - Added support for displaying a formatted changelog string and testing modal behavior with or without this content. - Introduced a new component to fetch, parse, and render changelogs from URLs with enhanced markdown handling. - Update OS store extended to manage changelog display and release stability, consolidating changelog state and actions. - **Bug Fixes** - Close button in modal dialogs is now visible on all screen sizes. - **Chores** - Updated the default server state, which may affect registration device counts and types. - Added new localization string for changelog titles with version placeholders. - Removed deprecated changelog store and related tests, simplifying state management. - Refined backup and restoration scripts for unraid-components directory to use move operations with improved logging. - Improved modal visibility state handling by consolidating changelog modal controls into the main update OS store. - Added URL origin and pattern checks for changelog iframe navigation security. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -134,8 +134,8 @@ done
|
||||
# Handle the unraid-components directory
|
||||
DIR=/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components
|
||||
if [ -d "$DIR" ] && [ ! -d "$DIR-" ]; then
|
||||
cp -rp "$DIR" "$DIR-"
|
||||
echo "Backed up directory: $DIR"
|
||||
mv "$DIR" "$DIR-"
|
||||
echo "Moved directory: $DIR to $DIR-"
|
||||
fi
|
||||
|
||||
echo "Backup complete."
|
||||
@@ -204,12 +204,13 @@ exit 0
|
||||
|
||||
# Handle the unraid-components directory
|
||||
DIR=/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components
|
||||
# certain instances where the directory is not present and others where it is, ensure we delete it before we restore it
|
||||
# Remove the archive's contents before restoring
|
||||
if [ -d "$DIR" ]; then
|
||||
rm -rf "$DIR"
|
||||
fi
|
||||
if [ -d "$DIR-" ]; then
|
||||
mv -f "$DIR-" "$DIR"
|
||||
mv "$DIR-" "$DIR"
|
||||
echo "Restored directory: $DIR- to $DIR"
|
||||
fi
|
||||
]]>
|
||||
</INLINE>
|
||||
|
||||
Reference in New Issue
Block a user