diff --git a/package-lock.json b/package-lock.json index d872393..85c1555 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@mdui/icons": "^1.0.2", "axios": "^1.6.7", "electron-updater": "^6.1.7", - "mdui": "^2.0.3", + "mdui": "^2.0.6", "python-shell": "^5.0.0", "vue-clipboard3": "^2.0.0", "vue-router": "^4.2.5" @@ -1599,9 +1599,9 @@ } }, "node_modules/@mdui/shared": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@mdui/shared/-/shared-1.0.3.tgz", - "integrity": "sha512-0pooQH3tFxG3Y5yo4WznpDOIMtLjxeDz7kxH8DI9M3cGabziEWN4kMZ6bO47pRF/Hh522U6QIL1CrSbFtQcrIw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@mdui/shared/-/shared-1.0.5.tgz", + "integrity": "sha512-5ypE0/p5ijI0jG/ioXd38mXUjYnIU7hr7fMKLG7Zhugkw9A7rkhstLLDzvuH6tDOOsx8co5/lny1WFwSPagI4A==", "dependencies": { "@mdui/jq": "^3.0.1", "@open-wc/dedupe-mixin": "^1.4.0", @@ -5214,15 +5214,15 @@ } }, "node_modules/mdui": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/mdui/-/mdui-2.0.3.tgz", - "integrity": "sha512-fQVPovZ/vHOePRz0XgMl6g3yMXJSnvvl5fzWdnFlbWpuFbFAEDk7zluQZO+2Ul4k8u/+6CaV6IxkyBojHtWGyQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/mdui/-/mdui-2.0.6.tgz", + "integrity": "sha512-OZowMR/df9vrwKTQ7d9LorEXe4+v9CKp88meTM1hj8ey5VWAOsqIQFXt7XcMSLPO7luDRk/tmeDqQa5YgP89ug==", "dependencies": { "@floating-ui/utils": "^0.1.6", "@lit-labs/motion": "^1.0.5", "@material/material-color-utilities": "^0.2.7", "@mdui/jq": "^3.0.1", - "@mdui/shared": "^1.0.3", + "@mdui/shared": "^1.0.5", "@open-wc/dedupe-mixin": "^1.4.0", "classcat": "^5.0.4", "is-promise": "^4.0.0", diff --git a/package.json b/package.json index 31eeb0f..255b4c1 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@mdui/icons": "^1.0.2", "axios": "^1.6.7", "electron-updater": "^6.1.7", - "mdui": "^2.0.3", + "mdui": "^2.0.6", "python-shell": "^5.0.0", "vue-clipboard3": "^2.0.0", "vue-router": "^4.2.5" diff --git a/src/flask/scripts/__pycache__/bili.cpython-311.pyc b/src/flask/scripts/__pycache__/bili.cpython-311.pyc index 9821520..c633be2 100644 Binary files a/src/flask/scripts/__pycache__/bili.cpython-311.pyc and b/src/flask/scripts/__pycache__/bili.cpython-311.pyc differ diff --git a/src/flask/scripts/bili.py b/src/flask/scripts/bili.py index a8eab31..729bc51 100644 --- a/src/flask/scripts/bili.py +++ b/src/flask/scripts/bili.py @@ -33,9 +33,12 @@ def convert(val): outputDir = val['output'] # output video file root CREATE_UP_DIR = val['isUp'] # 如果需要将同一个up的视频放在单独一个文件夹,则改为True + TRANS_DM = val['isDm'] REMOVE_ORI = val['isDel'] # True if would like to delete origin cache file - logging.info(CREATE_UP_DIR) + logging.info("CREATE_UP_DIR: " + str(CREATE_UP_DIR)) + logging.info("TRANS_DM: " + str(TRANS_DM)) + logging.info("REMOVE_ORI: " + str(REMOVE_ORI)) # collect failed failedVideos = [] @@ -108,13 +111,13 @@ def convert(val): # videoQualityWidth = row_data.get('page_data', 'no page data').get('width', 'no width') # videoQualityHeight = row_data.get('page_data', 'no page data').get('height', 'no height') logging.info("Current resolution: " + str(videoQualityWidth) + '*' + str(videoQualityHeight)) + if TRANS_DM: + # 转换后的danmaku.ass在与danmaku.xml同级目录下 + danmakuXMLPath = Path(PDir, "danmaku.xml") + danmakuASSPath = Path(PDir, "danmaku.ass") - # 转换后的danmaku.ass在与danmaku.xml同级目录下 - danmakuXMLPath = Path(PDir, "danmaku.xml") - danmakuASSPath = Path(PDir, "danmaku.ass") - - danmaku2ass.Danmaku2ASS(str(danmakuXMLPath), 'Bilibili', str(danmakuASSPath), videoQualityWidth, videoQualityHeight, 0, - 'Microsoft YaHei', 40) + danmaku2ass.Danmaku2ASS(str(danmakuXMLPath), 'Bilibili', str(danmakuASSPath), videoQualityWidth, videoQualityHeight, 0, + 'Microsoft YaHei', 40) for M4SDir in list(filter(Path.is_dir, Path.iterdir(PDir))): # 视频一般放在分p文件夹中的数字文件夹中,一般数字文件夹仅一个 sepPath = M4SDir @@ -163,11 +166,11 @@ def convert(val): logging.info(out.stdout) Path.rename(filePathOrigin, filePathOutput) logging.info("Output video: " + str(currentOutputDir)) - - if Path.exists(danmakuPathOutput): - Path.unlink(danmakuPathOutput) - logging.warning('Ass already exist, but replace it with new one.') - Path.rename(danmakuASSPath, danmakuPathOutput) + if TRANS_DM: + if Path.exists(danmakuPathOutput): + Path.unlink(danmakuPathOutput) + logging.warning('Ass already exist, but replace it with new one.') + Path.rename(danmakuASSPath, danmakuPathOutput) except Exception as e: logging.error(e) diff --git a/src/renderer/src/assets/main.css b/src/renderer/src/assets/main.css index 0c5467f..0e30c1e 100644 --- a/src/renderer/src/assets/main.css +++ b/src/renderer/src/assets/main.css @@ -2,8 +2,8 @@ body { display: flex; - align-items: center; - justify-content: center; + /* align-items: center; */ + /* justify-content: center; */ overflow: hidden; background-image: url('./bilibili.svg'); /* background-color: transparent; */ @@ -35,6 +35,31 @@ code { margin-bottom: 80px; } +.index-layout-left { + vertical-align: middle; + height: 100vh; +} + +.index-layout-main { + /* min-height: 300px; */ + height: 100vh; + width: 100vw; + align-items: center; + justify-content: center; + background-color: hsla(0, 0%, 100%, 0.5); +} + +.main-card { + width: 400px; + padding: 20px 20px 20px 20px; + background-color: hsl(0, 0%, 100%); +} + +.navi { + position: relative; + height: 100%; +} + .logo { margin-bottom: 20px; -webkit-user-drag: none; @@ -115,6 +140,7 @@ code { font-size: 12px; line-height: 14px; opacity: 0.8; + &:last-child { border: none; } @@ -133,8 +159,9 @@ code { } @media (max-width: 350px) { + .tip, .actions { display: none; } -} +} \ No newline at end of file diff --git a/src/renderer/src/components/Android.vue b/src/renderer/src/components/Android.vue new file mode 100644 index 0000000..53cf063 --- /dev/null +++ b/src/renderer/src/components/Android.vue @@ -0,0 +1,177 @@ + + \ No newline at end of file diff --git a/src/renderer/src/components/Index.vue b/src/renderer/src/components/Index.vue index 9918263..2eacb0b 100644 --- a/src/renderer/src/components/Index.vue +++ b/src/renderer/src/components/Index.vue @@ -1,68 +1,39 @@ \ No newline at end of file diff --git a/src/renderer/src/components/Windows.vue b/src/renderer/src/components/Windows.vue new file mode 100644 index 0000000..8e1cefb --- /dev/null +++ b/src/renderer/src/components/Windows.vue @@ -0,0 +1,172 @@ + + \ No newline at end of file diff --git a/src/renderer/src/router/routers.js b/src/renderer/src/router/routers.js index 34d5c21..c0a031c 100644 --- a/src/renderer/src/router/routers.js +++ b/src/renderer/src/router/routers.js @@ -3,13 +3,31 @@ const routes = [ { path: '/', - redirect: '/index', + redirect: '/index/android', }, { path: '/index', - component:()=> import('@renderer/components/Index.vue') + component: () => import('@renderer/components/Index.vue'), + children: [ + { + path: "android", + name: "android", + component: () => import('@renderer/components/Android.vue') + }, + { + path: "windows", + name: "windows", + component: () => import('@renderer/components/Windows.vue') + }, + { + path: "settings", + name: "settings", + component: () => import('@renderer/components/Settings.vue') + }, + ] }, + ] export default routes