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

Generate tutorial addons #3638

Merged
merged 20 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 2 additions & 6 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,9 @@ jobs:
export PATH=/opt/$QTVERSION/gcc_64/bin:$PATH
python scripts/ci/check_qrc.py

- name: Check for guide JSON syntax
- name: Check for addons JSON syntax
run: |
python scripts/ci/check_jsonschema.py guide.json src/ui/guides

- name: Check for tutorial JSON syntax
run: |
python scripts/ci/check_jsonschema.py tutorial.json src/ui/tutorials
python scripts/ci/check_jsonschema.py addon.json addons/*/manifest.json

- name: Check for issues with clang-format
uses: DoozyX/[email protected]
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/translations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ jobs:
./scripts/utils/generate_ts.sh

- name: Uploading
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: Translation file
path: translations.ts
name: Translation files
path: |
translations.ts
addon_ts/*.ts
41 changes: 40 additions & 1 deletion .github/workflows/wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,48 @@ jobs:
name: Inspector Build
path: tools/inspector/dist

addons:
runs-on: ubuntu-20.04
env:
QTVERSION: 6.2.4

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1

- name: Install Qt
shell: bash
run: |
python3 -m pip install aqtinstall
python3 -m aqt install-qt -O /opt linux desktop $QTVERSION

- name: Install python dependencies
shell: bash
run: |
pip3 install -r requirements.txt

- name: Generating addons
shell: bash
run: |
export PATH=/opt/$QTVERSION/gcc_64/bin:$PATH
python3 scripts/addon/generate_all.py

- name: Uploading
uses: actions/upload-artifact@v1
with:
name: Inspector Build
path: addons/generated/addons

ghPages:
runs-on: ubuntu-20.04
needs: [wasmQt6, inspector]
needs: [wasmQt6, inspector, addons]
name: Publish Wasm on Github Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ linux/netfilter/vendor/
__pycache__
lottie.mjs

# Translation pipeline
addon_ts/

# CMake build artifacts
cmake_install.cmake
CMakeCache.txt
Expand All @@ -47,7 +50,7 @@ src/mozillavpn_autogen/
node_modules

#Github Codespaces
.venv
.venv

asset_catalog_compiler.Info.plist

Expand All @@ -60,7 +63,7 @@ android/local.properties
android/**/*.cxx
android/.cxx/*
!android/res/debug/**/*
!android/*/**/Makefile
!android/*/**/Makefile
xcode.xconfig
.gradle/
.gradle_cache/
Expand Down Expand Up @@ -130,7 +133,7 @@ windows/split-tunnel/*.sys
windows/split-tunnel/*.dll
windows/split-tunnel/.status

#Rust
# Rust
.cargo_home/


Expand Down Expand Up @@ -164,6 +167,9 @@ translations/*/locversion.plist
translations/generated/
macos/pkg/Resources/*.lproj

# Addons
addons/generated/

# Adjust SDK Files
android/src/com/adjust

Expand Down
File renamed without changes
50 changes: 50 additions & 0 deletions addons/guide_01_how_to_vpn/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"api_version": "0.1",
"id": "guide_01_how_to_vpn",
"name": "Guide: how to vpn",
"type": "guide",
"guide": {
"id": "how_to_vpn",
"title": "The top uses and benefits of using Mozilla VPN",
"subtitle": "Mozilla VPN secures the connection between your device and the web. Here’s some of the most useful features your VPN offers:",
"image": "qrc:/addons/guide_01_how_to_vpn/image.svg",
"blocks": [
{ "id": "c_1",
"type": "title",
"content": "Safeguard your personal data and identity" },
{ "id": "c_2",
"type": "ulist",
"content": [
{ "id": "l_1",
"content": "Surf the web and use your favorite apps freely without being tracked" },
{ "id": "l_2",
"content": "Keep confidential materials safe via our premium data encryption" }
]
},
{ "id": "c_3",
"type": "title",
"content": "Defense on the go" },
{ "id": "c_4",
"type": "ulist",
"content": [
{ "id": "l_1",
"content": "Blocks unknown entities from seeing your private data on risky public Wi-Fi and hotspots" },
{ "id": "l_2",
"content": "Protection wherever you are, from restaurants to vacation rentals" }
]
},
{ "id": "c_5",
"type": "title",
"content": "Connect to 30+ countries" },
{ "id": "c_6",
"type": "ulist",
"content": [
{ "id": "l_1",
"content": "Browse and access content from all over the world" },
{ "id": "l_2",
"content": "Shop on a regional server to get localized deals like cheaper airfare" }
]
}
]
}
}
37 changes: 37 additions & 0 deletions addons/guide_02_is_my_vpn_working_correctly/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"api_version": "0.1",
"id": "guide_02_is_my_vpn_working_correctly",
"name": "Guide: is my VPN working correctly",
"type": "guide",
"guide": {
"id": "is_my_vpn_working_correctly",
"title": "Is my VPN connected to the right server location?",
"subtitle": "Test your geolocation on one of our 400+ worldwide servers in two super simple ways:",
"image": "qrc:/addons/guide_02_is_my_vpn_working_correctly/image.svg",
"blocks": [
{ "id": "c_1",
"type": "title",
"content": "Search in your browser" },
{ "id": "c_2",
"type": "text",
"content": "Enter a search term like “local weather” in your browser and see a real-time weather update for your current VPN location." },
{ "id": "c_3",
"type": "title",
"content": "Sign in to your favorite app or streaming site" },
{ "id": "c_4",
"type": "text",
"content": "Traveling abroad and need to access content from back home?" },
{ "id": "c_5",
"type": "olist",
"content": [
{
"id": "l_1",
"content": "Connect to the country server of your choice" },
{
"id": "l_2",
"content": "Sign on to your favorite app or streaming site" }
]
}
]
}
}
43 changes: 43 additions & 0 deletions addons/guide_03_adding_and_removing_devices/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"api_version": "0.1",
"id": "guide_03_adding_and_removing_devices",
"name": "Guide: adding and removing devices",
"type": "guide",
"guide": {
"id": "adding_and_removing_devices",
"title": "How do I add and remove devices?",
"subtitle": "Follow this quick and simple 3 step guide to add and remove all of your devices easily.",
"image": "image.svg",
"image": "qrc:/addons/guide_03_adding_and_removing_devices/image.svg",
"blocks": [
{ "id": "c_1",
"type": "title",
"content": "How to add a device" },
{ "id": "c_2",
"type": "olist",
"content": [
{ "id": "l_1",
"content": "Open the Mozilla VPN app on your preferred device" },
{ "id": "l_2",
"content": "Sign in to your account" },
{ "id": "l_3",
"content": "Voila! Your device has been automatically added to your VPN list of connected devices" }
]
},
{ "id": "c_3",
"type": "title",
"content": "How to remove a device" },
{ "id": "c_4",
"type": "olist",
"content": [
{ "id": "l_1",
"content": "Open Mozilla VPN in your chosen desktop or mobile device" },
{ "id": "l_2",
"content": "Tap on “My Devices” in your VPN homescreen" },
{ "id": "l_3",
"content": "Select the “Trash” icon next to the device you want to remove from your list of connected devices" }
]
}
]
}
}
43 changes: 43 additions & 0 deletions addons/guide_04_connecting_external_devices/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"api_version": "0.1",
"id": "guide_04_connecting_external_devices",
"name": "Guide: connecting external devices",
"type": "guide",
"guide": {
"id": "connecting_external_devices",
"title": "Connecting to other devices while using VPN",
"subtitle": "Enabling local network access allows you to connect to other devices without sacrificing your VPN protection.",
"image": "qrc:/addons/guide_04_connecting_external_devices/image.svg",
"blocks": [
{ "id": "c_1",
"type": "title",
"content": "How do I connect to my printer or fax?" },
{ "id": "c_2",
"type": "olist",
"content": [
{ "id": "l_1",
"content": "Enable “Local network access” in your network settings" },
{ "id": "l_2",
"content": "Connect the printer or fax cable to your device’s port (wired) or via wireless" },
{ "id": "l_3",
"content": "Print or fax your documents as normal Desktop computers / laptops / mobile phones" }
]
},
{ "id": "c_3",
"type": "title",
"content": "What other types of devices can I connect to?" },
{ "id": "c_4",
"type": "text",
"content": "With “Local network access” turned on, you can also connect to devices like:" },
{ "id": "c_5",
"type": "ulist",
"content": [
{ "id": "l_1",
"content": "Other computers and mobile phones" },
{ "id": "l_2",
"content": "Streaming sticks (Chromecast / Roku / Apple AirPlay)" }
]
}
]
}
}
2 changes: 1 addition & 1 deletion addons/language/language.qrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/language">
<qresource prefix="/">
<file>manifest.json</file>
<file>i18n/locale_en.qm</file>
</qresource>
Expand Down
5 changes: 3 additions & 2 deletions addons/language/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"version": "0.1",
"name": "Tic-Tac-Toe",
"id": "language-addon",
"api_version": "0.1",
"name": "language package",
"type": "i18n"
}
3 changes: 2 additions & 1 deletion addons/tic-tac-toe/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"version": "0.1",
"id": "tic-tac-toe",
"api_version": "0.1",
"name": "Tic-Tac-Toe",
"qml": "tic-tac-toe.qml",
"type": "demo"
Expand Down
2 changes: 1 addition & 1 deletion addons/tic-tac-toe/tic-tac-toe.qrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/tic-tac-toe">
<qresource prefix="/">
<file>manifest.json</file>
<file>script.mjs</file>
<file>tic-tac-toe.qml</file>
Expand Down
Loading