PageSourceSearch

https://sannosuke.jp/assets/SettingsPage-20261004_155452-DTlObDxN.js

js sannosuke.jp collected 2026-10-05 03:44:08 UTC 3,059 bytes, 1 lines download raw bytes

1import{r as e,j as s,a8 as t}from"./react-vendor-20261004_155452-CMD9Mu4L.js";import{ap as a}from"./vendor-20261004_155452-C99PGm5B.js";import{ak as r,C as i,I as c,B as l}from"./index-20261004_155452-i5YY-Rmq.js";import{ag as n,l as d}from"./app-services-20261004_155452-CqhrjBLd.js";import"./date-utils-20261004_155452-BABpr51X.js";import"./tanstack-20261004_155452-DKr4WzMb.js";import"./firebase-20261004_155452-bkCdcoUk.js";import"./ui-components-20261004_155452-DP5C5l_T.js";import"./socket-manager-20261004_155452-ZWL0JEUH.js";import"./socket-io-20261004_155452-CfF5R5HA.js";import"./auth-20261004_155452-HLcqn2jx.js";function o(){const[o,m]=e.useState({isAuthenticated:!1,locationId:null,lastRefresh:null}),[u,h]=e.useState(!0);e.useEffect(()=>{x()},[]);const x=async()=>{try{const e=await n.getOAuthStatus();m(e)}catch(e){d.error("OAuth status fetch failed:",{error:e,context:"SettingsPage"})}finally{h(!1)}};return s.jsxs(s.Fragment,{children:[s.jsx(a,{children:s.jsx("title",{children:"設定 | 管理"})}),s.jsx(r,{title:"システム設定",loading:u,useCard:!1,header:{title:"システム設定",subtitle:"システム全体の設定を管理します",breadcrumbs:[{label:"管理画面",path:"/s"},{label:"システム設定"}]},children:s.jsx(i,{className:"p-6",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(t,{className:"h-5 w-5 text-primary"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Square決済設定"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium",children:"OAuth認証状態"}),s.jsx("div",{className:"flex items-center gap-2",children:o.isAuthenticated?s.jsx(c,{variant:"success",size:"md",children:"認証済み"}):s.jsx(c,{variant:"error",size:"md",children:"未認証"})})]}),o.isAuthenticated&&s.jsxs("div",{className:"space-y-3 bg-accent/50 p-4 rounded-lg border border-border/50",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Location ID"}),s.jsx("p",{className:"text-sm font-mono",children:o.locationId})]}),o.lastRefresh&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"最終更新"}),s.jsx("p",{className:"text-sm",children:new Date(o.lastRefresh).toLocaleString("ja-JP")})]})]}),s.jsx(l,{onClick:()=>{n.startOAuth()},className:"w-full",size:"lg",variant:o.isAuthenticated?"outline":"default",children:o.isAuthenticated?"Square認証をやり直す":"Square認証を開始"}),o.isAuthenticated&&s.jsx("p",{className:"text-xs text-muted-foreground",children:"Square の認証ページへ移動します。同意すると認証情報が新しいものに入れ替わります (同意画面で中止すれば現在の設定はそのまま残ります)。 認証の解除(トークン失効)はこの画面からは行えません。"})]})]})})})]})}export{o as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.