Skip to content

Commit 139b79a

Browse files
committed
汉化 5.4.1
1 parent 93d8c55 commit 139b79a

File tree

6 files changed

+81990
-514
lines changed

6 files changed

+81990
-514
lines changed

README.MD

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# 说明
2+
这个项目是对[flatnotes](https://github.com/dullage/flatnotes)的汉化翻译。
3+
翻译的版本是 v5.4.1。
4+
这里翻译的不是源码,是编译后的Docker镜像中的内容,翻译源文件来自Docker镜像。`dullage/flatnotes:v5.4.1`中的`/app/client/dist`,适用于这个版本的镜像。
5+
6+
!!! 这个汉化仅适用于`dullage/flatnotes:v5.4.1` 这个docker镜像的v5.4.1这个版本
7+
8+
具体翻译了那些内容,见[翻译说明](./翻译说明.md)
9+
10+
# 使用方法
11+
1. 下载本项目,假设下载后的位置是`/docker/flatnotes/dist`
12+
2. 将这个目录中的`assets`映射到容器中的`/app/client/dist/assets`
13+
compose部署如下,注意替换汉字部分
14+
```yaml
15+
services:
16+
flatnotes:
17+
container_name: flatnotes
18+
image: dullage/flatnotes:v5.4.1
19+
network_mode: bridge
20+
restart: unless-stopped
21+
cpus: 1
22+
mem_limit: 512m
23+
logging:
24+
driver: json-file
25+
options:
26+
max-size: 1m
27+
max-file: "3"
28+
environment:
29+
PUID: 1000
30+
PGID: 1000
31+
FLATNOTES_AUTH_TYPE: password
32+
FLATNOTES_USERNAME: 用户名
33+
FLATNOTES_PASSWORD: 密码
34+
FLATNOTES_SECRET_KEY: flatnotes
35+
TZ: Asia/Shanghai
36+
volumes:
37+
# 项目数据
38+
- /docker/flatnotes/data:/data
39+
# 项目汉化
40+
- /docker/flatnotes/dist/assets:/app/client/dist/assets
41+
ports:
42+
- 端口:8080
43+
```
44+
45+
46+
47+
48+

assets/LogIn-DkfPHZuJ.js

Lines changed: 186 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,186 @@
1-
import{q as k,r,v as x,x as y,b as h,c as g,u as w,y as T,a as M,z as V,e as i,d as c,j as v,m as U,k as B,A as q,n as C,B as I,_ as L,C as P,D as S,E,G as N,h as $}from"./index-BF8kN0UQ.js";const b={__name:"TextInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(p){const l=k(p,"modelValue"),n=r();return(u,s)=>x((h(),g("input",{type:"text",class:"w-full rounded-md border border-theme-border px-3 py-2 focus:outline-none dark:bg-theme-background-elevated","onUpdate:modelValue":s[0]||(s[0]=a=>l.value=a),ref_key:"input",ref:n},null,512)),[[y,l.value]])}},j={class:"flex h-full flex-col items-center justify-center"},A={class:"mb-4 flex"},D=c("label",{for:"remember-me"},"Remember Me",-1),G={__name:"LogIn",props:{redirect:String},setup(p){const l=p,n=w(),u=T(),s=M(),a=r(""),d=r(""),m=r(""),f=r(!1);function _(){S(a.value,d.value,m.value).then(t=>{E(t,f.value),l.redirect?u.push(l.redirect):u.push({name:"home"})}).catch(t=>{var e;a.value="",d.value="",m.value="",((e=t.response)==null?void 0:e.status)===401?s.add(N("Please check your credentials and try again.","Login Failed","error")):$(t,s)})}return n.config.authType===V.none&&u.push({name:"home"}),(t,e)=>(h(),g("div",j,[i(L,{class:"mb-5"}),c("form",{onSubmit:I(_,["prevent"]),class:"flex max-w-80 flex-col items-center"},[i(b,{modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value=o),id:"username",placeholder:"Username",class:"mb-1",autocomplete:"username",required:""},null,8,["modelValue"]),i(b,{modelValue:d.value,"onUpdate:modelValue":e[1]||(e[1]=o=>d.value=o),id:"password",placeholder:"Password",type:"password",class:"mb-1",autocomplete:"current-password",required:""},null,8,["modelValue"]),v(n).config.authType==v(V).totp?(h(),U(b,{key:0,modelValue:m.value,"onUpdate:modelValue":e[2]||(e[2]=o=>m.value=o),id:"one-time-code",placeholder:"2FA Code",class:"mb-1",autocomplete:"one-time-code",required:""},null,8,["modelValue"])):B("",!0),c("div",A,[x(c("input",{type:"checkbox",id:"remember-me","onUpdate:modelValue":e[3]||(e[3]=o=>f.value=o),class:"mr-1"},null,512),[[q,f.value]]),D]),i(C,{iconPath:v(P),label:"Log In"},null,8,["iconPath"])],32)]))}};export{G as default};
1+
import {
2+
q as k,
3+
r,
4+
v as x,
5+
x as y,
6+
b as h,
7+
c as g,
8+
u as w,
9+
y as T,
10+
a as M,
11+
z as V,
12+
e as i,
13+
d as c,
14+
j as v,
15+
m as U,
16+
k as B,
17+
A as q,
18+
n as C,
19+
B as I,
20+
_ as L,
21+
C as P,
22+
D as S,
23+
E,
24+
G as N,
25+
h as $,
26+
} from "./index-BF8kN0UQ.js";
27+
const b = {
28+
__name: "TextInput",
29+
props: { modelValue: {}, modelModifiers: {} },
30+
emits: ["update:modelValue"],
31+
setup(p) {
32+
const l = k(p, "modelValue"),
33+
n = r();
34+
return (u, s) =>
35+
x(
36+
(h(),
37+
g(
38+
"input",
39+
{
40+
type: "text",
41+
class:
42+
"w-full rounded-md border border-theme-border px-3 py-2 focus:outline-none dark:bg-theme-background-elevated",
43+
"onUpdate:modelValue": s[0] || (s[0] = (a) => (l.value = a)),
44+
ref_key: "input",
45+
ref: n,
46+
},
47+
null,
48+
512
49+
)),
50+
[[y, l.value]]
51+
);
52+
},
53+
},
54+
j = { class: "flex h-full flex-col items-center justify-center" },
55+
A = { class: "mb-4 flex" },
56+
D = c("label", { for: "remember-me" }, "记住我", -1),
57+
G = {
58+
__name: "LogIn",
59+
props: { redirect: String },
60+
setup(p) {
61+
const l = p,
62+
n = w(),
63+
u = T(),
64+
s = M(),
65+
a = r(""),
66+
d = r(""),
67+
m = r(""),
68+
f = r(!1);
69+
function _() {
70+
S(a.value, d.value, m.value)
71+
.then((t) => {
72+
E(t, f.value),
73+
l.redirect ? u.push(l.redirect) : u.push({ name: "home" });
74+
})
75+
.catch((t) => {
76+
var e;
77+
(a.value = ""),
78+
(d.value = ""),
79+
(m.value = ""),
80+
((e = t.response) == null ? void 0 : e.status) === 401
81+
? s.add(
82+
N(
83+
"请检查您的凭据并重试。",
84+
"登录失败",
85+
"错误"
86+
)
87+
)
88+
: $(t, s);
89+
});
90+
}
91+
return (
92+
n.config.authType === V.none && u.push({ name: "home" }),
93+
(t, e) => (
94+
h(),
95+
g("div", j, [
96+
i(L, { class: "mb-5" }),
97+
c(
98+
"form",
99+
{
100+
onSubmit: I(_, ["prevent"]),
101+
class: "flex max-w-80 flex-col items-center",
102+
},
103+
[
104+
i(
105+
b,
106+
{
107+
modelValue: a.value,
108+
"onUpdate:modelValue":
109+
e[0] || (e[0] = (o) => (a.value = o)),
110+
id: "username",
111+
placeholder: "用户名",
112+
class: "mb-1",
113+
autocomplete: "username",
114+
required: "",
115+
},
116+
null,
117+
8,
118+
["modelValue"]
119+
),
120+
i(
121+
b,
122+
{
123+
modelValue: d.value,
124+
"onUpdate:modelValue":
125+
e[1] || (e[1] = (o) => (d.value = o)),
126+
id: "password",
127+
placeholder: "密码",
128+
type: "password",
129+
class: "mb-1",
130+
autocomplete: "current-password",
131+
required: "",
132+
},
133+
null,
134+
8,
135+
["modelValue"]
136+
),
137+
v(n).config.authType == v(V).totp
138+
? (h(),
139+
U(
140+
b,
141+
{
142+
key: 0,
143+
modelValue: m.value,
144+
"onUpdate:modelValue":
145+
e[2] || (e[2] = (o) => (m.value = o)),
146+
id: "one-time-code",
147+
placeholder: "2FA 验证码",
148+
class: "mb-1",
149+
autocomplete: "one-time-code",
150+
required: "",
151+
},
152+
null,
153+
8,
154+
["modelValue"]
155+
))
156+
: B("", !0),
157+
c("div", A, [
158+
x(
159+
c(
160+
"input",
161+
{
162+
type: "checkbox",
163+
id: "remember-me",
164+
"onUpdate:modelValue":
165+
e[3] || (e[3] = (o) => (f.value = o)),
166+
class: "mr-1",
167+
},
168+
null,
169+
512
170+
),
171+
[[q, f.value]]
172+
),
173+
D,
174+
]),
175+
i(C, { iconPath: v(P), label: "登录" }, null, 8, [
176+
"iconPath",
177+
]),
178+
],
179+
32
180+
),
181+
])
182+
)
183+
);
184+
},
185+
};
186+
export { G as default };

assets/Note-bdUr-t6f.js

Lines changed: 65166 additions & 450 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)