feat: update file-view ui

This commit is contained in:
Project_IO 2025-03-17 15:36:04 +09:00
parent 7e8f945582
commit e96ff1c4ec
8 changed files with 29 additions and 24 deletions

View file

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2025 devproje Copyright (c) 2025 Project_IO
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View file

@ -88,5 +88,9 @@
align-items: flex-end; align-items: flex-end;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
* {
text-align: end;
}
} }
} }

View file

@ -130,8 +130,12 @@ function Footer() {
) : <></> : <></>} ) : <></> : <></>}
<div className="footer"> <div className="footer">
<span>&copy; 2020-2025 Project_IO. All rights reserved.</span> <p>
<span>Powered by WSERVER.</span> &copy; 2020-2025 <a href="https://git.wh64.net/devproje">Project_IO</a>. All rights reserved for images.
<br />
Code licensed under the <a href="https://git.wh64.net/devproje/kuma-archive/src/branch/master/LICENSE">MIT License</a>.
</p>
<span> Powered by WSERVER</span>
</div> </div>
</footer> </footer>
); );

View file

@ -45,10 +45,5 @@
} }
.ka-readme { .ka-readme {
padding: 1rem 1rem 0 1rem; padding-top: 1rem;
h1, h2 {
width: 100%;
border-bottom: 1px solid var(--foreground);
}
} }

View file

@ -84,7 +84,10 @@ function Readme() {
useEffect(() => { useEffect(() => {
async function refresh() { async function refresh() {
const pathname = location.pathname; const pathname = location.pathname;
const res = await fetch(`/api/raw/${pathname}${pathname.endsWith("/") ? "" : "/"}README.md`); const res = await fetch(`/api/raw/${pathname}${pathname.endsWith("/") ? "" : "/"}README.md`, {
cache: "no-cache"
});
if (res.status !== 200) if (res.status !== 200)
return; return;

View file

@ -3,27 +3,26 @@
display: flex; display: flex;
margin: 1rem 0; margin: 1rem 0;
min-height: 300px; min-height: 300px;
border-radius: 15px;
flex-direction: column; flex-direction: column;
background-color: var(--nav-color); border-top: 1px solid var(--foreground);
border: 1px solid var(--foreground); border-bottom: 1px solid var(--foreground);
.title { .title {
width: 100%; width: 100%;
display: flex; display: flex;
padding: 5px 10px;
align-items: center; align-items: center;
flex-direction: row; flex-direction: row;
border-radius: 15px 15px 0 0; padding: 0.25rem 10px;
justify-content: space-between; justify-content: space-between;
background-color: var(--nav-hover); background-color: var(--nav-color);
border-bottom: 1px solid var(--foreground); border-bottom: 1px solid var(--foreground);
.name { .name {
width: fit-content;
display: flex; display: flex;
width: fit-content;
align-items: center;
span { b {
margin: 0 5px; margin: 0 5px;
} }
} }

View file

@ -22,13 +22,13 @@ function FileView() {
<span className="title"> <span className="title">
<div className="name"> <div className="name">
<a className="link" href={location.pathname.endsWith("/") ? location.pathname + ".." : location.pathname + "/.."}> <a className="link" href={location.pathname.endsWith("/") ? location.pathname + ".." : location.pathname + "/.."}>
<DynamicIcon name="chevron-left" /> <DynamicIcon name="chevron-left" size={21} />
</a> </a>
<span>{location.pathname}</span> <b>{location.pathname}</b>
</div> </div>
<div className="action-row"> <div className="action-row">
<a className="btn link" href={`/api/raw${location.pathname}`}> <a className="btn link" href={`/api/raw${location.pathname}`}>
<DynamicIcon name="file" /> <DynamicIcon name="file" size={21} />
</a> </a>
<a className="btn link" onClick={ev => { <a className="btn link" onClick={ev => {
ev.preventDefault(); ev.preventDefault();
@ -49,7 +49,7 @@ function FileView() {
}) })
.catch(error => console.error("Download failed:", error)); .catch(error => console.error("Download failed:", error));
}}> }}>
<DynamicIcon name="download" /> <DynamicIcon name="download" size={21} />
</a> </a>
</div> </div>
</span> </span>

View file

@ -63,11 +63,11 @@ html, body {
} }
h1 { h1 {
font-size: 32pt; font-size: 24pt;
} }
h2 { h2 {
font-size: 24pt; font-size: 20pt;
} }
h3 { h3 {