Skip to content

Commit

Permalink
Merge pull request #110 from dalenguyen/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Dale Nguyen authored Aug 19, 2020
2 parents 35485b6 + d13e832 commit b88da43
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 114 deletions.
19 changes: 19 additions & 0 deletions .github/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Push to Master Branch

on:
push:
tags:
- '*'

jobs:
deploy-plugin:
name: New tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@master
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: integrate-firebase
44 changes: 33 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,57 @@
# Changelog

All notable changes to this project will be documented in this file.

## [ 0.7.0 ] - 18-08-2020

- Fixed add_options_page error
- Preformated data before showing in dashboard
- Delegated button style to WordPress
- Updated firebase package to 7.18.0

## [ 0.6.1 ] - 22-05-2019

- Removed hide realtime table script

## [ 0.6.0 ] - 21-05-2020

- Show realtime data publicly

## [ 0.5.3 ] - 16-02-2020

- Update firebase scripts

## [ 0.5.2 ] - 30-03-2019
* Show realtime database after login

- Show realtime database after login

## [ 0.5.1 ] - 11-08-2018
* Hide login form after logging in

- Hide login form after logging in

## [ 0.5.0 ] - 04-08-2018

* Add shortcode to display when not login
* Add error handling shortcode
- Add shortcode to display when not login
- Add error handling shortcode

## [ 0.4.0 ] - 17-07-2018

* Added Firestore database support in Dashboard
- Added Firestore database support in Dashboard

## [ 0.3.2 ] - 17-07-2018

* Fixed firebase-show shortcode
- Fixed firebase-show shortcode

## [ 0.3.1 ] - 17-07-2018

* Fixed getting credentials
- Fixed getting credentials

## [ 0.3.0 ] - 02-07-2018

* Added about information
* Added Real Time database support in Dashboard
- Added about information
- Added Real Time database support in Dashboard

## [ 0.2.0 ] - 25-5-2018

* Added firebase scripts and styles to header
* Implement login and logout features
- Added firebase scripts and styles to header
- Implement login and logout features
64 changes: 2 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Requires at least: 4.0.0

Tested up to: 4.9.6

Stable tag: 0.6.1
Stable tag: 0.7.0

Requires PHP: 5.2.4

Expand Down Expand Up @@ -132,67 +132,7 @@ echo do_shortcode("[firebase_logout]");

![Firestore Settings](/assets/screenshot-3.png)

## Changelog

### [ 0.6.1 ] - 21-05-2020

- Removed hide realtime table script

### [ 0.6.0 ] - 21-05-2020

- Show realtime data publicly

### [ 0.5.3 ] - 16-02-2020

- Update firebase scripts

### [ 0.5.2 ] - 30-03-2019

- Show realtime database after login

### [ 0.5.1 ] - 11-08-2018

- Hide login form after logging in

### [ 0.5.0 ] - 04-08-2018

- Add shortcode to display when not login
- Add error handling shortcode

### [ 0.4.0 ]

- Added Firestore database support in Dashboard

### 0.3.2

- Fixed firebase show shortcode

### 0.3.1

- Fixing get firebase credentials

### 0.3.0

- Added about information
- Added Real Time database support in Dashboard

### 0.2.2

- Fixed readme typos

### 0.2.1

- Change plugin name
- Update logout shortcode

### 0.2.0

- Add scripts & styles
- Allow to show and hide data after login

### 0.1.0

- Started the project and add an authentication method
## [Changelog](/CHANGELOG.md)

## Upgrade Notice

Expand Down
22 changes: 2 additions & 20 deletions css/firebase.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
/* Login form */

#firebase-login-form input {
width: 375px;
display: block;
border: 1px solid #999;
height: 25px;
-webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
}

.firebase-btn {
border: 1px solid grey;
background-color: white;
padding: 10px 24px;
margin: 20px 0;
cursor: pointer;
}

.firebase-btn:hover {
border-color: #2196F3;;
#firebase-form-submit {
margin-top: 1rem;
}
13 changes: 6 additions & 7 deletions includes/class.firebase-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,20 @@ public static function load_menu() {
$capability = 'manage_options';
$menu_slug = 'firebase-setting';
$function = 'display_page';
$icon_url = '';
$position = '';
$position = null;

add_options_page(__($page_title, "firebase"), __($menu_title, "firebase"), $capability, $menu_slug, array("Firebase_Admin", $function), $icon_url, $position);
add_options_page(__($page_title, "firebase"), __($menu_title, "firebase"), $capability, $menu_slug, array("Firebase_Admin", $function), $position);
}

