From 5db8c6b59144af91e72333be461039e066f9b2ae Mon Sep 17 00:00:00 2001
From: undergroundwires
Date: Thu, 17 Oct 2024 14:42:15 +0200
Subject: [PATCH] Fix HTML semantics in script run instructions
This commit corrects HTML semantic errors in browser instruction dialogs
displayed when a script is downloaded via browser.
Key changes:
- Fix HTML structure by removing `` and `` tags from ``
elements
- Replace `` with `` for keyboard inputs
Other supporting changes:
- Improve clarity readability of some instructions
- Add CSS styles for ``
---
.../assets/styles/base/_index.scss | 14 ++++
.../BrowserRunInstructions.vue | 2 +-
.../Steps/Platforms/LinuxInstructions.vue | 76 ++++++++++---------
.../Steps/Platforms/MacOsInstructions.vue | 46 ++++++++---
.../Steps/Platforms/WindowsInstructions.vue | 17 +++--
5 files changed, 99 insertions(+), 56 deletions(-)
diff --git a/src/presentation/assets/styles/base/_index.scss b/src/presentation/assets/styles/base/_index.scss
index 081a99b63..11313fe28 100644
--- a/src/presentation/assets/styles/base/_index.scss
+++ b/src/presentation/assets/styles/base/_index.scss
@@ -53,3 +53,17 @@ sup {
vertical-align: super;
font-size: $font-size-relative-smallest;
}
+
+kbd {
+ font-family: unset; // Reset the default browser styles
+ background-color: $color-primary-dark;
+ border: 1px solid $color-primary-darker;
+ border-radius: 0.2em;
+ box-shadow: inset 0 1px 0 0 $color-primary-dark, inset 0 -2px 0 0 $color-primary-darker;
+ font-family: $font-family-monospace;
+ font-size: $font-size-relative-smallest;
+ padding: $spacing-relative-x-small $spacing-relative-x-small;
+ text-align: center;
+ user-select: none;
+ white-space: nowrap;
+}
diff --git a/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/BrowserRunInstructions.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/BrowserRunInstructions.vue
index b6d025a18..1bf8bb819 100644
--- a/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/BrowserRunInstructions.vue
+++ b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/BrowserRunInstructions.vue
@@ -6,7 +6,7 @@
1. The Easy Alternative
- Run your script without any manual steps by
+ Run your script securely without any manual steps by
downloading desktop version of {{ appName }} on the
{{ osName }} system you wish to configure, and then click on the Run button. This is
recommended for most users.
diff --git a/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/LinuxInstructions.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/LinuxInstructions.vue
index 8523a2ad9..ef19d0ea6 100644
--- a/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/LinuxInstructions.vue
+++ b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/LinuxInstructions.vue
@@ -16,29 +16,29 @@
Open terminal.
- Opening terminal changes based on the distro you run.
+ Opening terminal changes based on the distribution you run.
You may search for "Terminal" in your application launcher to find it.
- Alternatively use terminal shortcut for your distro if it has one by default:
-
- -
-
Ctrl-Alt-T
:
- Ubuntu, CentOS, Linux Mint, Elementary OS, ubermix, Kali…
-
- -
-
Super-T
: Pop!_OS…
-
- -
-
Alt-T
: Parrot OS…
-
- -
-
Ctrl-Alt-Insert
: Bodhi Linux…
-
-
+ Alternatively use terminal shortcut for your distribution if it has one by default:
+
+ -
+ Ctrl + Alt + T:
+ Ubuntu, CentOS, Linux Mint, Elementary OS, ubermix, Kali…
+
+ -
+ Super + T: Pop!_OS…
+
+ -
+ Alt + T: Parrot OS…
+
+ -
+ Ctrl + Alt + Insert: Bodhi Linux…
+
+
@@ -50,19 +50,22 @@
cd ~/Downloads
- Press on enter/return
key after running the command.
+ Press on Enter or Return key after running the command.
- If the file is not downloaded on Downloads folder,
- change Downloads
to path where the file is downloaded.
+ If you didn't save the file in your Downloads folder:
+
+ - Locate where you saved the file.
+ - In the command, replace
Downloads
with the correct folder path.
+
This command means:
-
- cd
will change the current folder.
- ~
is the user home directory.
-
+
+ cd
will change the current folder.
+ ~
is the user home directory.
+
@@ -76,21 +79,23 @@
chmod +x {{ filename }}
- Press on enter/return
key after running the command.
+ Press on Enter or Return key after running the command.
It will make the file executable.
- If you use desktop environment you can alternatively (instead of running the command):
-
- - Locate the file using your file manager.
- - Right click on the file, select "Properties".
- - Go to "Permissions" and check "Allow executing file as program".
-
+ Alternatively, if you're using a graphical desktop environment, you can do this
+ without the command line:
+
+ - Locate the file using your file manager.
+ - Right click on the file, select Properties.
+ - Go to Permissions.
+ - Check Allow executing file as program.
+
- These GUI steps and name of options may change depending on your file manager.'
+ These GUI steps and name of options may change depending on your file manager.
@@ -110,7 +115,8 @@
- Locate the file using your file manager.
- - Right click on the file, select "Run as program".
+ - Right click on the file.
+ - Select Run as program or similar option.
@@ -124,10 +130,10 @@
registered, so keep typing.
- Press on enter/return
key after typing your password.
+ Press the Enter or Return key after typing your password.
- Administrator privileges are required to configure OS.
+ Administrator privileges are required for configurations.
diff --git a/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/MacOsInstructions.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/MacOsInstructions.vue
index 16f23098d..cda2d77fb 100644
--- a/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/MacOsInstructions.vue
+++ b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/MacOsInstructions.vue
@@ -13,9 +13,28 @@
- Open terminal.
+ Open your terminal.
- Type Terminal into Spotlight or open it from the Applications -> Utilities folder.
+ There are two easy ways to open the default terminal on your Mac:
+
+ -
+ Using macOS search (Spotlight):
+
+ - Press Cmd + Space to open Spotlight.
+ -
+ Type Terminal and press Enter or Return.
+
+
+
+ -
+ Using Finder:
+
+ - Open Finder.
+ - Go to Applications → Utilities.
+ - Double-click on Terminal.
+
+
+
@@ -27,19 +46,22 @@
cd ~/Downloads
- Press on enter/return
key after running the command.
+ Press on Enter or Return key after running the command.
- If the file is not downloaded on Downloads folder,
- change Downloads
to path where the file is downloaded.
+ If you didn't save the file in your Downloads folder:
+
+ - Locate where you saved the file.
+ - In the command, replace
Downloads
with the correct folder path.
+
This command means:
-
- cd
will change the current folder.
- ~
is the user home directory.
-
+
+ cd
will change the current folder.
+ ~
is the user home directory.
+
@@ -53,7 +75,7 @@
chmod +x {{ filename }}
- Press on enter/return
key after running the command.
+ Press on Enter or Return key after running the command.
It will make the file executable.
@@ -83,10 +105,10 @@
still registered, so keep typing.
- Press on enter/return
key after typing your password.
+ Press the Enter or Return key after typing your password.
- Administrator privileges are required to configure OS.
+ Administrator privileges are required for configurations.
diff --git a/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/WindowsInstructions.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/WindowsInstructions.vue
index 037dd1061..e772ca89f 100644
--- a/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/WindowsInstructions.vue
+++ b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/WindowsInstructions.vue
@@ -36,7 +36,7 @@
- If your antivirus (e.g., Defender) alerts you, address the warning.
+ If your antivirus (e.g., Defender) alerts you, address the warning.