├── .gitignore ├── mix-manifest.json ├── www ├── img │ └── logo.png ├── js │ └── index.js ├── index.html └── css │ └── index.css ├── fonts └── vendor │ └── bootstrap-sass │ └── bootstrap │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── plugins ├── cordova-plugin-whitelist │ ├── NOTICE │ ├── package.json │ ├── CONTRIBUTING.md │ ├── plugin.xml │ ├── RELEASENOTES.md │ ├── doc │ │ ├── zh │ │ │ └── README.md │ │ ├── ko │ │ │ └── README.md │ │ ├── ja │ │ │ └── README.md │ │ ├── pl │ │ │ └── README.md │ │ ├── de │ │ │ └── README.md │ │ ├── it │ │ │ └── README.md │ │ ├── es │ │ │ └── README.md │ │ └── fr │ │ │ └── README.md │ ├── src │ │ └── android │ │ │ └── WhitelistPlugin.java │ ├── README.md │ └── LICENSE ├── fetch.json ├── android.json └── ios.json ├── resources ├── assets │ ├── sass │ │ ├── app.scss │ │ └── _variables.scss │ └── js │ │ ├── components │ │ ├── Example.vue │ │ ├── CreateTask.vue │ │ ├── Navigation.vue │ │ └── Todo.vue │ │ ├── bootstrap.js │ │ └── app.js ├── lang │ └── en │ │ ├── pagination.php │ │ ├── auth.php │ │ ├── passwords.php │ │ └── validation.php └── views │ └── welcome.blade.php ├── README.md ├── webpack.mix.js ├── config.xml ├── hooks └── README.md └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /platforms/* 3 | *.log 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/www/js/app.js": "/www/js/app.js", 3 | "/www/css/app.css": "/www/css/app.css" 4 | } -------------------------------------------------------------------------------- /www/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/www/img/logo.png -------------------------------------------------------------------------------- /fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/NOTICE: -------------------------------------------------------------------------------- 1 | Apache Cordova 2 | Copyright 2012 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /plugins/fetch.json: -------------------------------------------------------------------------------- 1 | { 2 | "cordova-plugin-whitelist": { 3 | "source": { 4 | "type": "registry", 5 | "id": "cordova-plugin-whitelist@1" 6 | }, 7 | "is_top_level": true, 8 | "variables": {} 9 | } 10 | } -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600); 4 | 5 | // Variables 6 | @import "variables"; 7 | 8 | // Bootstrap 9 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 10 | 11 | #app { padding-top: 70px } 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ToDo Mobile App using Cordova and Vue 2 | 3 | To run the code in browser, follow the below steps: 4 | 5 | 1. Clone the repo 6 | 2. Install dependencies with `yarn` or `npm install` 7 | 3. Visit the browser and play with it 8 | 4. To run in your mobile device, you need to follow the steps as mentioned in the article 9 | -------------------------------------------------------------------------------- /plugins/android.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": {} 8 | }, 9 | "installed_plugins": { 10 | "cordova-plugin-whitelist": { 11 | "PACKAGE_NAME": "io.cordova.hellocordova" 12 | } 13 | }, 14 | "dependent_plugins": {} 15 | } -------------------------------------------------------------------------------- /plugins/ios.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": {} 8 | }, 9 | "installed_plugins": { 10 | "cordova-plugin-whitelist": { 11 | "PACKAGE_NAME": "io.cordova.hellocordova" 12 | } 13 | }, 14 | "dependent_plugins": {} 15 | } -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const { mix } = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/assets/js/app.js', 'www/js') 15 | .sass('resources/assets/sass/app.scss', 'www/css'); 16 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/assets/js/components/Example.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-plugin-whitelist", 3 | "version": "1.3.2", 4 | "description": "Cordova Whitelist Plugin", 5 | "cordova": { 6 | "platforms": [ 7 | "android" 8 | ] 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/apache/cordova-plugin-whitelist" 13 | }, 14 | "keywords": [ 15 | "cordova", 16 | "whitelist", 17 | "ecosystem:cordova", 18 | "cordova-android" 19 | ], 20 | "engines": { 21 | "cordovaDependencies": { 22 | "0.0.0": { 23 | "cordova-android": ">=4.0.0" 24 | }, 25 | "2.0.0": { 26 | "cordova": ">100" 27 | } 28 | } 29 | }, 30 | "author": "Apache Software Foundation", 31 | "license": "Apache-2.0" 32 | } 33 | -------------------------------------------------------------------------------- /resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | try { 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap-sass'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/assets/js/components/CreateTask.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 38 | -------------------------------------------------------------------------------- /resources/assets/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f5f8fa; 4 | 5 | // Borders 6 | $laravel-border-color: darken($body-bg, 10%); 7 | $list-group-border: $laravel-border-color; 8 | $navbar-default-border: $laravel-border-color; 9 | $panel-default-border: $laravel-border-color; 10 | $panel-inner-border: $laravel-border-color; 11 | 12 | // Brands 13 | $brand-primary: #3097D1; 14 | $brand-info: #8eb4cb; 15 | $brand-success: #2ab27b; 16 | $brand-warning: #cbb956; 17 | $brand-danger: #bf5329; 18 | 19 | // Typography 20 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; 21 | $font-family-sans-serif: "Raleway", sans-serif; 22 | $font-size-base: 14px; 23 | $line-height-base: 1.6; 24 | $text-color: #636b6f; 25 | 26 | // Navbar 27 | $navbar-default-bg: #fff; 28 | 29 | // Buttons 30 | $btn-default-color: $text-color; 31 | 32 | // Inputs 33 | $input-border: lighten($text-color, 40%); 34 | $input-border-focus: lighten($brand-primary, 25%); 35 | $input-color-placeholder: lighten($text-color, 30%); 36 | 37 | // Panels 38 | $panel-default-heading-bg: #fff; 39 | -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ToDo - Pusher 4 | 5 | A ToDo app for Pusher using Cordova and Vue 6 | 7 | 8 | Apache Cordova Team 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /hooks/README.md: -------------------------------------------------------------------------------- 1 | 21 | # Cordova Hooks 22 | 23 | Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide. 24 | -------------------------------------------------------------------------------- /resources/assets/js/components/Navigation.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 31 | -------------------------------------------------------------------------------- /resources/assets/js/components/Todo.vue: -------------------------------------------------------------------------------- 1 | 24 | 43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.15.3", 14 | "bootstrap-sass": "^3.3.7", 15 | "cross-env": "^3.2.3", 16 | "jquery": "^3.1.1", 17 | "laravel-mix": "0.*", 18 | "lodash": "^4.17.4", 19 | "vue": "^2.1.10" 20 | }, 21 | "dependencies": { 22 | "vue-router": "^2.5.3", 23 | "cordova-plugin-whitelist": "1" 24 | }, 25 | "cordova": { 26 | "plugins": { 27 | "cordova-plugin-whitelist": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | # Contributing to Apache Cordova 23 | 24 | Anyone can contribute to Cordova. And we need your contributions. 25 | 26 | There are multiple ways to contribute: report bugs, improve the docs, and 27 | contribute code. 28 | 29 | For instructions on this, start with the 30 | [contribution overview](http://cordova.apache.org/contribute/). 31 | 32 | The details are explained there, but the important items are: 33 | - Sign and submit an Apache ICLA (Contributor License Agreement). 34 | - Have a Jira issue open that corresponds to your contribution. 35 | - Run the tests so your patch doesn't break existing functionality. 36 | 37 | We look forward to your contributions! 38 | -------------------------------------------------------------------------------- /resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | 10 | window.Vue = require('vue'); 11 | 12 | import Vue from 'vue' 13 | import VueRouter from 'vue-router' 14 | 15 | // 1. Define route components. 16 | // These can be imported from other files 17 | let Todo = require('./components/Todo.vue'); 18 | 19 | // 2. Define some routes 20 | // Each route should map to a component. The "component" can 21 | // either be an actual component constructor created via 22 | // Vue.extend(), or just a component options object. 23 | // We'll talk about nested routes later. 24 | const routes = [ 25 | { path: '/tasks', component: Todo } 26 | ] 27 | 28 | // 3. Create the router instance and pass the `routes` option 29 | // You can pass in additional options here, but let's 30 | // keep it simple for now. 31 | const router = new VueRouter({ 32 | routes 33 | }) 34 | 35 | Vue.use(VueRouter); 36 | 37 | Vue.component('navigation', require('./components/Navigation.vue')); 38 | Vue.component('create-task', require('./components/CreateTask.vue')); 39 | 40 | // 4. Create and mount the root instance. 41 | // Make sure to inject the router with the router option to make the 42 | // whole app router-aware. 43 | window.onload = function () { 44 | const app = new Vue({ 45 | router 46 | }).$mount('#app'); 47 | } 48 | 49 | router.push('/tasks'); 50 | // app.initialize(); 51 | -------------------------------------------------------------------------------- /www/js/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | var app = { 20 | // Application Constructor 21 | initialize: function() { 22 | document.addEventListener('deviceready', this.onDeviceReady.bind(this), false); 23 | }, 24 | 25 | // deviceready Event Handler 26 | // 27 | // Bind any cordova events here. Common events are: 28 | // 'pause', 'resume', etc. 29 | onDeviceReady: function() { 30 | this.receivedEvent('deviceready'); 31 | }, 32 | 33 | // Update DOM on a Received Event 34 | receivedEvent: function(id) { 35 | var parentElement = document.getElementById(id); 36 | var listeningElement = parentElement.querySelector('.listening'); 37 | var receivedElement = parentElement.querySelector('.received'); 38 | 39 | listeningElement.setAttribute('style', 'display:none;'); 40 | receivedElement.setAttribute('style', 'display:block;'); 41 | 42 | console.log('Received Event: ' + id); 43 | } 44 | }; 45 | 46 | app.initialize(); -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 24 | Whitelist 25 | Cordova Network Whitelist Plugin 26 | Apache 2.0 27 | cordova,whitelist,policy 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in. 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | Todo App - Cordova and VueJs 38 | 39 | 40 |
41 | 42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Laravel 9 | 10 | 11 | 12 | 13 | 14 | 66 | 67 | 68 |
69 | @if (Route::has('login')) 70 | 78 | @endif 79 | 80 |
81 |
82 | Laravel 83 |
84 | 85 | 92 |
93 |
94 | 95 | 96 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/RELEASENOTES.md: -------------------------------------------------------------------------------- 1 | 21 | # Release Notes 22 | 23 | ### 1.3.2 (Feb 28, 2017) 24 | * [CB-12236](https://issues.apache.org/jira/browse/CB-12236) Fixed `RELEASENOTES` for `cordova-plugin-whitelist` 25 | 26 | ### 1.3.1 (Dec 07, 2016) 27 | * [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.3.1 28 | * [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" 29 | * Edit package.json license to match SPDX id 30 | * [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. 31 | 32 | ### 1.3.0 (Sep 08, 2016) 33 | * [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies 34 | * Updated installation section 35 | * Plugin uses `Android Log class` and not `Cordova LOG class` 36 | * Add pull request template. 37 | * [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine info to `package.json` 38 | * [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md 39 | 40 | ### 1.2.2 (Apr 15, 2016) 41 | * add note about redirects 42 | * [CB-10624](https://issues.apache.org/jira/browse/CB-10624) remove error message from `whitelist.js`, which leaves it empty 43 | 44 | ### 1.2.1 (Jan 15, 2016) 45 | * [CB-10194](https://issues.apache.org/jira/browse/CB-10194) info tag prints for ios when not applicable 46 | 47 | ### 1.2.0 (Nov 18, 2015) 48 | * removed **iOS** engine check from `plugin.xml` 49 | * [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest 50 | * [CB-9972](https://issues.apache.org/jira/browse/CB-9972) - Remove **iOS** whitelist 51 | * Updated the text, it should read 4.0.x and greater, since this plugin will be required for `cordova-android 5.0` 52 | * Fixing contribute link. 53 | * Updated `plugin.xml ` tag to remove warning about not needing this plugin if you are using the **iOS 9 SDK** 54 | * [CB-9738](https://issues.apache.org/jira/browse/CB-9738) - Disable whitelist use when runtime environment is **iOS 9** 55 | * [CB-9740](https://issues.apache.org/jira/browse/CB-9740) - Add `` tag describing whitelist plugin not needed on `cordova-ios` and cordova-android 3.x` 56 | * [CB-9568](https://issues.apache.org/jira/browse/CB-9568) - Update whitelist plugin to allow all network access by default 57 | * [CB-9337](https://issues.apache.org/jira/browse/CB-9337) - enable use of `` tags for native code network requests 58 | 59 | ### 1.1.0 (Jun 17, 2015) 60 | * [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-whitelist documentation translation: cordova-plugin-whitelist 61 | * fix npm md issue 62 | * Usage of CDVURLRequestFilter protocol. 63 | * [CB-9089](https://issues.apache.org/jira/browse/CB-9089) - iOS whitelist plugin does not compile 64 | * [CB-9090](https://issues.apache.org/jira/browse/CB-9090) - Enable whitelist plugin for cordova-ios 4.0.0 65 | * Fixed error in Content-Security-Policy example 66 | 67 | ### 1.0.0 (Mar 25, 2015) 68 | * [CB-8739](https://issues.apache.org/jira/browse/CB-8739) added missing license headers 69 | * Add @Override to CustomConfigXmlParser methods 70 | * Change ID to cordova-plugin-whitelist rather than reverse-DNS-style 71 | * Tweak CSP examples in README 72 | * [CB-8660](https://issues.apache.org/jira/browse/CB-8660) remove extra commas from package.json 73 | -------------------------------------------------------------------------------- /www/css/index.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | * { 20 | -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ 21 | } 22 | 23 | body { 24 | -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ 25 | -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ 26 | -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ 27 | background-color:#E4E4E4; 28 | background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); 29 | background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); 30 | background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); 31 | background-image:-webkit-gradient( 32 | linear, 33 | left top, 34 | left bottom, 35 | color-stop(0, #A7A7A7), 36 | color-stop(0.51, #E4E4E4) 37 | ); 38 | background-attachment:fixed; 39 | font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif; 40 | font-size:12px; 41 | height:100%; 42 | margin:0px; 43 | padding:0px; 44 | text-transform:uppercase; 45 | width:100%; 46 | } 47 | 48 | /* Portrait layout (default) */ 49 | .app { 50 | background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */ 51 | position:absolute; /* position in the center of the screen */ 52 | left:50%; 53 | top:50%; 54 | height:50px; /* text area height */ 55 | width:225px; /* text area width */ 56 | text-align:center; 57 | padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */ 58 | margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */ 59 | /* offset horizontal: half of text area width */ 60 | } 61 | 62 | /* Landscape layout (with min-width) */ 63 | @media screen and (min-aspect-ratio: 1/1) and (min-width:400px) { 64 | .app { 65 | background-position:left center; 66 | padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */ 67 | margin:-90px 0px 0px -198px; /* offset vertical: half of image height */ 68 | /* offset horizontal: half of image width and text area width */ 69 | } 70 | } 71 | 72 | h1 { 73 | font-size:24px; 74 | font-weight:normal; 75 | margin:0px; 76 | overflow:visible; 77 | padding:0px; 78 | text-align:center; 79 | } 80 | 81 | .event { 82 | border-radius:4px; 83 | -webkit-border-radius:4px; 84 | color:#FFFFFF; 85 | font-size:12px; 86 | margin:0px 30px; 87 | padding:2px 0px; 88 | } 89 | 90 | .event.listening { 91 | background-color:#333333; 92 | display:block; 93 | } 94 | 95 | .event.received { 96 | background-color:#4B946A; 97 | display:none; 98 | } 99 | 100 | @keyframes fade { 101 | from { opacity: 1.0; } 102 | 50% { opacity: 0.4; } 103 | to { opacity: 1.0; } 104 | } 105 | 106 | @-webkit-keyframes fade { 107 | from { opacity: 1.0; } 108 | 50% { opacity: 0.4; } 109 | to { opacity: 1.0; } 110 | } 111 | 112 | .blink { 113 | animation:fade 3000ms infinite; 114 | -webkit-animation:fade 3000ms infinite; 115 | } 116 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/doc/zh/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # cordova-plugin-whitelist 21 | 22 | 這個外掛程式實現一個用於導航在科爾多瓦 4.0 應用程式 web 視圖的白名單策略 23 | 24 | ## 支援的科爾多瓦平臺 25 | 26 | * Android 4.0.0 或以上 27 | * iOS 4.0.0 或以上 28 | 29 | ## 導航白名單 30 | 31 | 控制 web 視圖本身可以導航到的 Url。適用于頂級導航只。 32 | 33 | 怪癖: 在 Android 上它也適用于 iframe 的非-結計畫。 34 | 35 | 預設情況下,只有到`file://` Url 導航允許。若要允許其他其他 Url,必須將``標籤添加到您的`config.xml`: 36 | 37 | 38 | 39 | 40 | 42 | 43 | 44 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | ## 科爾多瓦-外掛程式-白名單 56 | 57 | 控制應用程式允許讓系統打開的 Url。 預設情況下,沒有外部 Url 允許。 58 | 59 | 在 android 系統,這相當於發送類型 BROWSEABLE 的意圖。 60 | 61 | 此白名單並不適用于只超連結和對`window.open ()`調用的外掛程式. 62 | 63 | 在`config.xml`中添加``標籤,像這樣: 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 87 | 88 | 89 | 90 | ## 網路請求白名單 91 | 92 | 網路請求的控制項 (圖像,XHRs 等) 允許 (通過科爾多瓦本機掛鉤)。 93 | 94 | 注意: 我們建議你使用內容的安全性原則 (見下文),這是更安全。 此白名單大多是為 webviews 不支援 CSP 的歷史。 95 | 96 | 在`config.xml`中添加``標記,像這樣: 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 沒有任何``標籤,只到`file://` Url 允許請求。 但是,預設的科爾多瓦應用程式包括`` ,預設情況。 116 | 117 | 怪癖: Android 還允許對 HTTPs://ssl.gstatic.com/accessibility/javascript/android/ 請求預設情況下,因為這是對講正常所需。 118 | 119 | ### 內容安全政策 120 | 121 | 網路請求的控制項 (圖像,XHRs 等) 允許 (通過 web 視圖直接)。 122 | 123 | 對 Android 和 iOS,網路請求白名單 (見上文) 是不能夠過濾所有類型的請求 (例如`