-
-
Notifications
You must be signed in to change notification settings - Fork 611
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement novel Preferences UI (#4805)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: தமிழ்நேரம் <67970539+TamilNeram@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kirthihan Yasotharan <kirthihan.y@gmail.com> Co-authored-by: pseandersson <5318749+pseandersson@users.noreply.github.com> Co-authored-by: Joop Kiefte <ikojba@gmail.com>
- Loading branch information
1 parent
83b2e2d
commit 3ecba46
Showing
64 changed files
with
2,454 additions
and
1,582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* @ignore | ||
* BEGIN HEADER | ||
* | ||
* Contains: OpenAuxWindow command | ||
* CVM-Role: <none> | ||
* Maintainer: Hendrik Erz | ||
* License: GNU GPL v3 | ||
* | ||
* Description: This command can be used to open an auxiliary window (e.g., | ||
* the assets manager) programmatically. | ||
* | ||
* END HEADER | ||
*/ | ||
|
||
import ZettlrCommand from './zettlr-command' | ||
|
||
export enum ProgrammaticallyOpenableWindows { | ||
AssetsWindow = 'assets-window' | ||
} | ||
|
||
export default class OpenAuxWindow extends ZettlrCommand { | ||
constructor (app: any) { | ||
super(app, 'open-aux-window') | ||
} | ||
|
||
/** | ||
* Search a file and return the results to the renderer. | ||
* @param {String} evt The event name | ||
* @param {Object} arg An object containing a hash of a file to be searched | ||
* @return {Boolean} Whether the call succeeded. | ||
*/ | ||
async run (evt: string, arg: { window: ProgrammaticallyOpenableWindows, hash?: string }): Promise<boolean> { | ||
switch (arg.window) { | ||
case ProgrammaticallyOpenableWindows.AssetsWindow: | ||
this._app.windows.showDefaultsWindow(arg.hash) | ||
return true | ||
default: | ||
this._app.log.error(`Cannot programmatically open window ${arg.window as string}: Not available for opening`) | ||
return false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.