Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6a677f6 authored by Paula's avatar Paula
Browse files

add incompatible device error

parent 85a9b320
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@
  "connect-your-phone": "Connect your phone",
  "connect-your-phone-instructions": "Connect your phone to your computer with a USB cable. We will automatically detect your phone to install /e/OS.",
  "connect-your-phone-instructions-notes": "<b>Note</b>: ’USB debugging’ is required for automatic device detection to work. If you haven't enabled it yet, we will help you out in the next steps.",
  "connect-bootloader" : "Bootloader connection",
  "connect-bootloader-instructions-1" : "Your phone will now reboot in <b>bootloader</b> mode",
  "connect-bootloader-instructions-2" : "When your phone is on, connect your phone in <b>bootloader</b> mode by cliking on the button bellow",
  "device-detection": "Device detection",
  "device-detection-detected": "A device has been detected.",
  "device-detection-instructions-1": "We'll now connect your phone to the browser. When this pop-up appears, select your telephone from the list.",
@@ -22,6 +25,13 @@
  "dissatisfied": "Dissatisfied",
  "donate": "Donate",
  "enable-usb-file-transfer": "Enable USB file transfer",
  "unlocking-instructions-1": "Your phone is asking for an unlock. Select 'unlock bootloader' ",
  "unlocking-instructions-2": "If the device doesn’t automatically reboot, reboot it. It should now be unlocked.",
  "unlocking-instructions-3": "Since the device <b>resets completely</b>, you will need to <b>re-enable USB debugging</b>.",
  "unlocking-instructions-4": "Pass the setup and click on next",
  "locking-instructions-1": "Your phone is asking for an unlock. Select 'lock bootloader' ",
  "locking-instructions-2": "If the device doesn’t automatically reboot, reboot it",
  "ready-to-install-e-os": "You're now ready to install /e/OS.",
  "enable-usb-file-transfer-instructions-1": "Still inside the ‘Developer options’, scroll down to find ’Default USB configuration’ and top on it.",
  "enable-usb-file-transfer-instructions-2": "Now select the ’File Transfer’ option (on some devices it is called 'MTP mode (media transfer protocol)').",
  "erase-data-instructions-1": "1. Select Factory reset",
@@ -34,6 +44,9 @@
  "go-to-apply-update-instructions-1": "1. Select Apply Update",
  "go-to-apply-update-instructions-2": "2. Apply update from adb",
  "go-to-apply-update-instructions-3": "3. The device is now in sideload mode",
  "device-model-not-supported-title": "Your phone {{product-name}} is not compatible",
  "device-model-not-supported-instructions": "you can't install /e/ using this tool",
  "device-model-not-supported": "Device model not supported",
  "help": "Help",
  "help-us-improve-the-tool": "Help us improve the tool",
  "help-us-improve-the-tool-instructions-1": "Please, rate your experience with the Easy Installer.",
