Compare commits

...

3 Commits

Author SHA1 Message Date
KOWX712
0a9750902d misc: update .extra 2025-07-28 13:10:34 +08:00
KOWX712
2f5dd03530 opt: refine rtl related code 2025-07-26 00:41:36 +08:00
KOWX712
3d9d2843fe misc: drop unknown key generation workflow
branch will be removed in next release, all unknown keybox user should update to v4.0 or newer version
2025-07-25 18:56:26 +08:00
10 changed files with 61 additions and 110 deletions

2
.extra

File diff suppressed because one or more lines are too long

View File

@@ -1,35 +0,0 @@
name: generate
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: 'bot'
- name: Generate and encode
run: |
curl -Ls https://raw.githubusercontent.com/KOWX712/keyboxGenerator/main/keyboxGenerator_v2.0.py | python3
base64 -w 0 "keybox.xml" | xxd -p | tr -d '\n' > .device
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .device
LAST_COMMIT_MSG=$(git log -1 --pretty=%B)
if [[ "$LAST_COMMIT_MSG" == "Update .device" ]]; then
git commit --amend --no-edit
git push --force
else
git commit -m "Update .device"
git push
fi

View File

@@ -101,23 +101,8 @@ export async function loadTranslations() {
// Support for rtl language
const isRTL = rtlLang.includes(lang.split('-')[0]);
if (isRTL) {
document.documentElement.setAttribute('dir', 'rtl');
document.documentElement.setAttribute('lang', lang);
// Load extra rtl css
fetch('styles/rtl_styles.css')
.then(res => res.text())
.then(css => {
const style = document.createElement('style');
style.textContent = css;
document.head.appendChild(style);
});
} else {
document.documentElement.setAttribute('dir', 'ltr');
document.documentElement.setAttribute('lang', lang);
}
document.documentElement.setAttribute('dir', isRTL ? 'rtl' : 'ltr');
// Generate language menu
await generateLanguageMenu();
} catch (error) {

View File

@@ -72,6 +72,11 @@
}
}
[dir="rtl"] .link-icon svg {
padding-right: unset;
padding-left: 3px;
}
#telegram {
background-color: #38A7ED;
}

View File

@@ -240,6 +240,11 @@
position: relative;
}
[dir="rtl"] .app-icon-container {
margin-right: unset;
margin-left: 10px;
}
.loader {
position: absolute;
top: 0;

View File

@@ -79,6 +79,11 @@
}
}
[dir="rtl"] .file-item svg {
margin-right: unset;
margin-left: 10px;
}
.file-item span {
flex-grow: 1;
overflow: hidden;

View File

@@ -111,6 +111,11 @@ body {
user-select: none;
}
[dir="rtl"] .close-btn {
right: unset;
left: 12px;
}
.prompt {
position: fixed;
bottom: 0;

View File

@@ -26,6 +26,12 @@
font-weight: bold;
}
[dir="rtl"] #module-version,
[dir="rtl"] #title {
padding-left: unset;
padding-right: 5px;
}
.no-connection {
height: 100%;
display: flex;
@@ -45,6 +51,11 @@
display: inline-block;
}
[dir="rtl"] .language-dropdown {
margin-left: unset;
margin-right: auto;
}
.language-button {
height: 100%;
display: flex;
@@ -76,6 +87,12 @@
transition: all 0.2s ease;
}
[dir="rtl"] .language-menu {
right: unset;
left: 5px;
transform-origin: top left;
}
.language-menu.show {
opacity: 1;
transform: translateY(0) scale(1);

View File

@@ -1,57 +0,0 @@
#module-version,
#title {
padding-left: unset;
padding-right: 5px;
}
.language-dropdown {
margin-left: unset;
margin-right: auto;
}
.language-menu {
right: unset;
left: 5px;
transform-origin: top left;
}
.close-btn {
right: unset;
left: 12px;
}
.search-icon {
left: unset;
right: 15px;
}
.search-card {
left: unset;
right: 0;
}
.menu {
right: unset;
left: 0;
}
.menu-options {
right: unset;
left: 0;
transform: translateX(-120%);
}
.app-icon-container {
margin-right: unset;
margin-left: 10px;
}
.link-icon svg {
padding-right: unset;
padding-left: 3px;
}
.file-item svg {
margin-right: unset;
margin-left: 10px;
}

View File

@@ -26,6 +26,11 @@
position: absolute;
}
[dir="rtl"] .search-card {
left: unset;
right: 0;
}
.search-icon {
position: absolute;
padding-top: 5px;
@@ -33,6 +38,11 @@
z-index: 1000;
}
[dir="rtl"] .search-icon {
left: unset;
right: 15px;
}
.search-input {
position: absolute;
border: none;
@@ -65,6 +75,11 @@
height: 100%;
}
[dir="rtl"] .menu {
right: unset;
left: 0;
}
.menu-toggle {
display: none;
}
@@ -113,6 +128,12 @@
user-select: none;
}
[dir="rtl"] .menu-options {
right: unset;
left: 0;
transform: translateX(-120%);
}
#select-denylist,
#security-patch {
display: none;