Change /auth link to /dashboard if logged in

Updated v1 version string and rebuilt client assets
This commit is contained in:
Bobby Wibowo 2020-05-26 02:46:09 +07:00
parent d666e278ec
commit 5e54c07f94
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
4 changed files with 10 additions and 6 deletions

2
dist/js/home.js vendored

File diff suppressed because one or more lines are too long

2
dist/js/home.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -207,6 +207,11 @@ page.verifyToken = (token, reloadOnError) => {
page.prepareUpload = () => { page.prepareUpload = () => {
// I think this fits best here because we need to check for a valid token before we can get the albums // I think this fits best here because we need to check for a valid token before we can get the albums
if (page.token) { if (page.token) {
// Change /auth link to /dashboard
const authLink = document.querySelector('#linksColumn a[href="auth"]')
if (authLink)
authLink.setAttribute('href', 'dashboard')
// Display the album selection // Display the album selection
document.querySelector('#albumDiv').classList.remove('is-hidden') document.querySelector('#albumDiv').classList.remove('is-hidden')
@ -221,6 +226,8 @@ page.prepareUpload = () => {
// Fetch albums // Fetch albums
page.fetchAlbums() page.fetchAlbums()
} else if (page.enableUserAccounts) {
document.querySelector('#loginLinkText').innerHTML = 'Create an account and keep track of your uploads'
} }
// Prepare & generate config tab // Prepare & generate config tab
@ -230,9 +237,6 @@ page.prepareUpload = () => {
document.querySelector('#maxSize > span').innerHTML = page.getPrettyBytes(page.maxSizeBytes) document.querySelector('#maxSize > span').innerHTML = page.getPrettyBytes(page.maxSizeBytes)
document.querySelector('#loginToUpload').classList.add('is-hidden') document.querySelector('#loginToUpload').classList.add('is-hidden')
if (!page.token && page.enableUserAccounts)
document.querySelector('#loginLinkText').innerHTML = 'Create an account and keep track of your uploads'
// Prepare & generate files upload tab // Prepare & generate files upload tab
page.prepareDropzone() page.prepareDropzone()

View File

@ -1,5 +1,5 @@
{ {
"1": "1590435470", "1": "1590435956",
"2": "1589010026", "2": "1589010026",
"3": "1581416390", "3": "1581416390",
"4": "1581416390", "4": "1581416390",