+42 −5
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ button {
    cursor: pointer;
    transition: background-color 0.25s ease-in-out;
}
button.success {
button.connect {
    background: var(--success-color);
    color: var(--button-text-color);
    border: none;
@@ -67,8 +67,6 @@ button:disabled {
    background: rgba(2, 127, 254, 0.6);
    cursor: auto;
}


html, body {
    margin: 0px;
    background: var(--background-color);
@@ -150,6 +148,12 @@ html, body {
    display: block;
}

.ready-to-install-e-os {
    color : var(--info-color);
    font-size: 28px;
    display: none;
}

.logo-ctn {
    max-width: 780px;
    margin:auto;
@@ -172,7 +176,7 @@ html, body {
    font-family: 'Century Gothic';
    font-weight: 600;
}
.card-body {
.card-body, .large-padding {
    padding-top: 32px;
    padding-bottom: 32px;
}
@@ -184,14 +188,47 @@ html, body {
    font-weight: 600;
    padding-bottom: 8px;
}
.instruction-img {
.instruction-img, .normal-padding {
    margin-bottom : 20px;
    margin-top : 20px;
}
.connect-your-phone .instruction-img{
    max-width: 500px;
}
.enable-usb-file-transfer .instruction-img {
    max-width: 225px;
}
.device-detection .instruction-img {
    max-width: 300px;
}
.activate-developer-options .instruction-img,
.activate-usb-debugging .instruction-img {
    max-width: 350px;
}
.icon {
    width: 42px;
    height: 42px;
}
progress {
    height: 3px;
    width: 50%;
    min-width: 300px;
}
progress[value] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
}
progress[value]::-webkit-progress-bar {
    background-color: #d0d0d0;
}
progress[value]::-webkit-progress-value {
    background-color: var(--downloading-color);
}
progress[value].success::-webkit-progress-value {
    background-color: var(--green);
}
/* </CARD> */

/* <let-s-get-started> */
+40 −26
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@
        </div>
    </div>

    <div id="connect-your-phone" class="card inactive">
    <div id="connect-your-phone" class="connect-your-phone card inactive">
        <div class="card-header" data-translate="connect-your-phone"></div>
        <div class="card-body">
            <p data-translate="connect-your-phone-instructions"></p>
@@ -131,7 +131,7 @@
        </div>
    </div>

    <div id="activate-developer-options" class="card inactive">
    <div id="activate-developer-options" class="activate-developer-options card inactive">
        <div class="card-header" data-translate="activate-developer-options"></div>
        <div class="card-body">
            <p data-translate="activate-developer-options-instructions-1"></p>
@@ -147,7 +147,7 @@
            <button data-translate="next" class="next" onclick="VIEW.executeStep(this, 'activate-developer-options')"></button>
        </div>
    </div>
    <div id="activate-usb-debugging" class="card inactive">
    <div id="activate-usb-debugging" class="activate-usb-debugging card inactive">
        <div class="card-header" data-translate="activate-usb-debugging"></div>
        <div class="card-body">
            <p data-translate="activate-usb-debugging-instructions-1"></p>
@@ -163,7 +163,7 @@
            <button data-translate="next" class="next" onclick="VIEW.executeStep(this, 'activate-usb-debugging')"></button>
        </div>
    </div>
    <div id="enable-usb-file-transfer" class="card inactive">
    <div id="enable-usb-file-transfer" class="enable-usb-file-transfer card inactive">
        <div class="card-header" data-translate="enable-usb-file-transfer"></div>
        <div class="card-body">
            <p data-translate="enable-usb-file-transfer-instructions-1"></p>
@@ -189,7 +189,7 @@
            </div>
            <p data-translate="device-detection-instructions-2"></p>
            <div class="text-center">
                <button data-translate="connect" class="success" onclick="VIEW.executeStep(this, 'device-detection')"></button>
                <button data-translate="connect" class="connect" onclick="VIEW.executeStep(this, 'device-detection')"></button>
            </div>
            <p data-translate="device-detection-instructions-3"></p>
            <div class="text-center">
@@ -202,48 +202,59 @@
        </div>
    </div>

    <div id="device-model-not-supported" class="device-model-not-supported card inactive">
        <div class="card-header" data-translate="device-model-not-supported"></div>
        <div class="card-body  text-center">
            <img class="error-img" src="assets/images/icons/error.svg">
            <p class="instruction-title" data-subscribe="product-name" data-translate="device-model-not-supported-title"></p>
            <p data-translate="device-model-not-supported-instructions"></p>
        </div>
    </div>

    <div id="downloading" class="card inactive">
        <div class="card-header" data-translate="Downloading /e/OS"></div>
        <div class="card-body">
            <p data-translate="this-might-take-some-time-please-be-patient"></p>
            <progress id="downloading-progress-bar" max="100" value="0"></progress>
            <div class="text-center large-padding">
                <p class="downloading-progress"></p>
                <progress class="downloading-progress-bar" max="100"></progress>
                <p class="ready-to-install-e-os"  data-translate="ready-to-install-e-os" ></p>
            </div>
            <div class="loader"></div>
            <div class="downloader"></div>
        </div>
    </div>

    <div id="connect-bootloader" class="card inactive">
        <div class="card-header" data-translate="connect-bootloader"></div>
        <div class="card-body">
            <p data-translate="connect-bootloader-instruction"></p>
            <button data-translate="connect" class="success" onclick="VIEW.executeStep(this, 'connect-bootloader')"></button>
            <p data-translate="connect-bootloader-instructions-1"></p>
            <p data-translate="connect-bootloader-instructions-2"></p>
            <div class="text-center">
                <button data-translate="connect" class="connect" onclick="VIEW.executeStep(this, 'connect-bootloader')"></button>
            </div>
        </div>
    </div>
    <div id="unlocking" class="card inactive">
        <div class="card-header" data-translate="Unlocking"></div>
        <p data-translate="unlocking-instructions-1"></p>
        <p data-translate="unlocking-instructions-2"></p>
        <p data-translate="unlocking-instructions-3"></p>
        <p data-translate="unlocking-instructions-4"></p>
        <div class="card-body">
            <button data-translate="next" class="next" onclick="VIEW.executeStep(this, 'unlocking')"></button>
        </div>
        <div class="card-footer">
            <button data-translate="next" class="next" onclick="VIEW.onNext(this)"></button>
        </div>
    </div>
    <div id="reboot-manually-to-bootloader" class="card inactive">
        <div class="card-header" data-translate="repeat-the-following-step"></div>
        <div class="card-body">
            <ul>
                <li data-translate="turn-off-your-phone"></li>
                <li data-translate="access-download-mode"></li>
            </ul>
        </div>
        <div class="card-footer">
            <button data-translate="next" class="next" onclick="VIEW.executeStep(this, 'reboot-manually-to-bootloader')"></button>
            <button data-translate="next" class="next" onclick="VIEW.executeStep(this, 'unlocking')"></button>
        </div>
    </div>
    <div id="flashing" class="card inactive">
        <div class="card-header" data-translate="installing"></div>
        <div class="card-body">
            <p data-translate="this-might-take-some-time-please-be-patient"></p>
            <progress id="installing-progress-bar" max="100" value="0"></progress>
            <div class="text-center large-padding">
                <p class="installing-progress"></p>
                <progress class="installing-progress-bar" max="100"></progress>
            </div>
        </div>
    </div>
    <div id="erase-data-recovery" class="card inactive">
@@ -283,8 +294,8 @@
    <div id="locking" class="card inactive">
        <div class="card-header" data-translate="locking"></div>
        <div class="card-body">
            click to lock
            <button data-translate="next" class="locking" onclick="VIEW.executeStep(this, 'locking')"></button>
            <p data-translate="locking-instructions-1"></p>
            <p data-translate="locking-instructions-2"></p>
        </div>
        <div class="card-footer">
            <button data-translate="next" class="next" onclick="VIEW.onNext(this)"></button>
@@ -293,7 +304,9 @@
    <div id="murena-cloud-account" class="card inactive">
        <div class="card-header" data-translate="murena-cloud-account"></div>
        <div class="card-body">
            <div class="text-center">
                <img class="instruction-img" src="assets/images/illustrations/murena-cloud-account.png">
            </div>
            <p data-translate="murena-cloud-account-instructions"></p>
        </div>
        <div class="card-footer">
@@ -310,6 +323,7 @@
            <p class="info" data-translate="installation-complete-instructions-2"></p>
        </div>
        <div class="card-footer">
            <button data-translate="skip" class="next" onclick="VIEW.onNext(this)"></button>
        </div>
    </div>
    <div id="help-us-improve-the-tool" class="help-us-improve-the-tool card inactive">
+5 −4
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ export class Controller {
                    }, (loaded, total, name) => {
                        VIEW.onUnzip(name, loaded, total);
                    });
                    VIEW.onDownloadingEnd();
                    return true;
                } catch (e) {
                    console.error(e)
@@ -142,7 +143,6 @@ export class Controller {
                    VIEW.onInstalling(cmd.file, done, total);
                });
            case Command.CMD_TYPE.unlock:
                console.log('UNLOCK')
                //check if unlocked to avoid unnecessary command
                let isUnlocked = false;
                if (cmd.partition) {
@@ -225,13 +225,11 @@ export class Controller {
            //already connected
            //we check on serialNumber because productName may not be the same between adb/fastboot driver
        } else {
            VIEW.updateData('product-name', productName);
            try {
                this.model = productName.toLowerCase().replace(/[ |_]/g, '');
                this.resources = await (await fetch(`resources/${this.model}.json`)).json() || {};
            } catch (e) {
                console.error(e);
                throw Error('model not supported');
                this.resources = {};
            }
            if (this.resources) {
                this.deviceManager.setResources(this.resources);
@@ -242,6 +240,9 @@ export class Controller {
                    }));
                    VIEW.updateTotalStep(this.steps.length);
                }
            } else {
                this.steps.push(new Step("device-model-not-supported"));
                VIEW.updateTotalStep(this.steps.length);
            }
        }
    }
+2 −20
Original line number Diff line number Diff line
@@ -171,25 +171,7 @@ export class DeviceManager {
        }
    }

    async downloadAll(files, onProgress, onUnzip) {
        let filesName = [];
        /*if (this.patch?.length) {
            for (var i = 0; i < this.patch.length; i++) {
                if (this.patch[i].file) {
                    filesName.push(this.patch[i].file);
                }
            }
        }
        if (this.rom?.file) {
            filesName.push(this.rom.file)
        }
        if (this.key?.length) {
            for (var i = 0; i < this.key.length; i++) {
                if (this.key[i].file) {
                    filesName.push(this.key[i].file);
                }
            }
        }*/
        return await this.downloader.downloadAndUnzipFolder(files, this.folder, onProgress, onUnzip);
    async downloadAll(filesName, onProgress, onUnzip) {
        return await this.downloader.downloadAndUnzipFolder(filesName, this.folder, onProgress, onUnzip);
    }
}
 No newline at end of file
Loading