Skip to content

Add 'Save As' functionality#58

Merged
adeeteya merged 2 commits into
masterfrom
save_as
Apr 13, 2026
Merged

Add 'Save As' functionality#58
adeeteya merged 2 commits into
masterfrom
save_as

Conversation

@adeeteya

Copy link
Copy Markdown
Owner

This pull request adds a "Save As" feature to the application, allowing users to save the current file under a new name or location. It introduces a new menu item, updates the save logic to distinguish between saving an opened file and saving as a new file, and ensures the UI and localization support the new functionality.

Feature Addition: "Save As" Functionality

  • Added a new MenuItem.saveAs to the MenuItem enum and integrated it into the menu UI, allowing users to select "Save As" from the menu. [1] [2]
  • Implemented the _saveFileAs method, which prompts the user to choose a file name and location, and updates state accordingly.
  • Updated _saveFile to save directly if a file is already opened, or invoke "Save As" if not, providing user feedback on success or failure.
  • Modified the menu action handler to support the new "Save As" option.

State Management Improvements

  • Introduced _isOpenedFile to track whether the current file was opened from disk, and updated this state appropriately when opening, saving, or clearing files. [1] [2] [3] [4]

Localization

  • Added the "Save As" string and its description to the localization file for English (app_en.arb).

@adeeteya adeeteya self-assigned this Apr 13, 2026
@adeeteya
adeeteya merged commit 265f3dc into master Apr 13, 2026
1 check passed
@adeeteya
adeeteya deleted the save_as branch April 13, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant