forked from lisong/code-push-server
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: refactor views, improve/simplify the auth workflows
- Loading branch information
Showing
15 changed files
with
114 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
{ | ||
"Please sign in": "Please sign in", | ||
"email address": "email address", | ||
"username": "username", | ||
"password": "password", | ||
"Remember me": "Remember me", | ||
"Log in": "Log in", | ||
"hot update server": "hot update server", | ||
"Change Password": "Change Password", | ||
"Obtain": "Obtain", | ||
"old password": "old password", | ||
"new password": "new password", | ||
"please login again": "please login again", | ||
"change success": "change success" | ||
} | ||
"Please sign in": "Please sign in", | ||
"email address": "email address", | ||
"username": "username", | ||
"password": "password", | ||
"Remember me": "Remember me", | ||
"Log in": "Log in", | ||
"hot update server": "hot update server", | ||
"Change Password": "Change Password", | ||
"Obtain": "Obtain", | ||
"old password": "old password", | ||
"new password": "new password", | ||
"please login again": "please login again", | ||
"change success": "change success", | ||
"Logout": "Logout", | ||
"Register": "Register" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
doctype html | ||
html | ||
head | ||
title= title | ||
meta(name="keywords" content="code-push-server,code-push,react-native,cordova") | ||
meta(name="description" content="CodePush service is hotupdate services which adapter react-native-code-push and cordova-plugin-code-push") | ||
link(rel='stylesheet', href='/js/bootstrap-3.3.7/css/bootstrap.min.css') | ||
link(rel='stylesheet', href='/stylesheets/common.css') | ||
block css | ||
body | ||
block content | ||
|
||
script(src='/js/jquery-3.1.1.min.js') | ||
script(src='/js/bootstrap-3.3.7/js/bootstrap.min.js') | ||
script(). | ||
function getAccessToken() { | ||
return localStorage.getItem('auth'); | ||
} | ||
function ensureLogin() { | ||
if (!getAccessToken()) { | ||
window.location.href = '/auth/login'; | ||
} | ||
} | ||
function logout() { | ||
localStorage.removeItem('auth'); | ||
location.href = '/auth/login'; | ||
} | ||
function parseQuery() { | ||
query = location.search.substring(1); | ||
var vars = query.split('&'); | ||
var rs = {}; | ||
for (var i = 0; i < vars.length; i++) { | ||
var pair = vars[i].split('='); | ||
rs[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]); | ||
} | ||
return rs; | ||
} | ||
block js |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
extends layout | ||
block css | ||
link(rel='stylesheet', href='/stylesheets/index.css') | ||
extends common | ||
|
||
block content | ||
.site-notice react native / cordova #{__('hot update server')} | ||
h1(style="text-align: center;")= title | ||
p(style="text-align: center;") Welcome to #{title} | ||
.site-notice | ||
a.btn.btn-primary(href="/auth/login" type="button") #{__('Log in')} | ||
a.btn.btn-primary(href="/tokens" type="button") #{__('Obtain')} token | ||
a.btn.btn-primary.col-md-offset-1(href="/auth/password" type="button") #{__('Change Password')} | ||
a#logoutBtn.btn.btn-primary.col-md-offset-1(href="#" type="button") #{__('Logout')} | ||
|
||
block js | ||
script(). | ||
ensureLogin(); | ||
|
||
$('#logoutBtn').on('click', logout); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters