0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 04:49:03 -05:00

🎉 Add integrated 403 page.

This commit is contained in:
Andrey Antukh 2020-04-16 10:19:36 +02:00
parent 331f698ca3
commit e11d2033d2
2 changed files with 18 additions and 4 deletions

View file

@ -22,7 +22,7 @@
[uxbox.main.store :as st]
[uxbox.main.ui.dashboard :refer [dashboard]]
[uxbox.main.ui.login :refer [login-page]]
[uxbox.main.ui.not-found :refer [not-found-page]]
[uxbox.main.ui.static :refer [not-found-page not-authorized-page]]
[uxbox.main.ui.profile.recovery :refer [profile-recovery-page]]
[uxbox.main.ui.profile.recovery-request :refer [profile-recovery-request-page]]
[uxbox.main.ui.profile.register :refer [profile-register-page]]
@ -47,6 +47,7 @@
["/view/:page-id" :viewer]
["/not-found" :not-found]
["/not-authorized" :not-authorized]
(when *assert*
["/debug/icons-preview" :debug-icons-preview])
@ -132,8 +133,11 @@
:page-id page-id
:key file-id}])
:not-authorized
[:& not-authorized-page]
:not-found
[:& not-found-page {}]))
[:& not-found-page]))
(mf/defc app
[]

View file

@ -7,7 +7,7 @@
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.main.ui.not-found
(ns uxbox.main.ui.static
(:require
[cljs.spec.alpha :as s]
[rumext.alpha :as mf]
@ -15,7 +15,6 @@
(mf/defc not-found-page
[{:keys [error] :as props}]
(js/console.log "not-found" error)
[:section.not-found-layout
[:div.not-found-header i/logo]
[:div.not-found-content
@ -25,3 +24,14 @@
[:div.desc-message "Oops! Page not found"]
[:a.btn-primary.btn-small "Go back"]]]])
(mf/defc not-authorized-page
[{:keys [error] :as props}]
[:section.not-found-layout
[:div.not-found-header i/logo]
[:div.not-found-content
[:div.message-container
[:div.error-img i/icon-lock]
[:div.main-message "403"]
[:div.desc-message "Sorry, you are not authorized to access this page."]
#_[:a.btn-primary.btn-small "Go back"]]]])