mirror of https://github.com/jetkvm/kvm.git
Compare commits
12 Commits
d03147027c
...
55a1d36b7d
| Author | SHA1 | Date |
|---|---|---|
|
|
55a1d36b7d | |
|
|
12d31a3d8e | |
|
|
57fbee1490 | |
|
|
0e65c0a9a9 | |
|
|
2dafb5c9c1 | |
|
|
566305549f | |
|
|
1505c37e4c | |
|
|
564eee9b00 | |
|
|
fab575dbe0 | |
|
|
97958e7b86 | |
|
|
2f7042df18 | |
|
|
2cadda4e00 |
|
|
@ -0,0 +1,126 @@
|
||||||
|
name: Push
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-22.04]
|
||||||
|
go: [1.21, 1.23.4]
|
||||||
|
node: [21]
|
||||||
|
goos: [linux]
|
||||||
|
goarch: [arm]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
working-directory: ui
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build UI
|
||||||
|
working-directory: ui
|
||||||
|
run: npm run build:device
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
|
||||||
|
- name: Install Go Dependencies
|
||||||
|
run: |
|
||||||
|
go mod download
|
||||||
|
|
||||||
|
- name: Build Binaries
|
||||||
|
env:
|
||||||
|
GOOS: ${{ matrix.goos }}
|
||||||
|
GOARCH: ${{ matrix.goarch }}
|
||||||
|
run: |
|
||||||
|
GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-s -w -X kvm.builtAppVersion=dev-${GIT_COMMIT:0:7}" -o bin/jetkvm_app cmd/main.go
|
||||||
|
chmod 755 bin/jetkvm_app
|
||||||
|
|
||||||
|
- name: Upload Debug Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ (github.ref == 'refs/heads/main' || github.event_name == 'pull_request') && matrix.go == '1.21' }}
|
||||||
|
with:
|
||||||
|
name: jetkvm_app_debug
|
||||||
|
path: bin/jetkvm_app
|
||||||
|
|
||||||
|
comment:
|
||||||
|
name: Comment
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Generate Links
|
||||||
|
id: linksa
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
ARTIFACT_ID=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts --jq '.artifacts[0].id')
|
||||||
|
echo "ARTIFACT_URL=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/$ARTIFACT_ID" >> $GITHUB_ENV
|
||||||
|
echo "LATEST_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Comment on PR
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
|
TITLE="${{ github.event.pull_request.title }}"
|
||||||
|
PR_NUMBER=${{ github.event.pull_request.number }}
|
||||||
|
else
|
||||||
|
TITLE="main branch"
|
||||||
|
fi
|
||||||
|
|
||||||
|
COMMENT=$(cat << EOF
|
||||||
|
✅ **Build successfully for $TITLE!**
|
||||||
|
|
||||||
|
| Name | Link |
|
||||||
|
|------------------|----------------------------------------------------------------------|
|
||||||
|
| 🔗 Debug Binary | [Download](${{ env.ARTIFACT_URL }}) |
|
||||||
|
| 🔗 Latest commit | [${{ env.LATEST_COMMIT }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) |
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
# Post Comment
|
||||||
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
|
# Look for an existing comment
|
||||||
|
COMMENT_ID=$(gh api repos/${{ github.repository }}/issues/$PR_NUMBER/comments \
|
||||||
|
--jq '.[] | select(.body | contains("✅ **Build successfully for")) | .id')
|
||||||
|
|
||||||
|
if [ -z "$COMMENT_ID" ]; then
|
||||||
|
# Create a new comment if none exists
|
||||||
|
gh pr comment $PR_NUMBER --body "$COMMENT"
|
||||||
|
else
|
||||||
|
# Update the existing comment
|
||||||
|
gh api repos/${{ github.repository }}/issues/comments/$COMMENT_ID \
|
||||||
|
--method PATCH \
|
||||||
|
-f body="$COMMENT"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Log the comment for main branch
|
||||||
|
echo "$COMMENT"
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 21
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
working-directory: ui
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build UI
|
||||||
|
working-directory: ui
|
||||||
|
run: npm run build:device
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: 1.21
|
||||||
|
|
||||||
|
- name: Build Release Binaries
|
||||||
|
env:
|
||||||
|
REF: ${{ github.ref }}
|
||||||
|
run: |
|
||||||
|
GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-s -w -X kvm.builtAppVersion=${REF:11}" -o bin/jetkvm_app cmd/main.go
|
||||||
|
chmod 755 bin/jetkvm_app
|
||||||
|
|
||||||
|
- name: Create checksum
|
||||||
|
env:
|
||||||
|
REF: ${{ github.ref }}
|
||||||
|
run: |
|
||||||
|
SUM=$(shasum -a 256 bin/jetkvm_app | cut -d ' ' -f 1)
|
||||||
|
echo -e "\n#### SHA256 Checksum\n\`\`\`\n$SUM bin/jetkvm_app\n\`\`\`\n" >> ./RELEASE_CHANGELOG
|
||||||
|
echo -e "$SUM bin/jetkvm_app\n" > checksums.txt
|
||||||
|
|
||||||
|
- name: Create Release Branch
|
||||||
|
env:
|
||||||
|
REF: ${{ github.ref }}
|
||||||
|
run: |
|
||||||
|
BRANCH=release/${REF:10}
|
||||||
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
git checkout -b ${BRANCH}
|
||||||
|
git push -u origin ${BRANCH}
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
draft: true
|
||||||
|
prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
|
||||||
|
body_path: ./RELEASE_CHANGELOG
|
||||||
|
|
||||||
|
- name: Upload JetKVM binary
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: bin/jetkvm_app
|
||||||
|
asset_name: jetkvm_app
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
- name: Upload checksum
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./checksums.txt
|
||||||
|
asset_name: checksums.txt
|
||||||
|
asset_content_type: text/plain
|
||||||
|
|
@ -27,5 +27,6 @@ import { fr_FR } from "@/keyboardLayouts/fr_FR"
|
||||||
import { it_IT } from "@/keyboardLayouts/it_IT"
|
import { it_IT } from "@/keyboardLayouts/it_IT"
|
||||||
import { nb_NO } from "@/keyboardLayouts/nb_NO"
|
import { nb_NO } from "@/keyboardLayouts/nb_NO"
|
||||||
import { sv_SE } from "@/keyboardLayouts/sv_SE"
|
import { sv_SE } from "@/keyboardLayouts/sv_SE"
|
||||||
|
import { da_DK } from "@/keyboardLayouts/da_DK"
|
||||||
|
|
||||||
export const keyboards: KeyboardLayout[] = [ cs_CZ, de_CH, de_DE, en_UK, en_US, es_ES, fr_BE, fr_CH, fr_FR, it_IT, nb_NO, sv_SE ];
|
export const keyboards: KeyboardLayout[] = [ cs_CZ, de_CH, de_DE, en_UK, en_US, es_ES, fr_BE, fr_CH, fr_FR, it_IT, nb_NO, sv_SE, da_DK ];
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,187 @@
|
||||||
|
import { KeyboardLayout, KeyCombo } from "../keyboardLayouts"
|
||||||
|
|
||||||
|
import { en_US } from "./en_US" // for fallback of keyDisplayMap, modifierDisplayMap, and virtualKeyboard
|
||||||
|
|
||||||
|
export const name = "Dansk";
|
||||||
|
const isoCode = "da-DK";
|
||||||
|
|
||||||
|
const keyTrema = { key: "BracketRight" }
|
||||||
|
const keyAcute = { key: "Equal", altRight: true }
|
||||||
|
const keyHat = { key: "BracketRight", shift: true }
|
||||||
|
const keyGrave = { key: "Equal", shift: true }
|
||||||
|
const keyTilde = { key: "BracketRight", altRight: true }
|
||||||
|
|
||||||
|
export const chars = {
|
||||||
|
A: { key: "KeyA", shift: true },
|
||||||
|
"Ä": { key: "KeyA", shift: true, accentKey: keyTrema },
|
||||||
|
"Á": { key: "KeyA", shift: true, accentKey: keyAcute },
|
||||||
|
"Â": { key: "KeyA", shift: true, accentKey: keyHat },
|
||||||
|
"À": { key: "KeyA", shift: true, accentKey: keyGrave },
|
||||||
|
"Ã": { key: "KeyA", shift: true, accentKey: keyTilde },
|
||||||
|
B: { key: "KeyB", shift: true },
|
||||||
|
C: { key: "KeyC", shift: true },
|
||||||
|
D: { key: "KeyD", shift: true },
|
||||||
|
E: { key: "KeyE", shift: true },
|
||||||
|
"Ë": { key: "KeyE", shift: true, accentKey: keyTrema },
|
||||||
|
"É": { key: "KeyE", shift: true, accentKey: keyAcute },
|
||||||
|
"Ê": { key: "KeyE", shift: true, accentKey: keyHat },
|
||||||
|
"È": { key: "KeyE", shift: true, accentKey: keyGrave },
|
||||||
|
"Ẽ": { key: "KeyE", shift: true, accentKey: keyTilde },
|
||||||
|
F: { key: "KeyF", shift: true },
|
||||||
|
G: { key: "KeyG", shift: true },
|
||||||
|
H: { key: "KeyH", shift: true },
|
||||||
|
I: { key: "KeyI", shift: true },
|
||||||
|
"Ï": { key: "KeyI", shift: true, accentKey: keyTrema },
|
||||||
|
"Í": { key: "KeyI", shift: true, accentKey: keyAcute },
|
||||||
|
"Î": { key: "KeyI", shift: true, accentKey: keyHat },
|
||||||
|
"Ì": { key: "KeyI", shift: true, accentKey: keyGrave },
|
||||||
|
"Ĩ": { key: "KeyI", shift: true, accentKey: keyTilde },
|
||||||
|
J: { key: "KeyJ", shift: true },
|
||||||
|
K: { key: "KeyK", shift: true },
|
||||||
|
L: { key: "KeyL", shift: true },
|
||||||
|
M: { key: "KeyM", shift: true },
|
||||||
|
N: { key: "KeyN", shift: true },
|
||||||
|
O: { key: "KeyO", shift: true },
|
||||||
|
"Ö": { key: "KeyO", shift: true, accentKey: keyTrema },
|
||||||
|
"Ó": { key: "KeyO", shift: true, accentKey: keyAcute },
|
||||||
|
"Ô": { key: "KeyO", shift: true, accentKey: keyHat },
|
||||||
|
"Ò": { key: "KeyO", shift: true, accentKey: keyGrave },
|
||||||
|
"Õ": { key: "KeyO", shift: true, accentKey: keyTilde },
|
||||||
|
P: { key: "KeyP", shift: true },
|
||||||
|
Q: { key: "KeyQ", shift: true },
|
||||||
|
R: { key: "KeyR", shift: true },
|
||||||
|
S: { key: "KeyS", shift: true },
|
||||||
|
T: { key: "KeyT", shift: true },
|
||||||
|
U: { key: "KeyU", shift: true },
|
||||||
|
"Ü": { key: "KeyU", shift: true, accentKey: keyTrema },
|
||||||
|
"Ú": { key: "KeyU", shift: true, accentKey: keyAcute },
|
||||||
|
"Û": { key: "KeyU", shift: true, accentKey: keyHat },
|
||||||
|
"Ù": { key: "KeyU", shift: true, accentKey: keyGrave },
|
||||||
|
"Ũ": { key: "KeyU", shift: true, accentKey: keyTilde },
|
||||||
|
V: { key: "KeyV", shift: true },
|
||||||
|
W: { key: "KeyW", shift: true },
|
||||||
|
X: { key: "KeyX", shift: true },
|
||||||
|
Y: { key: "KeyY", shift: true },
|
||||||
|
Z: { key: "KeyZ", shift: true },
|
||||||
|
a: { key: "KeyA" },
|
||||||
|
"ä": { key: "KeyA", accentKey: keyTrema },
|
||||||
|
"á": { key: "KeyA", accentKey: keyAcute },
|
||||||
|
"â": { key: "KeyA", accentKey: keyHat },
|
||||||
|
"à": { key: "KeyA", accentKey: keyGrave },
|
||||||
|
"ã": { key: "KeyA", accentKey: keyTilde },
|
||||||
|
b: { key: "KeyB" },
|
||||||
|
c: { key: "KeyC" },
|
||||||
|
d: { key: "KeyD" },
|
||||||
|
e: { key: "KeyE" },
|
||||||
|
"ë": { key: "KeyE", accentKey: keyTrema },
|
||||||
|
"é": { key: "KeyE", accentKey: keyAcute },
|
||||||
|
"ê": { key: "KeyE", accentKey: keyHat },
|
||||||
|
"è": { key: "KeyE", accentKey: keyGrave },
|
||||||
|
"ẽ": { key: "KeyE", accentKey: keyTilde },
|
||||||
|
"€": { key: "KeyE", altRight: true },
|
||||||
|
f: { key: "KeyF" },
|
||||||
|
g: { key: "KeyG" },
|
||||||
|
h: { key: "KeyH" },
|
||||||
|
i: { key: "KeyI" },
|
||||||
|
"ï": { key: "KeyI", accentKey: keyTrema },
|
||||||
|
"í": { key: "KeyI", accentKey: keyAcute },
|
||||||
|
"î": { key: "KeyI", accentKey: keyHat },
|
||||||
|
"ì": { key: "KeyI", accentKey: keyGrave },
|
||||||
|
"ĩ": { key: "KeyI", accentKey: keyTilde },
|
||||||
|
j: { key: "KeyJ" },
|
||||||
|
k: { key: "KeyK" },
|
||||||
|
l: { key: "KeyL" },
|
||||||
|
m: { key: "KeyM" },
|
||||||
|
n: { key: "KeyN" },
|
||||||
|
o: { key: "KeyO" },
|
||||||
|
"ö": { key: "KeyO", accentKey: keyTrema },
|
||||||
|
"ó": { key: "KeyO", accentKey: keyAcute },
|
||||||
|
"ô": { key: "KeyO", accentKey: keyHat },
|
||||||
|
"ò": { key: "KeyO", accentKey: keyGrave },
|
||||||
|
"õ": { key: "KeyO", accentKey: keyTilde },
|
||||||
|
p: { key: "KeyP" },
|
||||||
|
q: { key: "KeyQ" },
|
||||||
|
r: { key: "KeyR" },
|
||||||
|
s: { key: "KeyS" },
|
||||||
|
t: { key: "KeyT" },
|
||||||
|
u: { key: "KeyU" },
|
||||||
|
"ü": { key: "KeyU", accentKey: keyTrema },
|
||||||
|
"ú": { key: "KeyU", accentKey: keyAcute },
|
||||||
|
"û": { key: "KeyU", accentKey: keyHat },
|
||||||
|
"ù": { key: "KeyU", accentKey: keyGrave },
|
||||||
|
"ũ": { key: "KeyU", accentKey: keyTilde },
|
||||||
|
v: { key: "KeyV" },
|
||||||
|
w: { key: "KeyW" },
|
||||||
|
x: { key: "KeyX" },
|
||||||
|
y: { key: "KeyY" }, // <-- corrected
|
||||||
|
z: { key: "KeyZ" }, // <-- corrected
|
||||||
|
"½": { key: "Backquote" },
|
||||||
|
"§": { key: "Backquote", shift: true },
|
||||||
|
1: { key: "Digit1" },
|
||||||
|
"!": { key: "Digit1", shift: true },
|
||||||
|
2: { key: "Digit2" },
|
||||||
|
"\"": { key: "Digit2", shift: true },
|
||||||
|
"@": { key: "Digit2", altRight: true },
|
||||||
|
3: { key: "Digit3" },
|
||||||
|
"#": { key: "Digit3", shift: true },
|
||||||
|
"£": { key: "Digit3", altRight: true },
|
||||||
|
4: { key: "Digit4" },
|
||||||
|
"¤": { key: "Digit4", shift: true },
|
||||||
|
"$": { key: "Digit4", altRight: true },
|
||||||
|
5: { key: "Digit5" },
|
||||||
|
"%": { key: "Digit5", shift: true },
|
||||||
|
6: { key: "Digit6" },
|
||||||
|
"&": { key: "Digit6", shift: true },
|
||||||
|
7: { key: "Digit7" },
|
||||||
|
"/": { key: "Digit7", shift: true },
|
||||||
|
"{": { key: "Digit7", altRight: true },
|
||||||
|
8: { key: "Digit8" },
|
||||||
|
"(": { key: "Digit8", shift: true },
|
||||||
|
"[": { key: "Digit8", altRight: true },
|
||||||
|
9: { key: "Digit9" },
|
||||||
|
")": { key: "Digit9", shift: true },
|
||||||
|
"]": { key: "Digit9", altRight: true },
|
||||||
|
0: { key: "Digit0" },
|
||||||
|
"=": { key: "Digit0", shift: true },
|
||||||
|
"}": { key: "Digit0", altRight: true },
|
||||||
|
"+": { key: "Minus" },
|
||||||
|
"?": { key: "Minus", shift: true },
|
||||||
|
"\\": { key: "Equal" },
|
||||||
|
"å": { key: "BracketLeft" },
|
||||||
|
"Å": { key: "BracketLeft", shift: true },
|
||||||
|
"ø": { key: "Semicolon" },
|
||||||
|
"Ø": { key: "Semicolon", shift: true },
|
||||||
|
"æ": { key: "Quote" },
|
||||||
|
"Æ": { key: "Quote", shift: true },
|
||||||
|
"'": { key: "Backslash" },
|
||||||
|
"*": { key: "Backslash", shift: true },
|
||||||
|
",": { key: "Comma" },
|
||||||
|
";": { key: "Comma", shift: true },
|
||||||
|
".": { key: "Period" },
|
||||||
|
":": { key: "Period", shift: true },
|
||||||
|
"-": { key: "Slash" },
|
||||||
|
"_": { key: "Slash", shift: true },
|
||||||
|
"<": { key: "IntlBackslash" },
|
||||||
|
">": { key: "IntlBackslash", shift: true },
|
||||||
|
"~": { key: "BracketRight", deadKey: true, altRight: true },
|
||||||
|
"^": { key: "BracketRight", deadKey: true, shift: true },
|
||||||
|
"¨": { key: "BracketRight", deadKey: true, },
|
||||||
|
"|": { key: "Equal", deadKey: true, altRight: true},
|
||||||
|
"`": { key: "Equal", deadKey: true, shift: true, },
|
||||||
|
"´": { key: "Equal", deadKey: true, },
|
||||||
|
" ": { key: "Space" },
|
||||||
|
"\n": { key: "Enter" },
|
||||||
|
Enter: { key: "Enter" },
|
||||||
|
Tab: { key: "Tab" },
|
||||||
|
|
||||||
|
} as Record<string, KeyCombo>;
|
||||||
|
|
||||||
|
export const da_DK: KeyboardLayout = {
|
||||||
|
isoCode: isoCode,
|
||||||
|
name: name,
|
||||||
|
chars: chars,
|
||||||
|
// TODO need to localize these maps and layouts
|
||||||
|
keyDisplayMap: en_US.keyDisplayMap,
|
||||||
|
modifierDisplayMap: en_US.modifierDisplayMap,
|
||||||
|
virtualKeyboard: en_US.virtualKeyboard
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue