mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 00:58:26 -05:00
🎉 Add integrated 403 page.
This commit is contained in:
parent
331f698ca3
commit
e11d2033d2
2 changed files with 18 additions and 4 deletions
|
@ -22,7 +22,7 @@
|
||||||
[uxbox.main.store :as st]
|
[uxbox.main.store :as st]
|
||||||
[uxbox.main.ui.dashboard :refer [dashboard]]
|
[uxbox.main.ui.dashboard :refer [dashboard]]
|
||||||
[uxbox.main.ui.login :refer [login-page]]
|
[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 :refer [profile-recovery-page]]
|
||||||
[uxbox.main.ui.profile.recovery-request :refer [profile-recovery-request-page]]
|
[uxbox.main.ui.profile.recovery-request :refer [profile-recovery-request-page]]
|
||||||
[uxbox.main.ui.profile.register :refer [profile-register-page]]
|
[uxbox.main.ui.profile.register :refer [profile-register-page]]
|
||||||
|
@ -47,6 +47,7 @@
|
||||||
|
|
||||||
["/view/:page-id" :viewer]
|
["/view/:page-id" :viewer]
|
||||||
["/not-found" :not-found]
|
["/not-found" :not-found]
|
||||||
|
["/not-authorized" :not-authorized]
|
||||||
|
|
||||||
(when *assert*
|
(when *assert*
|
||||||
["/debug/icons-preview" :debug-icons-preview])
|
["/debug/icons-preview" :debug-icons-preview])
|
||||||
|
@ -132,8 +133,11 @@
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:key file-id}])
|
:key file-id}])
|
||||||
|
|
||||||
|
:not-authorized
|
||||||
|
[:& not-authorized-page]
|
||||||
|
|
||||||
:not-found
|
:not-found
|
||||||
[:& not-found-page {}]))
|
[:& not-found-page]))
|
||||||
|
|
||||||
(mf/defc app
|
(mf/defc app
|
||||||
[]
|
[]
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
;;
|
;;
|
||||||
;; Copyright (c) 2020 UXBOX Labs SL
|
;; Copyright (c) 2020 UXBOX Labs SL
|
||||||
|
|
||||||
(ns uxbox.main.ui.not-found
|
(ns uxbox.main.ui.static
|
||||||
(:require
|
(:require
|
||||||
[cljs.spec.alpha :as s]
|
[cljs.spec.alpha :as s]
|
||||||
[rumext.alpha :as mf]
|
[rumext.alpha :as mf]
|
||||||
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
(mf/defc not-found-page
|
(mf/defc not-found-page
|
||||||
[{:keys [error] :as props}]
|
[{:keys [error] :as props}]
|
||||||
(js/console.log "not-found" error)
|
|
||||||
[:section.not-found-layout
|
[:section.not-found-layout
|
||||||
[:div.not-found-header i/logo]
|
[:div.not-found-header i/logo]
|
||||||
[:div.not-found-content
|
[:div.not-found-content
|
||||||
|
@ -25,3 +24,14 @@
|
||||||
[:div.desc-message "Oops! Page not found"]
|
[:div.desc-message "Oops! Page not found"]
|
||||||
[:a.btn-primary.btn-small "Go back"]]]])
|
[: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"]]]])
|
||||||
|
|
Loading…
Add table
Reference in a new issue