photoprism/assets/templates/callback.tmpl
2021-09-08 12:17:44 +02:00

57 lines
2.5 KiB
Cheetah

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0{{if not .config.Settings.UI.Zoom }}, maximum-scale=1.0, user-scalable=no{{end}}">
<title>{{ .config.SiteTitle }}</title>
<meta property="og:url" content="{{ .config.SiteUrl }}">
<meta property="og:type" content="website">
<meta property="og:title" content="{{ .config.SiteTitle }}{{if .config.SiteCaption}}: {{ .config.SiteCaption }}{{end}}">
<meta property="og:image" content="{{ .config.SitePreview }}">
<meta property="og:description" content="{{ .config.SiteDescription }}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ .config.SiteTitle }}{{if .config.SiteCaption}}: {{ .config.SiteCaption }}{{end}}">
<meta name="twitter:image" content="{{ .config.SitePreview }}">
<meta name="twitter:description" content="{{ .config.SiteDescription }}">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="{{ .config.SiteTitle }}">
{{if .config.SiteAuthor}}<meta name="author" content="{{ .config.SiteAuthor }}">{{end}}
{{if .config.SiteDescription}}<meta name="description" content="{{ .config.SiteDescription }}"/>{{end}}
{{template "favicons.tmpl" .}}
<link rel="stylesheet" href="/static/build/app.css?{{ .config.CSSHash }}">
<link rel="manifest" href="/static/manifest.json?{{ .config.ManifestHash }}">
<script>
window.__CONFIG__ = {{ .config }};
</script>
</head>
<body class="{{ .config.Flags }}">
{{ if and .status (eq .status "ok") }}
<p class="browserupgrade">Login successful. Window can be closed.</p>
{{ else if and .status (eq .status "error") }}
<p class="browserupgrade">Login Error: {{ .errors }}</p>
{{ else }}
<p class="browserupgrade">Undefined State or deprecated link user flow...</p>
{{ end }}
<script>
{{ if and .status (eq .status "ok") }}
window.localStorage.setItem("session_id", {{ .id }})
window.localStorage.setItem("data", JSON.stringify({{ .data }}));
window.localStorage.setItem("config", JSON.stringify({{ .config }}));
{{ else if and .status (eq .status "error") }}
window.localStorage.setItem("auth_error", {{ .errors }});
{{ else }}
window.localStorage.setItem("link_user", JSON.stringify({{ .linkUser }}));
{{ end }}
</script>
</body>
</html>