diff --git a/.github/update.log b/.github/update.log index 49c24116a3..1a578d5b0d 100644 --- a/.github/update.log +++ b/.github/update.log @@ -702,3 +702,4 @@ Update On Wed Jul 10 20:35:20 CEST 2024 Update On Thu Jul 11 20:30:51 CEST 2024 Update On Fri Jul 12 20:34:05 CEST 2024 Update On Sat Jul 13 20:28:46 CEST 2024 +Update On Sun Jul 14 20:40:18 CEST 2024 diff --git a/clash-nyanpasu/frontend/nyanpasu/package.json b/clash-nyanpasu/frontend/nyanpasu/package.json index b7117ac3b9..ac9d09658c 100644 --- a/clash-nyanpasu/frontend/nyanpasu/package.json +++ b/clash-nyanpasu/frontend/nyanpasu/package.json @@ -28,7 +28,7 @@ "country-code-emoji": "2.3.0", "dayjs": "1.11.11", "framer-motion": "12.0.0-alpha.0", - "i18next": "23.11.5", + "i18next": "23.12.1", "jotai": "2.9.0", "material-react-table": "2.13.0", "monaco-editor": "0.50.0", diff --git a/clash-nyanpasu/pnpm-lock.yaml b/clash-nyanpasu/pnpm-lock.yaml index 82e9571a01..d3c3c70a08 100644 --- a/clash-nyanpasu/pnpm-lock.yaml +++ b/clash-nyanpasu/pnpm-lock.yaml @@ -222,8 +222,8 @@ importers: specifier: 12.0.0-alpha.0 version: 12.0.0-alpha.0(@emotion/is-prop-valid@1.2.2)(react-dom@19.0.0-rc-df783f9ea1-20240708(react@19.0.0-rc-df783f9ea1-20240708))(react@19.0.0-rc-df783f9ea1-20240708) i18next: - specifier: 23.11.5 - version: 23.11.5 + specifier: 23.12.1 + version: 23.12.1 jotai: specifier: 2.9.0 version: 2.9.0(react@19.0.0-rc-df783f9ea1-20240708)(types-react@19.0.0-rc.1) @@ -253,7 +253,7 @@ importers: version: 7.0.1(7cllkcphevtaad3vgre6vmruby) react-i18next: specifier: 14.1.2 - version: 14.1.2(i18next@23.11.5)(react-dom@19.0.0-rc-df783f9ea1-20240708(react@19.0.0-rc-df783f9ea1-20240708))(react@19.0.0-rc-df783f9ea1-20240708) + version: 14.1.2(i18next@23.12.1)(react-dom@19.0.0-rc-df783f9ea1-20240708(react@19.0.0-rc-df783f9ea1-20240708))(react@19.0.0-rc-df783f9ea1-20240708) react-markdown: specifier: 9.0.1 version: 9.0.1(react@19.0.0-rc-df783f9ea1-20240708)(types-react@19.0.0-rc.1) @@ -365,7 +365,7 @@ importers: version: 4.0.13(react@19.0.0-rc-df783f9ea1-20240708) react-i18next: specifier: 14.1.2 - version: 14.1.2(i18next@23.11.5)(react-dom@19.0.0-rc-df783f9ea1-20240708(react@19.0.0-rc-df783f9ea1-20240708))(react@19.0.0-rc-df783f9ea1-20240708) + version: 14.1.2(i18next@23.12.1)(react-dom@19.0.0-rc-df783f9ea1-20240708(react@19.0.0-rc-df783f9ea1-20240708))(react@19.0.0-rc-df783f9ea1-20240708) devDependencies: clsx: specifier: 2.1.1 @@ -3687,8 +3687,8 @@ packages: engines: {node: '>=18'} hasBin: true - i18next@23.11.5: - resolution: {integrity: sha512-41pvpVbW9rhZPk5xjCX2TPJi2861LEig/YRhUkY+1FQ2IQPS0bKUDYnEqY8XPPbB48h1uIwLnP9iiEfuSl20CA==} + i18next@23.12.1: + resolution: {integrity: sha512-l4y291ZGRgUhKuqVSiqyuU2DDzxKStlIWSaoNBR4grYmh0X+pRYbFpTMs3CnJ5ECKbOI8sQcJ3PbTUfLgPRaMA==} iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} @@ -9477,9 +9477,9 @@ snapshots: husky@9.0.11: {} - i18next@23.11.5: + i18next@23.12.1: dependencies: - '@babel/runtime': 7.24.5 + '@babel/runtime': 7.24.7 iconv-lite@0.6.3: dependencies: @@ -10780,11 +10780,11 @@ snapshots: dependencies: react: 19.0.0-rc-df783f9ea1-20240708 - react-i18next@14.1.2(i18next@23.11.5)(react-dom@19.0.0-rc-df783f9ea1-20240708(react@19.0.0-rc-df783f9ea1-20240708))(react@19.0.0-rc-df783f9ea1-20240708): + react-i18next@14.1.2(i18next@23.12.1)(react-dom@19.0.0-rc-df783f9ea1-20240708(react@19.0.0-rc-df783f9ea1-20240708))(react@19.0.0-rc-df783f9ea1-20240708): dependencies: '@babel/runtime': 7.24.5 html-parse-stringify: 3.0.1 - i18next: 23.11.5 + i18next: 23.12.1 react: 19.0.0-rc-df783f9ea1-20240708 optionalDependencies: react-dom: 19.0.0-rc-df783f9ea1-20240708(react@19.0.0-rc-df783f9ea1-20240708) diff --git a/clash-verge-rev/src/components/setting/mods/sysproxy-viewer.tsx b/clash-verge-rev/src/components/setting/mods/sysproxy-viewer.tsx index 5d00f62d1d..35d277fed6 100644 --- a/clash-verge-rev/src/components/setting/mods/sysproxy-viewer.tsx +++ b/clash-verge-rev/src/components/setting/mods/sysproxy-viewer.tsx @@ -1,4 +1,4 @@ -import { forwardRef, useImperativeHandle, useState } from "react"; +import { forwardRef, useImperativeHandle, useMemo, useState } from "react"; import { useLockFn } from "ahooks"; import { useTranslation } from "react-i18next"; import { @@ -23,16 +23,38 @@ const DEFAULT_PAC = `function FindProxyForURL(url, host) { return "PROXY 127.0.0.1:%mixed-port%; SOCKS5 127.0.0.1:%mixed-port%; DIRECT;"; }`; +/** NO_PROXY validation */ + +// *., cdn*., *, etc. +const domain_subdomain_part = String.raw`(?:[a-z0-9\-\*]+\.|\*)*`; +// .*, .cn, .moe, .co*, * +const domain_tld_part = String.raw`(?:\w{2,64}\*?|\*)`; +// *epicgames*, *skk.moe, *.skk.moe, skk.*, sponsor.cdn.skk.moe, *.*, etc. +// also matches 192.168.*, 10.*, 127.0.0.*, etc. (partial ipv4) +const rDomainSimple = domain_subdomain_part + domain_tld_part; + +const ipv4_part = String.raw`\d{1,3}`; +// 127.0.0.1 (full ipv4) +const rIPv4 = String.raw`(?:${ipv4_part}\.){3}${ipv4_part}`; +// const rIPv4Partial = String.raw`${ipv4_part}\.(?:(?:${ipv4_part}|\*)\.){0,2}\.\*`; + +const ipv6_part = "(?:[a-fA-F0-9:])+"; +const rIPv6 = `(?:${ipv6_part}:+)+${ipv6_part}`; + +const rLocal = `localhost||localdomain`; +const rValidPart = `${rDomainSimple}|${rIPv4}|${rIPv6}|${rLocal}`; + +const getValidReg = (isWindows: boolean) => { + const separator = isWindows ? ";" : ","; + const rValid = String.raw`^(${rValidPart})(?:${separator}\s?(${rValidPart}))*${separator}?$`; + + return new RegExp(rValid); +}; + export const SysproxyViewer = forwardRef((props, ref) => { const { t } = useTranslation(); - let validReg; - if (getSystem() === "windows") { - validReg = - /^((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|)(;((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|))*;?$/; - } else { - validReg = - /^((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|)(,((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|))*,?$/; - } + const isWindows = getSystem() === "windows"; + const validReg = useMemo(() => getValidReg(isWindows), [isWindows]); const [open, setOpen] = useState(false); const [editorOpen, setEditorOpen] = useState(false); @@ -220,6 +242,7 @@ export const SysproxyViewer = forwardRef((props, ref) => { +} --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c -@@ -374,14 +374,41 @@ static int __init init_jffs2_fs(void) +@@ -375,14 +375,41 @@ static int __init init_jffs2_fs(void) BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68); BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32); diff --git a/lede/target/linux/mediatek/patches-6.1/041-block-fit-partition-parser.patch b/lede/target/linux/mediatek/patches-6.1/041-block-fit-partition-parser.patch index bb87c20a91..3cef80d836 100644 --- a/lede/target/linux/mediatek/patches-6.1/041-block-fit-partition-parser.patch +++ b/lede/target/linux/mediatek/patches-6.1/041-block-fit-partition-parser.patch @@ -19,7 +19,7 @@ Subject: [PATCH] kernel: add block fit partition parser --- a/block/blk.h +++ b/block/blk.h -@@ -414,6 +414,8 @@ void blk_free_ext_minor(unsigned int min +@@ -415,6 +415,8 @@ void blk_free_ext_minor(unsigned int min #define ADDPART_FLAG_NONE 0 #define ADDPART_FLAG_RAID 1 #define ADDPART_FLAG_WHOLEDISK 2 diff --git a/lede/target/linux/mediatek/patches-6.1/104-mt7622-add-snor-irq.patch b/lede/target/linux/mediatek/patches-6.1/104-mt7622-add-snor-irq.patch index 0d9c91f44d..d15d989e97 100644 --- a/lede/target/linux/mediatek/patches-6.1/104-mt7622-add-snor-irq.patch +++ b/lede/target/linux/mediatek/patches-6.1/104-mt7622-add-snor-irq.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -578,6 +578,7 @@ +@@ -575,6 +575,7 @@ compatible = "mediatek,mt7622-nor", "mediatek,mt8173-nor"; reg = <0 0x11014000 0 0xe0>; diff --git a/lede/target/linux/mediatek/patches-6.1/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch b/lede/target/linux/mediatek/patches-6.1/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch index 1e04d23a0e..9da8ffe325 100644 --- a/lede/target/linux/mediatek/patches-6.1/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch +++ b/lede/target/linux/mediatek/patches-6.1/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch @@ -95,7 +95,7 @@ Signed-off-by: Daniel Golle --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -346,7 +346,7 @@ +@@ -344,7 +344,7 @@ #interrupt-cells = <3>; interrupt-parent = <&gic>; reg = <0 0x10310000 0 0x1000>, diff --git a/lede/target/linux/mediatek/patches-6.1/432-drivers-spi-Add-support-for-dynamic-calibration.patch b/lede/target/linux/mediatek/patches-6.1/432-drivers-spi-Add-support-for-dynamic-calibration.patch index b2c9df4386..10e528dba8 100644 --- a/lede/target/linux/mediatek/patches-6.1/432-drivers-spi-Add-support-for-dynamic-calibration.patch +++ b/lede/target/linux/mediatek/patches-6.1/432-drivers-spi-Add-support-for-dynamic-calibration.patch @@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1385,6 +1385,70 @@ static int spi_transfer_wait(struct spi_ +@@ -1389,6 +1389,70 @@ static int spi_transfer_wait(struct spi_ return 0; } @@ -82,7 +82,7 @@ Signed-off-by: SkyLake.Huang static void _spi_transfer_delay_ns(u32 ns) { if (!ns) -@@ -2223,6 +2287,75 @@ void spi_flush_queue(struct spi_controll +@@ -2227,6 +2291,75 @@ void spi_flush_queue(struct spi_controll /*-------------------------------------------------------------------------*/ #if defined(CONFIG_OF) @@ -158,7 +158,7 @@ Signed-off-by: SkyLake.Huang static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, struct device_node *nc) { -@@ -2341,6 +2474,10 @@ of_register_spi_device(struct spi_contro +@@ -2345,6 +2478,10 @@ of_register_spi_device(struct spi_contro if (rc) goto err_out; @@ -212,7 +212,7 @@ Signed-off-by: SkyLake.Huang static inline struct spi_driver *to_spi_driver(struct device_driver *drv) { return drv ? container_of(drv, struct spi_driver, driver) : NULL; -@@ -703,6 +737,11 @@ struct spi_controller { +@@ -712,6 +746,11 @@ struct spi_controller { void *dummy_rx; void *dummy_tx; @@ -224,7 +224,7 @@ Signed-off-by: SkyLake.Huang int (*fw_translate_cs)(struct spi_controller *ctlr, unsigned cs); /* -@@ -1510,6 +1549,9 @@ spi_register_board_info(struct spi_board +@@ -1555,6 +1594,9 @@ spi_register_board_info(struct spi_board { return 0; } #endif diff --git a/lede/target/linux/mediatek/patches-6.1/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch b/lede/target/linux/mediatek/patches-6.1/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch index bf479ab53b..d58082aa6f 100644 --- a/lede/target/linux/mediatek/patches-6.1/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch +++ b/lede/target/linux/mediatek/patches-6.1/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -849,6 +849,12 @@ +@@ -844,6 +844,12 @@ #address-cells = <0>; #interrupt-cells = <1>; }; @@ -13,7 +13,7 @@ }; pcie1: pcie@1a145000 { -@@ -887,6 +893,12 @@ +@@ -882,6 +888,12 @@ #address-cells = <0>; #interrupt-cells = <1>; }; diff --git a/lede/target/linux/mediatek/patches-6.1/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch b/lede/target/linux/mediatek/patches-6.1/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch index 76ee2fc89a..a3247f1779 100644 --- a/lede/target/linux/mediatek/patches-6.1/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch +++ b/lede/target/linux/mediatek/patches-6.1/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -837,6 +837,9 @@ +@@ -832,6 +832,9 @@ bus-range = <0x00 0xff>; ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>; status = "disabled"; @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; -@@ -881,6 +884,9 @@ +@@ -876,6 +879,9 @@ bus-range = <0x00 0xff>; ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>; status = "disabled"; diff --git a/lede/target/linux/mediatek/patches-6.1/732-net-phy-mxl-gpy-don-t-use-SGMII-AN-if-using-phylink.patch b/lede/target/linux/mediatek/patches-6.1/732-net-phy-mxl-gpy-don-t-use-SGMII-AN-if-using-phylink.patch index 76d8b0ef00..ecc77bd92a 100644 --- a/lede/target/linux/mediatek/patches-6.1/732-net-phy-mxl-gpy-don-t-use-SGMII-AN-if-using-phylink.patch +++ b/lede/target/linux/mediatek/patches-6.1/732-net-phy-mxl-gpy-don-t-use-SGMII-AN-if-using-phylink.patch @@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/mxl-gpy.c +++ b/drivers/net/phy/mxl-gpy.c -@@ -371,8 +371,11 @@ static bool gpy_2500basex_chk(struct phy +@@ -377,8 +377,11 @@ static bool gpy_2500basex_chk(struct phy phydev->speed = SPEED_2500; phydev->interface = PHY_INTERFACE_MODE_2500BASEX; @@ -28,7 +28,7 @@ Signed-off-by: Daniel Golle return true; } -@@ -396,6 +399,14 @@ static int gpy_config_aneg(struct phy_de +@@ -402,6 +405,14 @@ static int gpy_config_aneg(struct phy_de u32 adv; int ret; @@ -43,7 +43,7 @@ Signed-off-by: Daniel Golle if (phydev->autoneg == AUTONEG_DISABLE) { /* Configure half duplex with genphy_setup_forced, * because genphy_c45_pma_setup_forced does not support. -@@ -486,6 +497,8 @@ static void gpy_update_interface(struct +@@ -492,6 +503,8 @@ static void gpy_update_interface(struct switch (phydev->speed) { case SPEED_2500: phydev->interface = PHY_INTERFACE_MODE_2500BASEX; @@ -52,7 +52,7 @@ Signed-off-by: Daniel Golle ret = phy_modify_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_SGMII_CTRL, VSPEC1_SGMII_CTRL_ANEN, 0); if (ret < 0) -@@ -497,7 +510,7 @@ static void gpy_update_interface(struct +@@ -503,7 +516,7 @@ static void gpy_update_interface(struct case SPEED_100: case SPEED_10: phydev->interface = PHY_INTERFACE_MODE_SGMII; diff --git a/lede/target/linux/mediatek/patches-6.1/901-arm-add-cmdline-override.patch b/lede/target/linux/mediatek/patches-6.1/901-arm-add-cmdline-override.patch index bfca4b6389..f8857bdf72 100644 --- a/lede/target/linux/mediatek/patches-6.1/901-arm-add-cmdline-override.patch +++ b/lede/target/linux/mediatek/patches-6.1/901-arm-add-cmdline-override.patch @@ -37,7 +37,7 @@ * CONFIG_CMDLINE is meant to be a default in case nothing else --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -2240,6 +2240,14 @@ config CMDLINE_FORCE +@@ -2239,6 +2239,14 @@ config CMDLINE_FORCE endchoice diff --git a/openwrt-packages/ddns-go/Makefile b/openwrt-packages/ddns-go/Makefile index ce003846a8..9045eda80b 100644 --- a/openwrt-packages/ddns-go/Makefile +++ b/openwrt-packages/ddns-go/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ddns-go -PKG_VERSION:=6.6.3 +PKG_VERSION:=6.6.4 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/jeessy2/ddns-go/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=72ddbcaa380e61c3cda758dbc2d9831e17bceb34ec1e4ff4d0fe9f0ed5f7e913 +PKG_HASH:=69e90cff0be0cc7968a884109209765cf4d7de346cd13b7e147f1a0f332b63ab PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/openwrt-packages/luci-theme-alpha/luasrc/gaya/gaya.css b/openwrt-packages/luci-theme-alpha/luasrc/gaya/gaya.css index 7e45b96214..e16a8e0db8 100755 --- a/openwrt-packages/luci-theme-alpha/luasrc/gaya/gaya.css +++ b/openwrt-packages/luci-theme-alpha/luasrc/gaya/gaya.css @@ -3592,6 +3592,95 @@ font-size: 0.9rem; } +.cbi-filebrowser { + min-width: 210px; + max-width: 100%; + border: 1px solid #ccc; + border-radius: 3px; + display: flex; + flex-direction: column; + opacity: 0; + height: 0; + overflow: hidden; +} + +.cbi-filebrowser.open { + opacity: 1; + height: auto; + overflow: visible; + transition: opacity .25s ease-in; +} + +.cbi-filebrowser > * { + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + padding: 0 0 .25em 0; + margin: .25em .25em 0px .25em; + margin-left: 0!important; + white-space: nowrap; + border-bottom: 1px solid #ccc; +} + +.cbi-filebrowser .cbi-button-positive { + margin-right: .25em; +} + +.cbi-filebrowser > div { + border-bottom: none; +} + +.cbi-filebrowser > ul > li { + display: flex; + flex-direction: row; +} + +.cbi-filebrowser > ul > li:hover { + background: #f5f5f5; +} + +.cbi-filebrowser > ul > li > div:first-child { + flex: 10; + overflow: hidden; + text-overflow: ellipsis; +} + +.cbi-filebrowser > ul > li > div:last-child { + flex: 3; + text-align: right; +} + +.cbi-filebrowser > ul > li > div:last-child > button { + padding: .125em .25em; + margin: 1px 0 1px .25em; +} + +.cbi-filebrowser .upload { + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin: 0 -.125em .25em -.125em; + padding: 0 0 .125em 0px; + border-bottom: 1px solid #ccc; +} + +.cbi-filebrowser .upload > * { + margin: .125em; + flex: 1; +} + +.cbi-filebrowser .upload > .btn { + flex-basis: 60px; +} + +.cbi-filebrowser .upload > div { + flex: 10; + min-width: 150px; +} + +.cbi-filebrowser .upload > div > input { + width: 100%; +} @media screen and (min-width: 600px) { ::-webkit-scrollbar { diff --git a/openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/nas.png b/openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/filemanager.png similarity index 100% rename from openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/nas.png rename to openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/filemanager.png diff --git a/openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/interface.png b/openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/network.png similarity index 100% rename from openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/interface.png rename to openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/network.png diff --git a/openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/oc.png b/openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/openclash.png similarity index 100% rename from openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/oc.png rename to openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/openclash.png diff --git a/openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/status.png b/openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/overview.png similarity index 100% rename from openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/status.png rename to openwrt-packages/luci-theme-alpha/luasrc/gaya/icon/navbar/overview.png diff --git a/openwrt-packages/luci-theme-alpha/root/etc/config/alpha b/openwrt-packages/luci-theme-alpha/root/etc/config/alpha index 8fb5864a9e..c3cf673608 100644 --- a/openwrt-packages/luci-theme-alpha/root/etc/config/alpha +++ b/openwrt-packages/luci-theme-alpha/root/etc/config/alpha @@ -1,10 +1,53 @@ -config alpha 'config' - option nav_01 '/cgi-bin/luci/admin/status/overview' - option nav_02 '/cgi-bin/luci/admin/services/ttyd' - option nav_03 '/cgi-bin/luci/admin/services/openclash' - option nav_04 '/cgi-bin/luci/admin/nas/tinyfm' - option nav_05 '/cgi-bin/luci/admin/modem/main' - option nav_06 '/cgi-bin/luci/admin/network/network' - option blur '20' +config theme 'theme' option color '#2222359a' + option blur '00' + option navbar '1' + +config navbar + option name 'Overview' + option enable 'Enable' + option line '1' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/overview.png' + option address '/cgi-bin/luci/admin/status/overview' + +config navbar + option name 'Terminal' + option enable 'Enable' + option line '2' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/terminal.png' + option address '/cgi-bin/luci/admin/services/ttyd' + +config navbar + option name 'Open Clash' + option enable 'Enable' + option line '3' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/openclash.png' + option address '/cgi-bin/luci/admin/services/openclash' + +config navbar + option name 'Neko' + option enable 'Enable' + option line '4' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/neko.png' + option address '/cgi-bin/luci/admin/services/neko' + +config navbar + option name 'Modem' + option enable 'Enable' + option line '5' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/modem.png' + option address '/cgi-bin/luci/admin/modem/main' + +config navbar + option name 'Network' + option enable 'Enable' + option line '6' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/network.png' + option address '/cgi-bin/luci/admin/network/network' diff --git a/openwrt-packages/luci-theme-alpha/template/footer.htm b/openwrt-packages/luci-theme-alpha/template/footer.htm index 71faefbd83..37d6091d6a 100644 --- a/openwrt-packages/luci-theme-alpha/template/footer.htm +++ b/openwrt-packages/luci-theme-alpha/template/footer.htm @@ -20,39 +20,45 @@ <% local ver = require "luci.version" local uci = require "luci.model.uci".cursor() -local config = uci:get_all("alpha", "config") -local icon = { - ['/cgi-bin/luci/admin/status/overview'] = '/gaya/icon/navbar/status.png', - ['/cgi-bin/luci/admin/services/ttyd'] = '/gaya/icon/navbar/terminal.png', - ['/cgi-bin/luci/admin/services/openclash'] = '/gaya/icon/navbar/oc.png', - ['/cgi-bin/luci/admin/nas/tinyfm'] = '/gaya/icon/navbar/nas.png', - ['/cgi-bin/luci/admin/modem/main'] = '/gaya/icon/navbar/modem.png', - ['/cgi-bin/luci/admin/network/network'] = '/gaya/icon/navbar/interface.png', - ['/cgi-bin/luci/admin/services/neko'] = '/gaya/icon/navbar/neko.png' -} +local config = uci:get_all("alpha", "theme") -local function getLink(nav) - local link = config[nav] - return (link and link ~= "none") and link or nil -end +-- Table to store navbar icons +local icon = {} +-- Iterate through all navbar entries +uci:foreach("alpha", "navbar", function(section) + local address = section.address + local icon_url = section.icon + + if address and icon_url then + -- Remove '/www/luci-static/alpha/' from icon_url + icon_url = string.gsub(icon_url, "^/www/luci%-static/alpha/", "") + icon[address] = icon_url + end +end) + +-- Check navbar enable status +local navbar_enabled = config.navbar == "1" + +-- Calculate number of enabled navbar links local num_links = 0 -for i = 1, 6 do - local nav_key = 'nav_0' .. i - local link = getLink(nav_key) - if link then +uci:foreach("alpha", "navbar", function(section) + if section.enable == "Enable" then num_links = num_links + 1 end -end +end) +-- Calculate link width for responsive design local link_width = string.format("calc(100%% / %d)", num_links) -local blur_value = tonumber(config.blur) + +-- Retrieve theme properties +local background_color = config.color or '#2222359a' +local blur_value = tonumber(config.blur) or 20 local link_blur = string.format("blur(%dpx)", blur_value) -local background_color = config.color %> @@ -71,17 +83,25 @@ local background_color = config.color