fix(rtl): fix file viewer Monaco direction + remove unrelated files
- Add direction: ltr to .monaco-viewer so the Monaco editor renders correctly when the document inherits dir="rtl" from Hebrew locale - Replace physical margin-left with logical margin-inline-start on the refresh button in FilesTab - Remove manifest.json (unrelated to RTL work, flagged in PR #229) - Remove docs/rtl-hebrew-deployment.md (no longer needed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Shantur Rathore
parent
88da377795
commit
0874f78ccf
@@ -1,220 +0,0 @@
|
||||
# CodeNomad — התקנה ופריסה עם תמיכת RTL + עברית
|
||||
|
||||
מדריך זה מסביר כיצד להתקין ולהפעיל את CodeNomad עם ממשק RTL ותרגום עברית מלא (`v0.12.3-rtl-he`).
|
||||
|
||||
---
|
||||
|
||||
## דרישות מוקדמות
|
||||
|
||||
* **Node.js 18+** — ההתקנה חייבת להתבצע דרך `npm` בלבד.
|
||||
|
||||
> ⚠️ **bun אינו נתמך.** השרת חייב לרוץ דרך `node`, לא `bun`.
|
||||
|
||||
* **OpenCode CLI** — נדרש לפעולת הסוכן.
|
||||
|
||||
### התקנת OpenCode
|
||||
|
||||
```
|
||||
curl -fsSL https://opencode.ai/install | bash
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 1\. התקנת CodeNomad גלובלית
|
||||
|
||||
```
|
||||
npm install -g @neuralnomads/codenomad@latest
|
||||
```
|
||||
|
||||
בדיקה:
|
||||
|
||||
```
|
||||
codenomad --version
|
||||
```
|
||||
|
||||
> אם `codenomad` אינו נמצא ב-PATH, בדוק היכן npm מתקין packages גלובליים:
|
||||
>
|
||||
> ```
|
||||
> npm prefix -g
|
||||
> # הוסף את <output>/bin ל-PATH
|
||||
> ```
|
||||
|
||||
---
|
||||
|
||||
## 2\. הגדרת אישורים
|
||||
|
||||
```
|
||||
mkdir -p ~/.config/codenomad
|
||||
cat > ~/.config/codenomad/env <<'EOF'
|
||||
CODENOMAD_SERVER_USERNAME=codenomad
|
||||
CODENOMAD_SERVER_PASSWORD=your-password
|
||||
EOF
|
||||
chmod 600 ~/.config/codenomad/env
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3\. הורדת ממשק ה-RTL+Hebrew
|
||||
|
||||
### הורדה וחילוץ
|
||||
|
||||
```
|
||||
mkdir -p ~/.config/codenomad/ui
|
||||
|
||||
curl -L https://github.com/MusiCode1/CodeNomad/releases/download/v0.12.3-rtl-he/codenomad-ui-rtl-he.zip \
|
||||
-o /tmp/codenomad-ui-rtl-he.zip
|
||||
```
|
||||
|
||||
**חילוץ עם** `**unzip**` **(מומלץ):**
|
||||
|
||||
```
|
||||
unzip -o /tmp/codenomad-ui-rtl-he.zip -d ~/.config/codenomad/ui
|
||||
```
|
||||
|
||||
**חילוץ עם** `**python3**` **(אם** `**unzip**` **אינו מותקן):**
|
||||
|
||||
```
|
||||
python3 -c "
|
||||
import zipfile, os
|
||||
with zipfile.ZipFile('/tmp/codenomad-ui-rtl-he.zip') as z:
|
||||
z.extractall(os.path.expanduser('~/.config/codenomad/ui'))
|
||||
print('Done.')
|
||||
"
|
||||
```
|
||||
|
||||
לאחר החילוץ, וודא ש-`index.html` נמצא ישירות בתיקייה:
|
||||
|
||||
```
|
||||
ls ~/.config/codenomad/ui/index.html
|
||||
```
|
||||
|
||||
> אם הקובץ נמצא ב-`ui/dist/index.html` (zip ישן), השתמש ב-`--ui-dir ~/.config/codenomad/ui/dist` במקום.
|
||||
|
||||
---
|
||||
|
||||
## 4\. הפעלה ידנית (לבדיקה)
|
||||
|
||||
```
|
||||
codenomad \
|
||||
--host 0.0.0.0 \
|
||||
--ui-dir ~/.config/codenomad/ui \
|
||||
--ui-no-update
|
||||
```
|
||||
|
||||
פתח בדפדפן: `http://<כתובת-השרת>:9899`
|
||||
|
||||
בחלון ה-UI, עבור לבורר השפות ובחר **עברית** להפעלת התרגום.
|
||||
|
||||
### אפשרות: עדכון אוטומטי של ה-UI מהמניפסט
|
||||
|
||||
במקום `--ui-dir` אפשר להשתמש ב-`--ui-manifest-url` כדי שהשרת יוריד ויעדכן את ה-UI אוטומטית:
|
||||
|
||||
```
|
||||
codenomad \
|
||||
--host 0.0.0.0 \
|
||||
--ui-manifest-url https://raw.githubusercontent.com/MusiCode1/CodeNomad/i18n-hebrew/manifest.json
|
||||
```
|
||||
|
||||
> במצב זה השרת יוריד את ה-UI בהפעלה הראשונה ויעדכן אוטומטית כשיוצאת גרסה חדשה.
|
||||
|
||||
---
|
||||
|
||||
## 5\. שירות systemd (הפעלה אוטומטית עם המערכת)
|
||||
|
||||
### יצירת קובץ השירות
|
||||
|
||||
```
|
||||
mkdir -p ~/.config/systemd/user
|
||||
```
|
||||
|
||||
מצא את נתיב ה-node וה-codenomad שלך:
|
||||
|
||||
```
|
||||
which node # למשל: /usr/bin/node
|
||||
which codenomad # למשל: /usr/local/bin/codenomad
|
||||
```
|
||||
|
||||
צור את קובץ השירות:
|
||||
|
||||
```
|
||||
cat > ~/.config/systemd/user/codenomad.service <<'EOF'
|
||||
[Unit]
|
||||
Description=CodeNomad Server (RTL + Hebrew)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
# קובץ אישורים — ראה שלב 2
|
||||
EnvironmentFile=%h/.config/codenomad/env
|
||||
|
||||
ExecStart=/usr/bin/node /usr/local/lib/node_modules/@neuralnomads/codenomad/dist/bin.js \
|
||||
--host 0.0.0.0 \
|
||||
--ui-dir %h/.config/codenomad/ui \
|
||||
--ui-no-update
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
```
|
||||
|
||||
> **חשוב:** החלף את הנתיבים בנתיבים מהפקודות `which` שהרצת למעלה.
|
||||
> נתיב הבינארי של node: `$(which node)`
|
||||
> נתיב bin.js: `$(npm prefix -g)/lib/node_modules/@neuralnomads/codenomad/dist/bin.js`
|
||||
|
||||
### הפעלת השירות
|
||||
|
||||
```
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now codenomad
|
||||
systemctl --user status codenomad
|
||||
```
|
||||
|
||||
### לוגים
|
||||
|
||||
```
|
||||
journalctl --user -u codenomad -f
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6\. הפעלה לאחר logout (שרתים ללא מסך)
|
||||
|
||||
```
|
||||
loginctl enable-linger $USER
|
||||
```
|
||||
|
||||
פקודה זו מאפשרת לשירותי המשתמש לרוץ גם כשאין session פעיל.
|
||||
|
||||
---
|
||||
|
||||
## עדכון לגרסה חדשה
|
||||
|
||||
כשיוצאת גרסה חדשה:
|
||||
|
||||
```
|
||||
# הורד את ה-UI החדש
|
||||
curl -L https://github.com/MusiCode1/CodeNomad/releases/latest/download/codenomad-ui-rtl-he.zip \
|
||||
-o /tmp/codenomad-ui-rtl-he.zip
|
||||
|
||||
rm -rf ~/.config/codenomad/ui/*
|
||||
|
||||
unzip -o /tmp/codenomad-ui-rtl-he.zip -d ~/.config/codenomad/ui
|
||||
# או: python3 -c "import zipfile,os; zipfile.ZipFile('/tmp/codenomad-ui-rtl-he.zip').extractall(os.path.expanduser('~/.config/codenomad/ui'))"
|
||||
|
||||
systemctl --user restart codenomad
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## פתרון בעיות נפוצות
|
||||
|
||||
| בעיה | פתרון |
|
||||
| --- | --- |
|
||||
| `codenomad: command not found` | הוסף `$(npm prefix -g)/bin` ל-`~/.bashrc` |
|
||||
| השירות לא עולה | בדוק נתיבים ב-`ExecStart` — חייב להיות `node`, לא `bun` |
|
||||
| הממשק לא נטען | וודא שהחלצה הצליחה: `ls ~/.config/codenomad/ui/index.html` |
|
||||
| העברית לא מופיעה | בחר את השפה ידנית מבורר השפות בממשק |
|
||||
| השרת לא נגיש מרחוק | וודא ש-`--host 0.0.0.0` מוגדר ושה-firewall פותח את פורט 9899 |
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"minServerVersion": "0.12.3",
|
||||
"latestUIVersion": "v0.12.5-rtl-he",
|
||||
"uiPackageURL": "https://github.com/MusiCode1/CodeNomad/releases/download/v0.12.5-rtl-he/codenomad-ui-rtl-he.zip",
|
||||
"sha256": "63343155a4ca58500805378a47b0279c83e4640d8998d0b7abed3bd38aef2674"
|
||||
}
|
||||
@@ -175,7 +175,7 @@ const FilesTab: Component<FilesTabProps> = (props) => {
|
||||
title={props.t("instanceShell.rightPanel.actions.refresh")}
|
||||
aria-label={props.t("instanceShell.rightPanel.actions.refresh")}
|
||||
disabled={props.browserLoading()}
|
||||
style={{ "margin-left": "auto" }}
|
||||
style={{ "margin-inline-start": "auto" }}
|
||||
onClick={() => props.onRefresh()}
|
||||
>
|
||||
<RefreshCw class={`h-4 w-4${props.browserLoading() ? " animate-spin" : ""}`} />
|
||||
|
||||
@@ -334,6 +334,7 @@
|
||||
.monaco-viewer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.file-viewer-empty {
|
||||
|
||||
Reference in New Issue
Block a user