mirror of
https://github.com/byulmaru/quesdon
synced 2024-11-30 15:58:01 +09:00
gitのコミットを表示するように
This commit is contained in:
parent
c0b28dcb09
commit
e19a12a27d
@ -1,3 +1,5 @@
|
||||
import { csrfToken } from "./initial-state";
|
||||
|
||||
const fetchDefaults = require("fetch-defaults")
|
||||
|
||||
export default function apiFetch(url: string, params?: RequestInit) {
|
||||
@ -5,7 +7,7 @@ export default function apiFetch(url: string, params?: RequestInit) {
|
||||
params = Object.assign({
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"X-CSRF-Token": (<any>window).CSRF_TOKEN
|
||||
"X-CSRF-Token": csrfToken
|
||||
}
|
||||
}, params)
|
||||
return window.fetch(url, params)
|
||||
|
@ -1,11 +1,11 @@
|
||||
import * as React from "react"
|
||||
import { Link } from "react-router-dom";
|
||||
import { usingDarkTheme } from "../initial-state";
|
||||
import { usingDarkTheme, gitVersion } from "../initial-state";
|
||||
|
||||
export default class Footer extends React.Component {
|
||||
render() {
|
||||
return <footer className="container">
|
||||
<p>Quesdon は AGPL-3.0 で提供されています。<a href="https://github.com/rinsuki/quesdon">ソースコード</a></p>
|
||||
<p>Quesdon は AGPL-3.0 で提供されています。<a href="https://github.com/rinsuki/quesdon">ソースコード</a> ({gitVersion.slice(0,7)})</p>
|
||||
<p>公式アカウント: <a href="https://mstdn.jp/@quesdon">@quesdon@mstdn.jp</a> <Link to="/@quesdon@mstdn.jp">公式Quesdon (要望や不具合報告もこちらへどうぞ)</Link></p>
|
||||
<p>開発者: <a href="https://mstdn.maud.io/@rinsuki">@rinsuki@mstdn.maud.io</a></p>
|
||||
<p>
|
||||
|
@ -3,6 +3,7 @@ import { APIUser } from "../api-interfaces";
|
||||
const w = <any>window
|
||||
|
||||
export const me: APIUser | undefined = w.USER
|
||||
export const csrfToken: string = w.CSRFTOKEN
|
||||
export const csrfToken: string = w.CSRF_TOKEN
|
||||
|
||||
export const usingDarkTheme: boolean = !!localStorage.getItem("using-dark-theme")
|
||||
export const usingDarkTheme: boolean = !!localStorage.getItem("using-dark-theme")
|
||||
export const gitVersion = w.GIT_VERSION
|
@ -1,14 +1,15 @@
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
meta(name="viewport",content="width=device-width")
|
||||
if user
|
||||
script window.USER=JSON.parse(atob("!{user}"))
|
||||
else
|
||||
script window.USER=undefined
|
||||
script window.CSRF_TOKEN="#{csrfToken}"
|
||||
script window.GIT_VERSION="#{GIT_COMMIT}"
|
||||
script(src="https://cdn.polyfill.io/v2/polyfill.js?features=fetch")
|
||||
script(src="/assets/bundle.js?version="+GIT_COMMIT)
|
||||
meta(name="git-version", content=GIT_COMMIT)
|
||||
body
|
||||
#root
|
||||
p ...あれ、もしかしてページが表示されてませんか?
|
||||
|
Loading…
Reference in New Issue
Block a user