Skip to content

Commit e7aa7d9

Browse files
committed
Improve macOS localization and admin footer
1 parent 030dbb1 commit e7aa7d9

8 files changed

Lines changed: 62 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
"$updater_asset" \
160160
"$updater_asset.sig" \
161161
"release-assets/${{ matrix.latest_name }}" \
162-
"修复 Windows 启动时终端窗口闪现"
162+
"提升用户体验"
163163
164164
- name: Prepare Windows updater metadata
165165
if: runner.os == 'Windows'
@@ -176,7 +176,7 @@ jobs:
176176
"$updater_asset" \
177177
"$updater_asset.sig" \
178178
"release-assets/${{ matrix.latest_name }}" \
179-
"修复 Windows 启动时终端窗口闪现"
179+
"提升用户体验"
180180
181181
- name: Upload workflow artifact
182182
uses: actions/upload-artifact@v4
@@ -191,5 +191,5 @@ jobs:
191191
with:
192192
files: ${{ matrix.release_artifact_path || matrix.artifact_path }}
193193
body: |
194-
修复 Windows 启动时终端窗口闪现
194+
提升用户体验
195195
prerelease: ${{ contains(github.ref_name, 'rc') }}

public/admin.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ <h2>共享列表</h2>
7070
</section>
7171
</main>
7272

73+
<footer class="admin-footer">
74+
<span>QQ群:1079340875</span>
75+
<span>Email:<a href="mailto:ft93923@gmail.com">ft93923@gmail.com</a></span>
76+
</footer>
77+
7378
<dialog id="textDialog" class="modal" data-focus="#textContent">
7479
<form method="dialog" class="modal-shell">
7580
<div class="modal-head">

public/app.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,6 @@
905905
if (action === 'delete' && state.role === 'admin') {
906906
try {
907907
await request(`/api/items/${id}`, { method: 'DELETE' });
908-
showToast('已移除共享项', 'success');
909908
} catch (error) {
910909
showToast(String(error), 'error');
911910
}

public/styles.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,40 @@ body:not(.server-stopped) .server-form button:hover {
713713
pointer-events: none;
714714
}
715715

716+
.admin-footer {
717+
display: flex;
718+
position: fixed;
719+
left: 50%;
720+
bottom: 10px;
721+
z-index: 4;
722+
transform: translateX(-50%);
723+
justify-content: center;
724+
gap: 18px;
725+
padding: 4px 12px;
726+
border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
727+
border-radius: 999px;
728+
background: color-mix(in srgb, var(--surface-overlay) 86%, transparent);
729+
box-shadow: var(--shadow-sm);
730+
color: var(--text-faint);
731+
font-size: 12px;
732+
line-height: 1.5;
733+
transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
734+
}
735+
736+
.admin-footer a {
737+
color: inherit;
738+
text-decoration: none;
739+
}
740+
741+
.admin-footer a:hover {
742+
color: var(--accent);
743+
}
744+
745+
.server-stopped .admin-footer {
746+
opacity: 0;
747+
visibility: hidden;
748+
}
749+
716750
.stack {
717751
display: grid;
718752
gap: 10px;
@@ -1208,6 +1242,15 @@ pre {
12081242
min-width: 0;
12091243
}
12101244

1245+
.admin-footer {
1246+
flex-direction: column;
1247+
align-items: center;
1248+
gap: 2px;
1249+
width: min(320px, calc(100% - 24px));
1250+
padding: 5px 10px;
1251+
border-radius: 12px;
1252+
}
1253+
12111254
.client-share {
12121255
grid-template-columns: 74px minmax(0, 1fr);
12131256
width: 100%;

src-tauri/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CFBundleAllowMixedLocalizations</key>
6+
<true/>
7+
<key>CFBundleDevelopmentRegion</key>
8+
<string>zh_CN</string>
59
<key>CFBundleIconFile</key>
610
<string>icon.icns</string>
711
<key>NSHumanReadableCopyright</key>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CFBundleDisplayName = "FileShare";
2+
CFBundleName = "FileShare";

src-tauri/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ struct AdminFileDropPayload {
5252
#[tauri::command]
5353
fn pick_admin_files() -> Result<Vec<String>, String> {
5454
let files = rfd::FileDialog::new()
55+
.set_title("选择要共享的文件")
5556
.set_directory(dirs::home_dir().unwrap_or_else(std::env::temp_dir))
5657
.pick_files()
5758
.unwrap_or_default();
@@ -66,6 +67,7 @@ fn pick_admin_files() -> Result<Vec<String>, String> {
6667
async fn download_admin_file(id: String) -> Result<(), String> {
6768
let suggested_name = server::download_filename(&id).await?;
6869
let target = rfd::FileDialog::new()
70+
.set_title("保存文件")
6971
.set_file_name(&suggested_name)
7072
.save_file();
7173

src-tauri/tauri.conf.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
"active": true,
3131
"targets": "all",
3232
"createUpdaterArtifacts": true,
33+
"resources": [
34+
"infoplist/"
35+
],
3336
"icon": [
3437
"icons/32x32.png",
3538
"icons/128x128.png",

0 commit comments

Comments
 (0)