Refactor Renderer Code (#987)

* Initial refactor

* Remove unused imports

* Update code

* Refactor and Update Code

- Change file names to kebab-caase
- Add new useTranslation Hook
- Change useLog hook name to useLogger
- Update translation hook to provide autocomplete

* Update import and component name

* Rename files and components

* Update locales

* Update electron commands

* Update var

* Change Lowercase

* Replace filter with map

* Add props

* Update flag check

* Add validate paths

* Update formats

* Update import

* Update function

* Update function and translation

* Update handlePaste
This commit is contained in:
NayamAmarshe
2024-10-04 14:45:54 +05:30
committed by GitHub
parent bf62c684c2
commit 95843ded88
72 changed files with 1415 additions and 1283 deletions

View File

@@ -1,4 +1,4 @@
const COMMAND = {
const ELECTRON_COMMANDS = {
SELECT_FILE: "Select a File",
SELECT_FOLDER: "Select a Folder",
UPSCAYL: "Upscale the Image",
@@ -25,6 +25,6 @@ const COMMAND = {
OS: "Get OS",
SCALING_AND_CONVERTING: "Adding some finishing touches",
UPSCAYL_ERROR: "Upscaling Error",
};
} as const;
export default COMMAND;
export { ELECTRON_COMMANDS };

View File

@@ -3,7 +3,7 @@ type FeatureFlags = {
SHOW_UPSCAYL_CLOUD_INFO: boolean;
};
export const featureFlags: FeatureFlags = {
export const FEATURE_FLAGS: FeatureFlags = {
APP_STORE_BUILD: false,
SHOW_UPSCAYL_CLOUD_INFO: false,
};