public static function load_firebase_admin_js() {
// Load plugins files

wp_enqueue_style('firebase-admin', plugin_dir_url(dirname(__FILE__)) . 'css/firebase-admin.css');

wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/7.8.2/firebase-app.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/7.8.2/firebase-auth.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/7.8.2/firebase-database.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/7.8.2/firebase-firestore.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-app.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-auth.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-database.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-firestore.js', array(), FIREBASE_WP_VERSION, false);

wp_enqueue_script('firebase-admin', plugin_dir_url(dirname(__FILE__)) . 'js/firebase-admin.js', array('jquery'), FIREBASE_WP_VERSION, false);
wp_localize_script('firebase-admin', 'firebaseDatabaseOptions', array(
Expand Down
8 changes: 4 additions & 4 deletions includes/class.firebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public static function load_firebase_js() {

wp_enqueue_style('firebase', plugin_dir_url(dirname(__FILE__)) . 'css/firebase.css');

wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/7.8.2/firebase-app.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/7.8.2/firebase-auth.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/7.8.2/firebase-database.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/7.8.2/firebase-firestore.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-app.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-auth.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-database.js', array(), FIREBASE_WP_VERSION, false);
wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-firestore.js', array(), FIREBASE_WP_VERSION, false);

wp_enqueue_script('firebase', plugin_dir_url(dirname(__FILE__)) . 'js/firebase.js', array('jquery'), FIREBASE_WP_VERSION, false);

Expand Down
4 changes: 2 additions & 2 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Author URI: http://dalenguyen.me
* Contributors: Dale Nguyen (@dalenguyen)
*
* Version: 0.6.1
* Version: 0.7.0
*
* Text Domain: integrate-firebase
*
Expand Down Expand Up @@ -53,7 +53,7 @@
exit;
}

define('FIREBASE_WP_VERSION', '0.6.1');
define('FIREBASE_WP_VERSION', '0.7.0');
define('FIREBASE_WP__MINIMUM_WP_VERSION', '4.0.0');
define('FIREBASE_WP__PLUGIN_DIR', plugin_dir_path(__FILE__));

Expand Down
12 changes: 6 additions & 6 deletions js/firebase-admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;(function($) {
;(function ($) {
'use strict'

if (
Expand All @@ -10,7 +10,7 @@
firebase.initializeApp(window.firebaseOptions)
}

$(document).ready(function() {
$(document).ready(function () {
let db
let collections

Expand All @@ -29,7 +29,7 @@
collections = window.firebaseDatabaseOptions.collections
}

$('#get_database').on('click', function(e) {
$('#get_database').on('click', function (e) {
e.preventDefault()
let collectionArray = collections.trim().split(',')
collectionArray.map(name => {
Expand All @@ -40,7 +40,7 @@

const appendData = (collectionName, result, listElemnt) => {
const text = document.createTextNode(
collectionName + ': ' + JSON.stringify(result)
collectionName + ': ' + JSON.stringify(result, undefined, 2)
)
listElemnt.append(text)
$('.database-holder').append(listElemnt)
Expand All @@ -53,7 +53,7 @@
const ref = db.ref(collectionName)
ref.on(
'value',
function(snapshot) {
function (snapshot) {
let result = snapshot.val()
if (result === null) {
result = `No results found.`
Expand All @@ -63,7 +63,7 @@
}
appendData(collectionName, result, listElemnt)
},
function(error) {
function (error) {
console.log('There was an error: ' + error)
}
)
Expand Down
10 changes: 8 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: hanthuy
Donate link: https://www.paypal.me/DaleNguyen
Tags: firebase
Requires at least: 4.0.0
Tested up to: 5.3.2
Stable tag: 0.6.1
Tested up to: 5.5
Stable tag: 0.7.0
Requires PHP: 5.2.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -97,6 +97,12 @@ This is a shortcode for log out button.

== Changelog ==

= 0.7.0 =
* Fixed add_options_page error
* Preformated data before showing in dashboard
* Delegated button style to WordPress
* Updated firebase package to 7.18.0

= 0.6.1 =
* Removed hide realtime table script

Expand Down

0 comments on commit b88da43

Please sign in to comment.