Fix browser instructions appearing on desktop
Previously, the app showed browser download/run instructions on the desktop version, which was irrelevant for desktop users. This change improves the user experience by displaying these instructions only in browser environments. This change streamlines the script saving process for desktop users while maintaining the necessary guidance for browser users. The commit: - Prevents the instruction modal from appearing on desktop - Renames components for clarity (e.g., 'RunInstructions' to 'BrowserRunInstructions') - Adds a check to ensure browser environment before showing instructions
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
@click="saveCode"
|
||||
/>
|
||||
<ModalDialog v-model="areInstructionsVisible">
|
||||
<RunInstructions :filename="filename" />
|
||||
<BrowserRunInstructions :filename="filename" />
|
||||
</ModalDialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -23,12 +23,12 @@ import { ScriptFilename } from '@/application/CodeRunner/ScriptFilename';
|
||||
import { FileType } from '@/presentation/common/Dialog';
|
||||
import IconButton from '../IconButton.vue';
|
||||
import { createScriptErrorDialog } from '../ScriptErrorDialog';
|
||||
import RunInstructions from './RunInstructions/RunInstructions.vue';
|
||||
import BrowserRunInstructions from './BrowserRunInstructions/BrowserRunInstructions.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
IconButton,
|
||||
RunInstructions,
|
||||
BrowserRunInstructions,
|
||||
ModalDialog,
|
||||
},
|
||||
setup() {
|
||||
@@ -55,7 +55,12 @@ export default defineComponent({
|
||||
}, scriptDiagnosticsCollector)));
|
||||
return;
|
||||
}
|
||||
areInstructionsVisible.value = true;
|
||||
if (!isRunningAsDesktopApplication) {
|
||||
areInstructionsVisible.value = true;
|
||||
}
|
||||
// On desktop, it would be better to to prompt the user with a system
|
||||
// dialog offering options after saving, such as:
|
||||
// • Open Containing Folder • "Open File" in default text editor • Close
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user