Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Use Current File for preview (Togglable) #1006

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
803abe3
feat: Add setting for toggling use Current File For Preview
UnschooledGamer Aug 12, 2024
42939ae
Add build-Android for testing
UnschooledGamer Aug 12, 2024
8143304
Update build-android.yaml
UnschooledGamer Aug 12, 2024
d655f02
Update build-android.yaml
UnschooledGamer Aug 12, 2024
76cf901
Create sign.sh
UnschooledGamer Aug 12, 2024
6e1bfd6
Add files via upload
UnschooledGamer Aug 12, 2024
3c11ad9
Update sign.sh
UnschooledGamer Aug 12, 2024
dc29f1e
Update build-android.yaml
UnschooledGamer Aug 12, 2024
ebb8c5a
Update sign.sh
UnschooledGamer Aug 12, 2024
1c69534
Update build-android.yaml
UnschooledGamer Aug 12, 2024
9df5569
Update build-android.yaml
UnschooledGamer Aug 12, 2024
12e9d95
Update build-android.yaml
UnschooledGamer Aug 12, 2024
915b383
add: File Structure Logging (For Debugging)
UnschooledGamer Aug 12, 2024
1981e4d
update
UnschooledGamer Aug 12, 2024
b5ab4eb
Update sign.sh
UnschooledGamer Aug 12, 2024
f0102d8
fix: find cmd's expression/pattern matching
UnschooledGamer Aug 12, 2024
2182da6
Merge branch 'feat/useCurrentFileForPreview' of https://github.com/Un…
UnschooledGamer Aug 12, 2024
c5c07ad
fix: convert to apk step of sign.sh
UnschooledGamer Aug 12, 2024
4781331
fix: path of outputed apks
UnschooledGamer Aug 12, 2024
b5a87fd
fix: path of outputed apks
UnschooledGamer Aug 12, 2024
d005725
fix: setup.js script not creating build dirs for `www` dir
UnschooledGamer Aug 12, 2024
75eb36b
Merge branch 'feat/useCurrentFileForPreview' of https://github.com/Un…
UnschooledGamer Aug 12, 2024
a093f05
fix: run btn's single click not working after `useCurrentFileForPrev…
UnschooledGamer Aug 12, 2024
acb3580
add: rename util for testing
UnschooledGamer Aug 12, 2024
5acf13a
fix: quote error in build.sh
UnschooledGamer Aug 12, 2024
c9c33df
revert workflow & sign changes, Update the github actions version
UnschooledGamer Aug 12, 2024
be8360c
fix: `setup-node` github action version
UnschooledGamer Aug 12, 2024
85e3c78
update: build-android workflow artifacts naming
UnschooledGamer Aug 12, 2024
6a67f5f
fix: test previewSettings with boolean check
UnschooledGamer Aug 12, 2024
a7c7dd0
revert to paid build changes
UnschooledGamer Aug 12, 2024
c514245
update: [test/trying] keep the `key` and setting property same for pr…
UnschooledGamer Aug 12, 2024
fd4dbf4
add: apk files to git ignore list
UnschooledGamer Aug 12, 2024
3fa3418
feat: ability to `forceRun` for build-android workflow
UnschooledGamer Aug 12, 2024
7e37706
add: del-old-builds workflow
UnschooledGamer Aug 12, 2024
9fe14ac
clean personal console logs
UnschooledGamer Aug 12, 2024
0df91e6
Delete .github/workflows directory, Removed as (check description)
UnschooledGamer Aug 24, 2024
71c2514
Merge branch 'main' into feat/useCurrentFileForPreview
UnschooledGamer Aug 24, 2024
2943d9b
cleanup🧹: workflow related files
UnschooledGamer Aug 24, 2024
ca852dc
cleaned unwanted stuff
bajrangCoder Aug 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lang/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
"normal": "Normal",
"app settings": "App settings",
"disable in-app-browser caching": "Disable in-app-browser caching",
"Should use Current File For preview instead of default (index.html)": "Should use Current File For preview instead of default (index.html)",
"copied to clipboard": "Copied to clipboard",
"remember opened files": "Remember opened files",
"remember opened folders": "Remember opened folders",
Expand Down
3 changes: 2 additions & 1 deletion src/lib/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ export default {
"resize-editor"() {
editorManager.editor.resize(true);
},

run() {
editorManager.activeFile.run();
editorManager.activeFile[appSettings.value.useCurrentFileForPreview ? "runFile" : "run"]?.();
},
"run-file"() {
editorManager.activeFile.runFile?.();
Expand Down
1 change: 1 addition & 0 deletions src/lib/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class Settings {
showConsoleToggler: true,
previewMode: this.PREVIEW_MODE_INAPP,
disableCache: false,
useCurrentFileForPreview: false,
host: 'localhost',
search: this.#searchSettings,
lang: 'en-us',
Expand Down
6 changes: 6 additions & 0 deletions src/settings/previewSettings.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Checkbox from 'components/checkbox';
import settingsPage from 'components/settingsPage';
import appSettings from 'lib/settings';

Expand Down Expand Up @@ -61,6 +62,11 @@ export default function previewSettings() {
text: strings['disable in-app-browser caching'],
checkbox: values.disableCache,
},
{
key: 'useCurrentFileForPreview',
text: strings['Should use Current File For preview instead of default (index.html)'],
checkbox: !!values.useCurrentFileForPreview,
},
{
key: 'showConsoleToggler',
text: strings['show console toggler'],
Expand Down
4 changes: 2 additions & 2 deletions utils/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ $script2&&
echo \"${RED}$script3${NC}\";
$script3;
echo \"${RED}$script4${NC}\";
$script4
"
$script4;
"
7 changes: 7 additions & 0 deletions utils/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ try {
} catch (error) {
// ignore
}

try {
execSync('mkdir -p www/css/build www/js/build', { stdio: 'inherit' })
} catch (error) {
console.log("Failed to create www/css/build & www/js/build directories (You may Try after reading The Error)", error)
}

execSync('cordova plugin add cordova-plugin-buildinfo', { stdio: 'inherit' });
execSync('cordova plugin add cordova-plugin-device', { stdio: 'inherit' });
execSync('cordova plugin add cordova-plugin-file', { stdio: 'inherit' });
Expand Down