Adding the choose network option
This commit is contained in:
		@@ -35,6 +35,10 @@
 | 
			
		||||
                    <input type="checkbox" @change="switch_config('frontend', 'virtual_keyboard')" v-model="config.frontend.virtual_keyboard">
 | 
			
		||||
                    <i class="form-icon"></i> Use virtual keyboard (for touch screen)
 | 
			
		||||
                </label>
 | 
			
		||||
                <label class="form-switch">
 | 
			
		||||
                    <input type="checkbox" @change="switch_config('frontend', 'choose_net')" v-model="config.frontend.choose_net">
 | 
			
		||||
                    <i class="form-icon"></i> Allow the end-user to choose the network even if connected.
 | 
			
		||||
                </label>
 | 
			
		||||
                <label class="form-switch">
 | 
			
		||||
                    <input type="checkbox" @change="switch_config('frontend', 'reboot_option')" v-model="config.frontend.reboot_option">
 | 
			
		||||
                    <i class="form-icon"></i> Allow the end-user to reboot the device from the interface.
 | 
			
		||||
 
 | 
			
		||||
@@ -24,6 +24,8 @@ export default {
 | 
			
		||||
            var internet = this.internet
 | 
			
		||||
            if (window.config.iface_out.charAt(0) == 'e'){
 | 
			
		||||
                router.push({ name: 'generate-ap' });
 | 
			
		||||
            } else if (!window.config.choose_net && this.internet){
 | 
			
		||||
                router.push({ name: 'generate-ap' });
 | 
			
		||||
            } else {
 | 
			
		||||
                router.push({ name: 'wifi-select', 
 | 
			
		||||
                              params: { saved_ssid: saved_ssid, 
 | 
			
		||||
 
 | 
			
		||||
@@ -51,6 +51,7 @@ frontend:
 | 
			
		||||
  virtual_keyboard: true
 | 
			
		||||
  user_lang: userlang
 | 
			
		||||
  update: updateoption
 | 
			
		||||
  choose_net: false
 | 
			
		||||
  
 | 
			
		||||
# NETWORK -
 | 
			
		||||
# Some elements related to the network configuration, such as
 | 
			
		||||
 
 | 
			
		||||
@@ -72,5 +72,6 @@ def get_config():
 | 
			
		||||
        "shutdown_option": read_config(("frontend", "shutdown_option")),
 | 
			
		||||
        "reboot_option": read_config(("frontend", "reboot_option")),
 | 
			
		||||
        "iface_out": read_config(("network", "out")),
 | 
			
		||||
        "user_lang": read_config(("frontend", "user_lang"))
 | 
			
		||||
        "user_lang": read_config(("frontend", "user_lang")),
 | 
			
		||||
        "choose_net": read_config(("frontend", "choose_net"))
 | 
			
		||||
    })
 | 
			
		||||
 
 | 
			
		||||
@@ -45,8 +45,8 @@ elif [ $PWD = "/tmp/tinycheck" ]; then
 | 
			
		||||
        sed -i 's/frontend:/frontend:\n  reboot_option: true/g' /usr/share/tinycheck/config.yaml
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if ! grep -q user_lang /usr/share/tinycheck/config.yaml; then
 | 
			
		||||
        sed -i 's/frontend:/frontend:\n  user_lang: en/g' /usr/share/tinycheck/config.yaml
 | 
			
		||||
    if ! grep -q choose_net /usr/share/tinycheck/config.yaml; then
 | 
			
		||||
        sed -i 's/frontend:/frontend:\n  choose_net: false/g' /usr/share/tinycheck/config.yaml
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if ! grep -q shutdown_option /usr/share/tinycheck/config.yaml; then
 | 
			
		||||
@@ -65,6 +65,10 @@ elif [ $PWD = "/tmp/tinycheck" ]; then
 | 
			
		||||
        sed -i 's/frontend:/frontend:\n  update: true/g' /usr/share/tinycheck/config.yaml
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if ! grep -q user_lang /usr/share/tinycheck/config.yaml; then
 | 
			
		||||
        sed -i 's/frontend:/frontend:\n  user_lang: en/g' /usr/share/tinycheck/config.yaml
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if ! grep -q "CN=R3,O=Let's Encrypt,C=US" /usr/share/tinycheck/config.yaml; then
 | 
			
		||||
        sed -i "s/free_issuers:/free_issuers:\n  - CN=R3,O=Let's Encrypt,C=US/g" /usr/share/tinycheck/config.yaml
 | 
			
		||||
    fi
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user