├── CONTRIBUTING.md ├── public ├── robots.txt ├── js │ └── custom.js ├── css │ └── custom.css ├── favicon.ico ├── ui │ └── img │ │ ├── wallpaper01.jpg │ │ └── wallpaper02.jpg ├── img │ ├── icon │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── mstile-150x150.png │ │ ├── apple-touch-icon.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ └── safari-pinned-tab.svg │ ├── wallpaper │ │ ├── wallpaper01.jpg │ │ └── wallpaper02.jpg │ └── driver │ │ ├── Dropbox.svg │ │ └── GoogleDrive.svg ├── browserconfig.xml ├── site.webmanifest ├── favicon.svg └── index.html ├── .env.production ├── .env.dev ├── src ├── assets │ ├── img │ │ ├── logo │ │ │ ├── logo.png │ │ │ └── casa-white.svg │ │ ├── storage │ │ │ ├── USB.png │ │ │ ├── disk.png │ │ │ └── storage.png │ │ ├── social │ │ │ └── share_img.png │ │ ├── widgets │ │ │ ├── gradient.png │ │ │ ├── swiper-left.svg │ │ │ └── swiper-right.svg │ │ ├── filebrowser │ │ │ ├── folder.png │ │ │ ├── xfile.png │ │ │ ├── x-office-calendar.svg │ │ │ ├── text-x-preview.svg │ │ │ ├── application-x-smb-workgroup.svg │ │ │ ├── application-vnd.oasis.opendocument.text-template.svg │ │ │ ├── application-x-theme.svg │ │ │ ├── application-vnd.oasis.opendocument.chart.svg │ │ │ ├── application-x-flash-video.svg │ │ │ ├── x-office-document.svg │ │ │ ├── application-x-skgc.svg │ │ │ ├── application-vnd.oasis.opendocument.spreadsheet-template.svg │ │ │ ├── message-news.svg │ │ │ ├── application-vnd.snap.svg │ │ │ ├── application-x-root.svg │ │ │ ├── text-x-hex.svg │ │ │ ├── application-x-partial-download.svg │ │ │ ├── application-x-skg.svg │ │ │ ├── application-x-model.svg │ │ │ ├── application-x-ms-dos-executable.svg │ │ │ ├── application-x-wine-extension-skp.svg │ │ │ ├── application-x-kdenlivetitle.svg │ │ │ ├── application-x-designer.svg │ │ │ ├── x-office-spreadsheet.svg │ │ │ ├── application-vnd.ms-infopath.svg │ │ │ ├── application-x-kvtml.svg │ │ │ ├── image-vnd.djvu.svg │ │ │ ├── application-sql.svg │ │ │ ├── text-x-qml.svg │ │ │ ├── video-x-generic.svg │ │ │ ├── application-x-kplato.svg │ │ │ ├── application-x-srt.svg │ │ │ ├── application-vnd.visio.svg │ │ │ ├── application-vnd.oasis.opendocument.presentation-template.svg │ │ │ ├── x-office-presentation.svg │ │ │ ├── application-x-fictionbook+xml.svg │ │ │ ├── application-xmind.svg │ │ │ ├── application-x-plasma.svg │ │ │ ├── application-epub+zip.svg │ │ │ ├── virtualbox-vbox.svg │ │ │ ├── virtualbox-vbox-extpack.svg │ │ │ ├── application-vnd.iccprofile.svg │ │ │ ├── image-x-generic.svg │ │ │ ├── x-media-podcast.svg │ │ │ ├── application-vnd.ms-publisher.svg │ │ │ ├── application-x-firmware.svg │ │ │ ├── image-vnd.dgn.svg │ │ │ ├── image-vnd.dwg.svg │ │ │ ├── text-x-generic.svg │ │ │ ├── text-x-script.svg │ │ │ ├── text-x-kotlin.svg │ │ │ ├── text-x-cmake.svg │ │ │ ├── application-x-ruby.svg │ │ │ ├── office-contact.svg │ │ │ ├── application-vnd.oasis.opendocument.formula-template.svg │ │ │ ├── application-vnd.oasis.opendocument.formula.svg │ │ │ ├── text-x-python.svg │ │ │ ├── text-x-tcl.svg │ │ │ ├── application-x-shellscript.svg │ │ │ ├── application-rss_xml.svg │ │ │ ├── text-x-lua.svg │ │ │ ├── x-kde-nsplugin-generated.svg │ │ │ ├── text-x-po.svg │ │ │ ├── virtualbox-hdd.svg │ │ │ ├── virtualbox-ova.svg │ │ │ ├── virtualbox-ovf.svg │ │ │ ├── virtualbox-vdi.svg │ │ │ ├── virtualbox-vhd.svg │ │ │ ├── application-vnd.flatpak.ref.svg │ │ │ ├── virtualbox-vmdk.svg │ │ │ ├── application-vnd.flatpak.svg │ │ │ ├── font-x-generic.svg │ │ │ ├── inode-symlink.svg │ │ │ ├── application-x-wine-extension-cpl.svg │ │ │ ├── application-msonenote.svg │ │ │ ├── audio-midi.svg │ │ │ ├── application-x-lzop.svg │ │ │ ├── application-x-tar.svg │ │ │ ├── application-x-tarz.svg │ │ │ ├── application-x-tzo.svg │ │ │ ├── application-x-gzpostscript.svg │ │ │ ├── application-x-lzma-compressed-tar.svg │ │ │ ├── image-svg+xml.svg │ │ │ ├── application-x-ace.svg │ │ │ ├── application-x-ar.svg │ │ │ ├── application-x-arc.svg │ │ │ ├── application-x-arj.svg │ │ │ ├── application-x-bzdvi.svg │ │ │ ├── application-x-bzip.svg │ │ │ ├── application-x-gzip.svg │ │ │ ├── application-x-zip.svg │ │ │ ├── application-x-rar.svg │ │ │ ├── application-x-bzip-compressed-tar.svg │ │ │ ├── extension.svg │ │ │ └── application-pgp.svg │ │ ├── app │ │ │ ├── swiper_placeholder.png │ │ │ ├── add_button.svg │ │ │ └── sk_icon.svg │ │ ├── common-icons │ │ │ ├── success.svg │ │ │ ├── warning.svg │ │ │ ├── danger.svg │ │ │ └── files.svg │ │ ├── drop │ │ │ ├── drop_icon.svg │ │ │ ├── notebook_offline.svg │ │ │ ├── notebook_online.svg │ │ │ ├── desktop_offline.svg │ │ │ ├── desktop_online.svg │ │ │ ├── tablet_offline.svg │ │ │ └── tablet_online.svg │ │ └── power │ │ │ └── loading.svg │ ├── background │ │ ├── blank.png │ │ ├── wallpaper01.jpg │ │ ├── wallpaper02.jpg │ │ ├── default_wallpaper.jpg │ │ └── preview-widget.svg │ ├── fonts │ │ └── britti-sans-regular.woff │ ├── lang │ │ └── index.js │ └── scss │ │ ├── common │ │ ├── _sections.scss │ │ ├── _spacing.scss │ │ ├── _tabs.scss │ │ ├── _color.scss │ │ ├── _toast.scss │ │ ├── _title.scss │ │ ├── _dropdown.scss │ │ ├── _widgets.scss │ │ ├── _root.scss │ │ └── _images.scss │ │ └── app.scss ├── service │ ├── driver.js │ ├── image.js │ ├── appCategories.js │ ├── cloud.js │ ├── port.js │ ├── disks.js │ ├── storage.js │ ├── file.js │ ├── api.js │ ├── batch.js │ ├── index.js │ ├── folder.js │ ├── samba.js │ ├── apps.js │ └── local_storage.js ├── store │ ├── getters.js │ ├── index.js │ ├── state.js │ └── actions.js ├── plugins │ └── i18n.js ├── components │ ├── filebrowser │ │ ├── uploader │ │ │ ├── common │ │ │ │ ├── file-events.js │ │ │ │ ├── mixins.js │ │ │ │ └── utils.js │ │ │ └── components │ │ │ │ ├── files.vue │ │ │ │ ├── list.vue │ │ │ │ └── unsupport.vue │ │ ├── shared │ │ │ └── EmptyHolder.vue │ │ ├── components │ │ │ ├── ActionButton.vue │ │ │ ├── ErrorHolder.vue │ │ │ ├── SidebarMenuButton.vue │ │ │ ├── IconContainer.vue │ │ │ └── ListIconContainer.vue │ │ └── drop │ │ │ ├── DropEntryButton.vue │ │ │ └── DropCenterIcon.vue │ └── Apps │ │ ├── AddNewButtonCard.vue │ │ └── AppSectionTitleTip.vue ├── mixins │ ├── file_utils.js │ ├── file_utils.spec.js │ └── base │ │ └── common-i18n.js └── events │ ├── index.js │ └── events.js ├── vitest.config.js ├── jsconfig.json ├── babel.config.js ├── prettier.config.cjs ├── stylelint.config.js ├── .gitignore ├── .eslintrc.js ├── eslint.config.mjs ├── register-ui-events.sh └── .github └── workflows ├── ci.yml └── build_new_lang.yml /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | // .env.production 2 | NODE_ENV=prod -------------------------------------------------------------------------------- /public/js/custom.js: -------------------------------------------------------------------------------- 1 | // Add your custom scripts here -------------------------------------------------------------------------------- /public/css/custom.css: -------------------------------------------------------------------------------- 1 | /* Add your custom css style here */ -------------------------------------------------------------------------------- /.env.dev: -------------------------------------------------------------------------------- 1 | # .env.dev 2 | NODE_ENV=dev 3 | VUE_APP_DEV_IP=10.0.0.97 4 | VUE_APP_DEV_PORT=80 5 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/ui/img/wallpaper01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/ui/img/wallpaper01.jpg -------------------------------------------------------------------------------- /public/ui/img/wallpaper02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/ui/img/wallpaper02.jpg -------------------------------------------------------------------------------- /src/assets/img/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/img/logo/logo.png -------------------------------------------------------------------------------- /src/assets/img/storage/USB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/img/storage/USB.png -------------------------------------------------------------------------------- /vitest.config.js: -------------------------------------------------------------------------------- 1 | import {defineConfig} from 'vitest/config' 2 | 3 | export default defineConfig({ 4 | test: {} 5 | }) -------------------------------------------------------------------------------- /src/assets/background/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/background/blank.png -------------------------------------------------------------------------------- /src/assets/img/storage/disk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/img/storage/disk.png -------------------------------------------------------------------------------- /public/img/icon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/img/icon/favicon-16x16.png -------------------------------------------------------------------------------- /public/img/icon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/img/icon/favicon-32x32.png -------------------------------------------------------------------------------- /public/img/icon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/img/icon/mstile-150x150.png -------------------------------------------------------------------------------- /src/assets/img/social/share_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/img/social/share_img.png -------------------------------------------------------------------------------- /src/assets/img/storage/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/img/storage/storage.png -------------------------------------------------------------------------------- /src/assets/img/widgets/gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/img/widgets/gradient.png -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "vueCompilerOptions": { 3 | "target": 2, 4 | "extensions": [ 5 | ".vue" 6 | ] 7 | } 8 | } -------------------------------------------------------------------------------- /public/img/icon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/img/icon/apple-touch-icon.png -------------------------------------------------------------------------------- /public/img/wallpaper/wallpaper01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/img/wallpaper/wallpaper01.jpg -------------------------------------------------------------------------------- /public/img/wallpaper/wallpaper02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/img/wallpaper/wallpaper02.jpg -------------------------------------------------------------------------------- /src/assets/background/wallpaper01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/background/wallpaper01.jpg -------------------------------------------------------------------------------- /src/assets/background/wallpaper02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/background/wallpaper02.jpg -------------------------------------------------------------------------------- /src/assets/img/filebrowser/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/img/filebrowser/folder.png -------------------------------------------------------------------------------- /src/assets/img/filebrowser/xfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/img/filebrowser/xfile.png -------------------------------------------------------------------------------- /public/img/icon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/img/icon/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/img/icon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/public/img/icon/android-chrome-512x512.png -------------------------------------------------------------------------------- /src/assets/fonts/britti-sans-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/fonts/britti-sans-regular.woff -------------------------------------------------------------------------------- /src/assets/img/app/swiper_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/img/app/swiper_placeholder.png -------------------------------------------------------------------------------- /src/assets/background/default_wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceWhaleTech/CasaOS-UI/HEAD/src/assets/background/default_wallpaper.jpg -------------------------------------------------------------------------------- /src/assets/lang/index.js: -------------------------------------------------------------------------------- 1 | const files = require.context('./', false, /\.json$/) 2 | const langs = {} 3 | files.keys().forEach((key) => { 4 | langs[key.replace(/(\.\/|\.json$)/g, '').toLowerCase()] = files(key) 5 | }) 6 | 7 | export default langs 8 | -------------------------------------------------------------------------------- /src/service/driver.js: -------------------------------------------------------------------------------- 1 | import {api} from "./service.js"; 2 | 3 | const PREFIX = "/driver"; 4 | const driver = { 5 | 6 | // get driver list 7 | getDriverList(data) { 8 | return api.get(`${PREFIX}`, data); 9 | } 10 | } 11 | export default driver; -------------------------------------------------------------------------------- /public/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/service/image.js: -------------------------------------------------------------------------------- 1 | import { api } from "./service.js"; 2 | 3 | const PREFIX = "/image" 4 | 5 | const image = { 6 | // image thumbnail/original image 7 | getImage(path, type) { 8 | return api.get(`${PREFIX}`, { 9 | path: path, 10 | type: type 11 | }); 12 | } 13 | } 14 | 15 | export default image; -------------------------------------------------------------------------------- /src/assets/scss/common/_sections.scss: -------------------------------------------------------------------------------- 1 | .home-section { 2 | .loading-background { 3 | background-color: transparent !important; 4 | } 5 | 6 | .column { 7 | padding-top: 0.5rem; 8 | padding-bottom: 0.5rem; 9 | } 10 | } 11 | 12 | 13 | .suggestion-list { 14 | min-height: 7.5rem; 15 | position: relative; 16 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | "@vue/cli-plugin-babel/preset", 4 | [ 5 | "@babel/preset-env", 6 | { 7 | useBuiltIns: "entry", 8 | corejs: 3, 9 | }, 10 | ], 11 | [ 12 | "@babel/preset-typescript", // 引用Typescript插件 13 | { 14 | allExtensions: true, // 支持所有文件扩展名,否则在vue文件中使用ts会报错 15 | }, 16 | ], 17 | ], 18 | }; 19 | -------------------------------------------------------------------------------- /src/store/getters.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-06-02 19:49:06 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-06-02 19:49:18 6 | * @FilePath: \CasaOS-UI\src\store\getter.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | const getters = {} 12 | export default getters -------------------------------------------------------------------------------- /src/plugins/i18n.js: -------------------------------------------------------------------------------- 1 | 2 | import Vue from 'vue' 3 | import VueI18n from 'vue-i18n' 4 | import messages from '@/assets/lang' 5 | 6 | Vue.use(VueI18n) 7 | 8 | const i18n = new VueI18n({ 9 | // Define defalut language 10 | locale: localStorage.getItem('lang') || 'en_us', 11 | fallbackLocale: 'en_us', 12 | silentTranslationWarn: true, 13 | messages 14 | }) 15 | export default i18n 16 | -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import("prettier").Config} */ 2 | const config = { 3 | printWidth: 110, 4 | plugins: [ 5 | "prettier-plugin-organize-attributes", 6 | "@trivago/prettier-plugin-sort-imports", 7 | "prettier-plugin-tailwindcss", 8 | ], 9 | tailwindConfig: "./tailwind.config.js", 10 | tailwindFunctions: ["usePassThrough"], 11 | }; 12 | 13 | module.exports = config; -------------------------------------------------------------------------------- /src/components/filebrowser/uploader/common/file-events.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @LastEditors: zhanghengxin ezreal.zhang@icewhale.org 3 | * @LastEditTime: 2023/4/24 上午11:20 4 | * @FilePath: /CasaOS-UI/src/components/filebrowser/uploader/common/file-events.js 5 | * @Description: 6 | * 7 | * Copyright (c) 2023 by IceWhale, All Rights Reserved. 8 | 9 | */ 10 | 11 | const events = ['fileProgress', 'fileSuccess', 'fileComplete', 'fileError'] 12 | 13 | export default events 14 | -------------------------------------------------------------------------------- /stylelint.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | extends: ["stylelint-config-recommended"], 3 | rules: { 4 | "at-rule-no-unknown": [ 5 | true, 6 | { 7 | ignoreAtRules: [ 8 | "tailwind", 9 | "apply", 10 | "variants", 11 | "responsive", 12 | "screen", 13 | ], 14 | }, 15 | ], 16 | "declaration-block-trailing-semicolon": null, 17 | "no-descending-specificity": null, 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /src/mixins/file_utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @description: Format size output 3 | * @param {int} bytes size value 4 | * @return {String} 5 | */ 6 | export const renderSize = (bytes) => { 7 | const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'] 8 | if (bytes === 0) return '0 Bytes' 9 | const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10) 10 | if (i === 0) return `${bytes} ${sizes[i]}` 11 | return `${parseFloat((bytes / (1024 ** i)).toFixed(2))} ${sizes[i]}` 12 | } 13 | -------------------------------------------------------------------------------- /src/assets/background/preview-widget.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CasaOS", 3 | "short_name": "CasaOS", 4 | "icons": [{ 5 | "src": "/img/icon/android-chrome-192x192.png", 6 | "sizes": "192x192", 7 | "type": "image/png" 8 | }, 9 | { 10 | "src": "/img/icon/android-chrome-512x512.png", 11 | "sizes": "512x512", 12 | "type": "image/png" 13 | } 14 | ], 15 | "theme_color": "#ffffff", 16 | "background_color": "#ffffff", 17 | "display": "standalone" 18 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | /build 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | 25 | # warnings 26 | unused-files.json 27 | 28 | # package manager 29 | #.yarnrc.yml 30 | #!/releases/yarn** 31 | .yarn/* 32 | !.yarn/releases 33 | 34 | # turbo 35 | .turbo 36 | 37 | /packages/icewhale* 38 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | root: true, 4 | env: { 5 | node: true 6 | }, 7 | 'extends': [ 8 | 'plugin:vue/essential', 9 | 'eslint:recommended' 10 | ], 11 | parserOptions: { 12 | parser: "babel-eslint" 13 | }, 14 | rules: { 15 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 16 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 17 | 'vue/no-unused-vars': 'off', 18 | 'vue/script-setup-uses-vars': 'off', 19 | 'no-mixed-spaces-and-tabs': 'off' 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import antfu from '@antfu/eslint-config' 3 | 4 | export default antfu( 5 | { 6 | // Configures for antfu's config 7 | typescript: false, 8 | vue: { 9 | vueVersion: 2 10 | }, 11 | unocss: false, 12 | markdown: true, 13 | }, 14 | { 15 | // Configures for eslint 16 | name: 'vue2-apps', 17 | rules: { 18 | 'vue/v-on-event-hyphenation': 'off', 19 | 'vue/require-explicit-emits': 'off', 20 | "vue/no-deprecated-v-on-native-modifier": 'off', 21 | }, 22 | }, 23 | ) 24 | -------------------------------------------------------------------------------- /src/components/filebrowser/shared/EmptyHolder.vue: -------------------------------------------------------------------------------- 1 | 11 | 16 | 17 | 22 | 23 | -------------------------------------------------------------------------------- /src/mixins/file_utils.spec.js: -------------------------------------------------------------------------------- 1 | import { expect, test, describe } from 'vitest' 2 | import { renderSize } from './file_utils' 3 | 4 | describe('renderSize', () => { 5 | test.each([ 6 | [0, '0 Bytes'], 7 | [10, '10 Bytes'], 8 | [1024, '1 KB'], 9 | [1800, '1.76 KB'], 10 | [1024 ** 2, '1 MB'], 11 | [1024 ** 3, '1 GB'], 12 | [2.5 * 1024 ** 3, '2.5 GB'], 13 | [1024 ** 4, '1 TB'], 14 | [1024 ** 5, '1 PB'], 15 | [2 * 1024 ** 5, '2 PB'], 16 | [1024**6, '1 EB'], 17 | ])('format %s bytes as %s', (bytes, formattedSize) => { 18 | expect(renderSize(bytes)).toEqual(formattedSize) 19 | }) 20 | }) -------------------------------------------------------------------------------- /src/service/appCategories.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-12 22:37:22 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-07-12 22:38:49 6 | * @FilePath: \CasaOS-UI\src\service\appCategories.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import {api} from "./service.js"; 12 | 13 | const PREFIX = "/app-categories" 14 | 15 | const appCategories = { 16 | // get app category 17 | getAppCategory() { 18 | return api.get(`${PREFIX}`); 19 | } 20 | } 21 | 22 | export default appCategories; -------------------------------------------------------------------------------- /src/components/filebrowser/uploader/common/mixins.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @LastEditors: zhanghengxin ezreal.zhang@icewhale.org 3 | * @LastEditTime: 2023/4/24 上午11:20 4 | * @FilePath: /CasaOS-UI/src/components/filebrowser/uploader/common/mixins.js 5 | * @Description: 6 | * 7 | * Copyright (c) 2023 by IceWhale, All Rights Reserved. 8 | 9 | */ 10 | 11 | export const uploaderMixin = { 12 | inject: ['uploader'] 13 | } 14 | 15 | export const supportMixin = { 16 | data() { 17 | return { 18 | support: true 19 | } 20 | }, 21 | mounted() { 22 | this.support = this.uploader.uploader.support 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/assets/scss/common/_spacing.scss: -------------------------------------------------------------------------------- 1 | // Padding 2 | .p-55 { 3 | padding: 2rem !important; 4 | } 5 | 6 | .pt-55 { 7 | padding-top: 2rem !important; 8 | } 9 | 10 | .pl-55 { 11 | padding-left: 1.75rem; 12 | } 13 | 14 | .pl-7 { 15 | padding-left: 4.75rem; 16 | } 17 | 18 | .pt-7 { 19 | padding-top: 4rem; 20 | } 21 | 22 | // Margin 23 | .mt-55 { 24 | margin-top: 2.5rem !important; 25 | } 26 | 27 | .mt-2rem { 28 | margin-top: 2rem !important; 29 | } 30 | 31 | .mb-2rem { 32 | margin-bottom: 2rem !important; 33 | } 34 | 35 | .ml-7 { 36 | margin-left: 5rem; 37 | } 38 | 39 | .mr-7 { 40 | margin-right: 5rem; 41 | } -------------------------------------------------------------------------------- /src/assets/img/common-icons/success.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /register-ui-events.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | 4 | # This script is used to register the UI events for the UI events 5 | 6 | # Get the message bus URL 7 | runtime_file="/var/run/casaos/message-bus.url" 8 | ui_message_bus_file="/var/lib/casaos/ui-message-bus.json" 9 | if [ -f "$runtime_file" ] && [ -f "$ui_message_bus_file" ] 10 | then 11 | MESSAGE_BUS_URL=$(cat /var/run/casaos/message-bus.url) 12 | curl -X POST "$MESSAGE_BUS_URL/v2/message_bus/event_type" -H "Content-Type: application/json" -d @$ui_message_bus_file 13 | echo "UI events registered" 14 | else 15 | echo "Message bus URL or message json file not found" 16 | fi -------------------------------------------------------------------------------- /src/mixins/base/common-i18n.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @LastEditors: zhanghengxin ezreal.zhang@icewhale.org 3 | * @LastEditTime: 2023/4/10 下午5:49 4 | * @FilePath: /CasaOS-UI/src/mixins/base/common-i18n.js 5 | * @Description: 6 | * 7 | * Copyright (c) 2023 by IceWhale, All Rights Reserved. 8 | 9 | */ 10 | 11 | const i18n = function (data, fallback = 'en_us') { 12 | let lang = localStorage.getItem('lang') 13 | return data?.['custom'] || data?.[lang] || data?.[fallback] || data?.['en_US']; 14 | } 15 | 16 | // Common usage 17 | const ice_i18n = i18n 18 | export {ice_i18n}; 19 | 20 | // vue usage 21 | export default { 22 | methods: { 23 | i18n 24 | } 25 | } -------------------------------------------------------------------------------- /src/service/cloud.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-14 18:15:24 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2023-02-02 15:56:30 6 | * @FilePath: \CasaOS-UI-0.4.2\src\service\cloud.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import {api} from "./service.js"; 12 | 13 | const PREFIX = "/cloud"; 14 | const cloud = { 15 | // get storage list 16 | list(data) { 17 | return api.get(`${PREFIX}`, data) 18 | }, 19 | 20 | // delete storage 21 | umount(data) { 22 | return api.delete(`${PREFIX}`, data); 23 | } 24 | } 25 | export default cloud; 26 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/x-office-calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-03-02 22:48:28 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-06-02 19:54:35 6 | * @FilePath: \CasaOS-UI\src\store\index.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import Vue from 'vue'; 12 | import Vuex from 'vuex'; 13 | import state from './state'; 14 | import getters from './getters'; 15 | import mutations from './mutations'; 16 | import actions from './actions'; 17 | 18 | Vue.use(Vuex) 19 | 20 | export default new Vuex.Store({ 21 | state, 22 | getters, 23 | mutations, 24 | actions, 25 | }) -------------------------------------------------------------------------------- /src/service/port.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-12 22:39:41 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-07-12 22:41:08 6 | * @FilePath: \CasaOS-UI\src\service\port.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import {api} from "./service.js"; 12 | 13 | const PREFIX = "/port" 14 | 15 | const port = { 16 | // check if the port is available 17 | check(port, type) { 18 | return api.get(`${PREFIX}/state/${port}`, { 19 | type: type 20 | }); 21 | }, 22 | 23 | // get a able port 24 | get(type) { 25 | return api.get(`${PREFIX}`, { 26 | type: type 27 | }); 28 | } 29 | } 30 | 31 | export default port; -------------------------------------------------------------------------------- /src/assets/scss/common/_tabs.scss: -------------------------------------------------------------------------------- 1 | // Tabs 2 | 3 | .tabs { 4 | ul { 5 | border-bottom: 1px solid transparent; 6 | 7 | li { 8 | font-size: 1rem; 9 | 10 | &:first-child { 11 | a { 12 | margin-left: 0; 13 | } 14 | } 15 | 16 | a { 17 | color: $primary; 18 | border-bottom: transparent 2px solid !important; 19 | padding: 0.5rem 0 0.1rem 0; 20 | margin: 0 0.5rem; 21 | } 22 | 23 | &.is-active { 24 | a { 25 | font-weight: 700; 26 | border-bottom: $primary 2px solid !important; 27 | } 28 | } 29 | } 30 | } 31 | } 32 | 33 | .b-tabs .tab-content { 34 | position: relative; 35 | overflow: visible; 36 | display: flex; 37 | flex-direction: column; 38 | padding: 1rem 0 0 0; 39 | } -------------------------------------------------------------------------------- /src/events/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @LastEditors: Jerryk jerry@icewhale.org 3 | * @LastEditTime: 2023-03-17 16:46:57 4 | * @FilePath: /CasaOS-UI/src/events/index.js 5 | * @Description: 6 | * 7 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 8 | */ 9 | 10 | import {api} from "@/service/service.js"; 11 | import message_bus from "@/events/message_bus.js"; 12 | 13 | export default function messageBus(name, params) { 14 | if (!params) { 15 | params = null 16 | } 17 | try { 18 | message_bus[name](params).then(res => { 19 | let properties = res.properties; 20 | let eventName = res.name; 21 | api.post(`/v2/message_bus/event/casaos-ui/${eventName}`, properties); 22 | }) 23 | } catch (error) { 24 | console.log(error); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/service/disks.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: JerryK 3 | * @Date: 2021-09-18 21:32:13 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-08-11 17:16:42 6 | * @Description: Disk API 7 | * @FilePath: \CasaOS-UI\src\service\disks.js 8 | */ 9 | import {api} from "./service.js"; 10 | 11 | const PREFIX = "/disks"; 12 | const disks = { 13 | 14 | // get disk list 15 | getDiskList(data) { 16 | return api.get(`${PREFIX}`, data); 17 | }, 18 | 19 | umount(data) { 20 | return api.delete(`${PREFIX}`, data); 21 | }, 22 | 23 | // Get usbs 24 | getUsbs() { 25 | return api.get(`${PREFIX}/usb`); 26 | }, 27 | 28 | // Umount usb 29 | umountUsb(data) { 30 | return api.delete(`${PREFIX}/usb`, data); 31 | } 32 | } 33 | export default disks; 34 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-preview.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/assets/img/widgets/swiper-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /src/assets/img/widgets/swiper-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /src/assets/scss/common/_color.scss: -------------------------------------------------------------------------------- 1 | .op80 { 2 | opacity: 0.8; 3 | } 4 | 5 | .has-text-grey-100 { 6 | color: $grey-100; 7 | } 8 | 9 | .has-text-grey-200 { 10 | color: $grey-200; 11 | } 12 | 13 | .has-text-grey-400 { 14 | color: $grey-400; 15 | } 16 | 17 | .has-text-grey-600 { 18 | color: $grey-600; 19 | } 20 | 21 | .has-text-gray-800 { 22 | color: $gray-800; 23 | } 24 | 25 | .has-text-gray-font{ 26 | color: $gray-font !important; 27 | } 28 | 29 | 30 | .has-text-green-default { 31 | color: hsla(118, 70%, 45%, 1); 32 | } 33 | 34 | .has-text-red { 35 | color: hsla(18, 98%, 55%, 1) !important; 36 | } 37 | 38 | .has-background-red-tertiary { 39 | /* Red/Tertiary */ 40 | background-color: hsla(18, 98%, 94%, 1); 41 | } 42 | 43 | .has-background-gray-800 { 44 | background-color: $gray-800; 45 | } -------------------------------------------------------------------------------- /src/assets/img/common-icons/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/assets/img/drop/drop_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/assets/img/common-icons/danger.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /public/img/driver/Dropbox.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /src/assets/img/app/add_button.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/service/storage.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-14 18:15:24 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-08-04 10:45:33 6 | * @FilePath: \CasaOS-UI\src\service\storage.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import {api} from "./service.js"; 12 | 13 | const PREFIX = "/storage"; 14 | const storage = { 15 | // get storage list 16 | list(data) { 17 | return api.get(`${PREFIX}`, data) 18 | }, 19 | 20 | // create storage 21 | create(data) { 22 | return api.post(`${PREFIX}`, data); 23 | }, 24 | 25 | // format storage 26 | format(data) { 27 | return api.put(`${PREFIX}`, data); 28 | }, 29 | 30 | // delete storage 31 | delete(data) { 32 | return api.delete(`${PREFIX}`, data); 33 | } 34 | } 35 | export default storage; 36 | -------------------------------------------------------------------------------- /src/assets/img/app/sk_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /src/components/filebrowser/uploader/components/files.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 32 | 33 | 44 | -------------------------------------------------------------------------------- /src/assets/img/common-icons/files.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /src/components/filebrowser/components/ActionButton.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 19 | 26 | 27 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-smb-workgroup.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/filebrowser/uploader/components/list.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 32 | 33 | 44 | -------------------------------------------------------------------------------- /src/assets/scss/common/_toast.scss: -------------------------------------------------------------------------------- 1 | // Toast 2 | 3 | .toast { 4 | border: 1px solid $grey-300 !important; 5 | padding: 0.75rem 1.25rem; 6 | 7 | p, 8 | div { 9 | font-family: $family-sans-serif; 10 | font-style: normal; 11 | font-weight: 400; 12 | font-size: 0.875rem; 13 | line-height: 1.25rem; 14 | color: rgba(41, 52, 61, 1); 15 | } 16 | 17 | &.is-success, 18 | &.is-danger, 19 | &.is-warning { 20 | background: $white !important; 21 | color: rgba(41, 52, 61, 1); 22 | 23 | &::before { 24 | margin-right: 0.5rem; 25 | height: 20px; 26 | } 27 | } 28 | 29 | &.is-success { 30 | &::before { 31 | content: url(../img/common-icons/success.svg); 32 | } 33 | } 34 | 35 | &.is-danger { 36 | &::before { 37 | content: url(../img/common-icons/danger.svg); 38 | } 39 | } 40 | 41 | &.is-warning { 42 | &::before { 43 | content: url(../img/common-icons/warning.svg); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/service/file.js: -------------------------------------------------------------------------------- 1 | import {api} from "./service.js"; 2 | 3 | const PREFIX = "/file" 4 | 5 | const file = { 6 | 7 | // get file content 8 | getContent(path) { 9 | return api.get(`${PREFIX}/content`, { 10 | path: path, 11 | timestamp: Date.now() 12 | }); 13 | }, 14 | 15 | // download single file 16 | download(path) { 17 | return api.get(`${PREFIX}`, { 18 | path: path, 19 | timestamp: Date.now() 20 | }); 21 | }, 22 | 23 | // create file 24 | create(path) { 25 | return api.post(`${PREFIX}`, { 26 | path: path 27 | }); 28 | }, 29 | 30 | // rename file 31 | rename(old_path, new_path) { 32 | return api.put(`${PREFIX}/name`, { 33 | old_path: old_path, 34 | new_path: new_path 35 | }); 36 | }, 37 | 38 | // update file 39 | update(path, content) { 40 | return api.put(`${PREFIX}`, { 41 | path: path, 42 | content: content 43 | }); 44 | }, 45 | 46 | } 47 | 48 | export default file; -------------------------------------------------------------------------------- /src/assets/img/power/loading.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/service/api.js: -------------------------------------------------------------------------------- 1 | import appCategories from './appCategories.js'; 2 | import apps from './apps.js'; 3 | import batch from './batch.js'; 4 | import container from './container.js'; 5 | import disks from './disks.js'; 6 | import file from './file.js'; 7 | import folder from './folder.js'; 8 | import image from './image.js'; 9 | import port from './port.js'; 10 | import sys from './sys.js'; 11 | import storage from './storage.js'; 12 | import samba from './samba.js'; 13 | import users from "./users.js"; 14 | import local_storage from "./local_storage.js"; 15 | import driver from './driver.js'; 16 | import cloud from './cloud.js'; 17 | 18 | export default { 19 | // Apps 20 | appCategories, 21 | apps, 22 | container, 23 | // Files 24 | file, 25 | folder, 26 | image, 27 | batch, 28 | // Devices 29 | disks, 30 | storage, 31 | samba, 32 | driver, 33 | cloud, 34 | // System 35 | sys, 36 | port, 37 | // User 38 | users, 39 | local_storage, 40 | } -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.oasis.opendocument.text-template.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-theme.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/filebrowser/components/ErrorHolder.vue: -------------------------------------------------------------------------------- 1 | 11 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.oasis.opendocument.chart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-flash-video.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/x-office-document.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/service/batch.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-12 22:45:44 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-07-14 17:41:17 6 | * @FilePath: \CasaOS-UI\src\service\batch.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import {api} from "./service.js"; 12 | 13 | const PREFIX = "/batch" 14 | 15 | const batch = { 16 | // download 17 | download(format, files) { 18 | return api.get(`${PREFIX}`, { 19 | format: format, 20 | files: files 21 | }); 22 | }, 23 | 24 | // File operate task TODO:wait for the api 25 | task(data) { 26 | return api.post(`${PREFIX}/task`, data); 27 | }, 28 | 29 | // delete file operate task 30 | deleteTask(id) { 31 | return api.delete(`${PREFIX}/${id}/task`); 32 | }, 33 | 34 | // delete file or folder 35 | delete(files) { 36 | return api.delete(`${PREFIX}`, files); 37 | }, 38 | 39 | 40 | } 41 | 42 | export default batch; -------------------------------------------------------------------------------- /src/service/index.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | import { instance } from "@/service/service"; 4 | // app_management 5 | import { 6 | Configuration, 7 | ComposeMethodsApiFactory, 8 | InternalMethodsApiFactory, 9 | AppStoreMethodsApiFactory, AppStoreMethodsApiFp, AppStoreMethodsApi 10 | } from "@icewhale/casaos-appmanagement-openapi"; 11 | 12 | // 初始化 openapi 配置 13 | const config = new Configuration({}); 14 | 15 | const appManagement = {} 16 | appManagement.compose = new ComposeMethodsApiFactory(config, '/v2/app_management', instance); 17 | // appManagement.appStore = new AppStoreMethodsApiFactory(config, '/v2/app_management', instance); 18 | appManagement.appStore = new AppStoreMethodsApi(config, '/v2/app_management', instance); 19 | const appGrid = new InternalMethodsApiFactory(config, '/v2/app_management', instance); 20 | const appCompose = new ComposeMethodsApiFactory(config, '/v2/app_management', instance); 21 | 22 | // apiClient.axios = instance; 23 | export default { appManagement, appGrid, appCompose }; -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-skgc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/Apps/AddNewButtonCard.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 31 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.oasis.opendocument.spreadsheet-template.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/message-news.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/scss/common/_title.scss: -------------------------------------------------------------------------------- 1 | .title { 2 | font-weight: 600; 3 | 4 | &.is-1 { 5 | font-size: 2rem; 6 | } 7 | 8 | &.is-2 { 9 | font-size: 1.5rem; 10 | } 11 | 12 | &.is-3 { 13 | font-size: 1.25rem; 14 | } 15 | 16 | &.is-4 { 17 | font-size: 1.125rem; 18 | } 19 | 20 | &.is-5 { 21 | font-size: 1rem; 22 | } 23 | 24 | &.is-header { 25 | font-family: $family-sans-serif; 26 | font-size: 1rem; 27 | font-weight: 600; 28 | line-height: 1.5rem; 29 | letter-spacing: 0em; 30 | text-align: left; 31 | } 32 | } 33 | 34 | .setting_title { 35 | /* Text 500Medium/Text02 */ 36 | 37 | font-family: $family-sans-serif; 38 | font-style: normal; 39 | font-weight: 600; 40 | font-size: 1rem; 41 | line-height: 1.5rem; 42 | /* identical to box height, or 150% */ 43 | 44 | font-feature-settings: 'pnum'on, 'lnum'on; 45 | 46 | /* Gary/800 */ 47 | 48 | color: #29343D; 49 | } -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.snap.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-root.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-hex.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-partial-download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-skg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/scss/common/_dropdown.scss: -------------------------------------------------------------------------------- 1 | .dropdown-menu { 2 | .dropdown-content { 3 | border-radius: 0.5rem; 4 | overflow-x: hidden !important; 5 | overflow-y: overlay !important; 6 | padding: 0 !important; 7 | 8 | &::-webkit-scrollbar { 9 | width: 8px; 10 | } 11 | 12 | &::-webkit-scrollbar-track { 13 | background: transparent; 14 | } 15 | 16 | &::-webkit-scrollbar-thumb { 17 | background: rgba(0, 0, 0, 0.2); 18 | border-radius: 10px; 19 | outline: none; 20 | } 21 | 22 | .dropdown-item { 23 | border-radius: 5px; 24 | overflow: hidden; 25 | padding-left: .5rem; 26 | padding-right: .5rem; 27 | text-align: left; 28 | text-overflow: ellipsis; 29 | transition: all .25s; 30 | white-space: nowrap 31 | } 32 | } 33 | } 34 | 35 | 36 | a.dropdown-item { 37 | padding-right: 1.5rem; 38 | font-size: 0.875rem; 39 | } -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-model.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-ms-dos-executable.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-wine-extension-skp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-kdenlivetitle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/filebrowser/components/SidebarMenuButton.vue: -------------------------------------------------------------------------------- 1 | 11 | 21 | 22 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-designer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/x-office-spreadsheet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: push_test_server 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | test: 8 | if: github.repository == 'IceWhaleTech/CasaOS-UI' 9 | runs-on: ubuntu-latest 10 | strategy: 11 | matrix: 12 | node-version: [ 16.x ] 13 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 14 | 15 | steps: 16 | - uses: actions/checkout@v3 17 | - name: '使用 Use Node.js ${{ matrix.node-version }}' 18 | uses: actions/setup-node@v3 19 | with: 20 | node-version: ${{ matrix.node-version }} 21 | cache: 'npm' 22 | - name: '缓存 Cache' 23 | uses: actions/cache@v3 24 | id: cache-dependencies 25 | with: 26 | path: node_modules 27 | key: ${{runner.OS}}-${{hashFiles('**/yarn.lock')}} 28 | 29 | - run: yarn install 30 | 31 | - name: 'Unit tests' 32 | run: yarn test 33 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.ms-infopath.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-kvtml.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/image-vnd.djvu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-sql.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-qml.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /public/favicon.svg: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 14 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /src/service/folder.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-12 22:42:25 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-07-14 12:15:14 6 | * @FilePath: \CasaOS-UI\src\service\folder.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import {api} from "./service.js"; 12 | 13 | const PREFIX = "/folder" 14 | 15 | const folder = { 16 | // get folder list 17 | getList(path) { 18 | return api.get(`${PREFIX}`, { 19 | path: path 20 | }); 21 | }, 22 | // create folder 23 | create(path) { 24 | return api.post(`${PREFIX}`, { 25 | path: path, 26 | }); 27 | }, 28 | 29 | // rename folder 30 | rename(old_path, new_path) { 31 | return api.put(`${PREFIX}/name`, { 32 | old_path: old_path, 33 | new_path: new_path 34 | }); 35 | }, 36 | 37 | // get folder size 38 | getFolderSize(path) { 39 | return api.get(`${PREFIX}/size`, { 40 | path: path 41 | }); 42 | }, 43 | 44 | // count folder 45 | getFolderCount(path) { 46 | return api.get(`${PREFIX}/count`, { 47 | path: path 48 | }); 49 | }, 50 | } 51 | 52 | export default folder; -------------------------------------------------------------------------------- /src/events/events.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-14 11:17:17 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2023-03-14 14:28:53 6 | * @FilePath: \CasaOS-UI-0.4.2\src\events\events.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | const events = { 12 | // Event: 'eventName', 13 | SHOW_CHANGE_WALLPAPER_MODAL: 'showChangeWallpaperModal', 14 | OPEN_APP_STORE_AND_GOTO_SYNCTHING: 'openAppStoreAndGotoSyncing', 15 | RELOAD_FILE_LIST: 'reloadFileList', 16 | SHOW_HOME_CONTEXT_MENU: 'showHomeContextMenu', 17 | RELOAD_APP_LIST: 'reloadAppList', 18 | UPDATE_SYNC_STATUS: 'updateSyncStatus', 19 | UN_SHARE: 'unShare', 20 | GOTO: 'goto', 21 | SELECT_SHARE: 'selectShare', 22 | RELOAD_MOUNT_LIST: 'reloadMountList', 23 | SHOW_MERGER_PANEL: 'showMergerPanel', 24 | REFRESH_DISKLIST: 'refreshDiskList', 25 | AFTER_FILES_ENTER: 'afterFilesEnter', 26 | SHOW_DROP_CONTEXT_MENU: 'showDropContextMenu', 27 | ACTIVE_DROP_UPLOAD: 'activeDropUpload', 28 | SHOW_FILES_SIDEBAR: 'showFilesSidebar', 29 | HIDE_FILES_SIDEBAR: 'hideFilesSidebar', 30 | }; 31 | export default events; -------------------------------------------------------------------------------- /src/assets/img/filebrowser/video-x-generic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/filebrowser/uploader/components/unsupport.vue: -------------------------------------------------------------------------------- 1 | 10 | 21 | 22 | 32 | 33 | 40 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-kplato.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-srt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | CasaOS 18 | 19 | 20 | 21 | 22 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.visio.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/filebrowser/uploader/common/utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @LastEditors: zhanghengxin ezreal.zhang@icewhale.org 3 | * @LastEditTime: 2023/4/24 上午11:20 4 | * @FilePath: /CasaOS-UI/src/components/filebrowser/uploader/common/utils.js 5 | * @Description: 6 | * 7 | * Copyright (c) 2023 by IceWhale, All Rights Reserved. 8 | 9 | */ 10 | 11 | export function secondsToStr(temp) { 12 | const years = Math.floor(temp / 31536000) 13 | if (years) { 14 | return years + ' year' + numberEnding(years) 15 | } 16 | const days = Math.floor((temp %= 31536000) / 86400) 17 | if (days) { 18 | return days + ' day' + numberEnding(days) 19 | } 20 | const hours = Math.floor((temp %= 86400) / 3600) 21 | if (hours) { 22 | return hours + ' hour' + numberEnding(hours) 23 | } 24 | const minutes = Math.floor((temp %= 3600) / 60) 25 | if (minutes) { 26 | return minutes + ' minute' + numberEnding(minutes) 27 | } 28 | const seconds = temp % 60 29 | return seconds + ' second' + numberEnding(seconds) 30 | 31 | function numberEnding(number) { 32 | return (number > 1) ? 's' : '' 33 | } 34 | } 35 | 36 | export function kebabCase(s) { 37 | return s.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`) 38 | } 39 | -------------------------------------------------------------------------------- /src/service/samba.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-27 13:49:25 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-07-27 13:55:00 6 | * @FilePath: /CasaOS-UI/src/service/samba.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import {api} from "./service.js"; 12 | 13 | const PREFIX = "/samba"; 14 | const samba = { 15 | // Connections 16 | // get the list of samba connections 17 | getConnections() { 18 | return api.get(`${PREFIX}/connections`); 19 | }, 20 | 21 | // create a connection 22 | createConnection(data) { 23 | return api.post(`${PREFIX}/connections`, data); 24 | }, 25 | 26 | // Delete a connection 27 | deleteConnection(id) { 28 | return api.delete(`${PREFIX}/connections/${id}`); 29 | }, 30 | 31 | // Shares 32 | // get share list 33 | getShares() { 34 | return api.get(`${PREFIX}/shares`); 35 | }, 36 | 37 | // create a share 38 | createShare(data) { 39 | return api.post(`${PREFIX}/shares`, data); 40 | }, 41 | 42 | // delete a share 43 | deleteShare(id) { 44 | return api.delete(`${PREFIX}/shares/${id}`); 45 | }, 46 | } 47 | export default samba; 48 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.oasis.opendocument.presentation-template.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/x-office-presentation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /.github/workflows/build_new_lang.yml: -------------------------------------------------------------------------------- 1 | name: "Language build" 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | release: 8 | runs-on: ubuntu-latest 9 | strategy: 10 | matrix: 11 | node-version: [18.x] 12 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 13 | 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: "Use Node.js ${{ matrix.node-version }}" 17 | uses: actions/setup-node@v4 18 | with: 19 | node-version: ${{ matrix.node-version }} 20 | 21 | - name: Install pnpm 22 | uses: pnpm/action-setup@v2 23 | with: 24 | version: 9.12.2 25 | run_install: false 26 | 27 | - run: pnpm install 28 | - run: pnpm build 29 | - run: | 30 | tar -zcvf linux-all-casaos-lang-build.tar.gz build 31 | 32 | - name: Archive tarball 33 | uses: actions/upload-artifact@v4 34 | with: 35 | name: ui-package 36 | path: ./linux-all-casaos-lang-build.tar.gz 37 | -------------------------------------------------------------------------------- /src/components/filebrowser/drop/DropEntryButton.vue: -------------------------------------------------------------------------------- 1 | 11 | 30 | 31 | 46 | -------------------------------------------------------------------------------- /src/assets/scss/common/_widgets.scss: -------------------------------------------------------------------------------- 1 | /************************************ 2 | * 3 | * Widgets 4 | * 5 | *************************************/ 6 | 7 | .widget { 8 | border-radius: $backDropBorderRadius; 9 | position: relative; 10 | margin-bottom: 1rem; 11 | transition: all 0.3s; 12 | 13 | .columns { 14 | margin-bottom: 0; 15 | } 16 | 17 | &:hover { 18 | box-shadow: 0px 0px 17px 0px rgba(0, 0, 0, 0.2); 19 | } 20 | 21 | .widget-content { 22 | padding: 1rem 1.25rem; 23 | position: relative; 24 | z-index: 10; 25 | } 26 | 27 | .widget-header { 28 | margin-right: -0.25rem; 29 | align-items: center; 30 | position: relative; 31 | z-index: 4; 32 | 33 | .widget-title { 34 | color: $grey-100; 35 | font-size: 1.125rem; 36 | line-height: 1.75rem; 37 | font-weight: 500; 38 | } 39 | 40 | .widget-icon-button { 41 | width: 1.5rem; 42 | height: 1.5rem; 43 | cursor: pointer; 44 | } 45 | } 46 | } 47 | 48 | .last-block { 49 | margin-bottom: 0; 50 | 51 | &.widget { 52 | margin-bottom: 0; 53 | } 54 | 55 | .widget { 56 | margin-bottom: 0; 57 | } 58 | } 59 | 60 | 61 | .is-noscroll, 62 | .is-clipped { 63 | .widget { 64 | backdrop-filter: none !important; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-fictionbook+xml.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-xmind.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-plasma.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-epub+zip.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/scss/common/_root.scss: -------------------------------------------------------------------------------- 1 | // Root Style 2 | 3 | :root { 4 | --swiper-navigation-size: 24px !important; 5 | --background: $main-background-color; 6 | } 7 | 8 | * { 9 | -webkit-tap-highlight-color: transparent; 10 | } 11 | 12 | body, 13 | html { 14 | overflow: hidden; 15 | font-family: $family-sans-serif; 16 | } 17 | 18 | 19 | .button, 20 | .input, 21 | .textarea, 22 | .taginput .taginput-container.is-focusable, 23 | .select select, 24 | .file-cta, 25 | .file-name, 26 | .pagination-previous, 27 | .pagination-next, 28 | .pagination-link, 29 | .pagination-ellipsis { 30 | &:focus { 31 | box-shadow: none; 32 | } 33 | } 34 | 35 | @font-face { 36 | font-family: 'BrittiSans'; 37 | src: url('../fonts/britti-sans-regular.woff') format('woff'); 38 | } 39 | 40 | @media screen and (max-width: 1024px) { 41 | .container { 42 | margin: 0 1rem; 43 | } 44 | } 45 | 46 | @media screen and (max-width: 480px) { 47 | .b-group { 48 | align-items: initial !important; 49 | display: block !important; 50 | width: 5rem; 51 | margin-left: 0.5rem; 52 | 53 | .ml-2 { 54 | margin-left: 0 !important; 55 | margin-top: 0.5rem !important; 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /src/assets/img/filebrowser/virtualbox-vbox.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/virtualbox-vbox-extpack.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/store/state.js: -------------------------------------------------------------------------------- 1 | const state = { 2 | // User 3 | access_token: '', 4 | refresh_token: '', 5 | user: { 6 | avatar: '', 7 | created_at: '', 8 | description: '', 9 | email: '', 10 | id: 0, 11 | nickname: '', 12 | role: '', 13 | updated_at: '', 14 | username: '', 15 | }, 16 | initKey: '', // Initialization key for reg 17 | 18 | sidebarOpen: false, 19 | 20 | // System Config 21 | searchEngine: '', 22 | searchEngineSwitch: true, 23 | existingAppsSwitch: true, 24 | recommendSwitch: true, 25 | rssSwitch: false, 26 | 27 | siteLoading: true, 28 | needInitialization: false, 29 | hardwareInfo: {}, 30 | isMobile: false, 31 | 32 | // Files 33 | operateObject: null, 34 | currentPath: '', 35 | isViewGird: true, 36 | 37 | // Wallpaper 38 | wallpaperObject: { 39 | path: require('@/assets/background/wallpaper01.jpg'), 40 | from: 'Built-in', // Built-in, Upload, Files 41 | }, 42 | 43 | // Samba and nfs data 44 | networkStorage: JSON.parse(localStorage.getItem('networkStorage')) || [], 45 | 46 | // shortcut data 47 | shortcutData: [], 48 | 49 | // public params 50 | device_id: 'xxx', 51 | access_id: 'dsdad', 52 | casaos_lang: 'zh', 53 | notImportList: [], 54 | } 55 | export default state 56 | -------------------------------------------------------------------------------- /src/assets/img/drop/notebook_offline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 9 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.iccprofile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/image-x-generic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 18 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/assets/scss/app.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Import materialdesignicons 4 | @import "~@mdi/font/css/materialdesignicons.min.css"; 5 | 6 | // Import Swiper Style 7 | @import "~swiper/css/swiper.min.css"; 8 | 9 | // Import CasaOS IconFont 10 | @import '~iconfonts-casaos/casaos-iconfonts.css'; 11 | 12 | @import "~bulma/sass/utilities/_all"; 13 | 14 | // Custom Variables 15 | @import "common/variables"; 16 | 17 | // Import Bulma and Buefy styles 18 | 19 | @import "~bulma/bulma"; 20 | @import "~buefy/src/scss/buefy"; 21 | 22 | // Import CasaOS Styles 23 | // Commons 24 | @import "common/root"; 25 | @import "common/font"; 26 | @import "common/color"; 27 | @import "common/spacing"; 28 | @import "common/buttons"; 29 | @import "common/title"; 30 | @import "common/size"; 31 | @import "common/images"; 32 | @import "common/icon"; 33 | @import "common/tabs"; 34 | @import "common/card"; 35 | @import "common/scrollbars"; 36 | @import "common/animate"; 37 | @import "common/avatar"; 38 | @import "common/modal"; 39 | @import "common/others"; 40 | @import "common/widgets"; 41 | @import "common/sections"; 42 | @import "common/toast"; 43 | @import "common/snackbar"; 44 | // following the casa design specification 45 | @import "common/dropdown"; 46 | 47 | // Pages and Components 48 | @import "components/filebrowser"; 49 | 50 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/x-media-podcast.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/service/apps.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-12 22:00:10 4 | * @LastEditors: Jerryk jerry@icewhale.org 5 | * @LastEditTime: 2022-07-14 10:21:43 6 | * @FilePath: \CasaOS-UI\src\service\apps.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import {api} from "./service.js"; 12 | 13 | const PREFIX = "/apps"; 14 | const PREFIX2 = "/v2/app_management"; 15 | 16 | const apps = { 17 | // get app list 18 | getAppList(data) { 19 | return api.get(`${PREFIX}`, data); 20 | }, 21 | 22 | //v2:: get app list 23 | getAppListV2(data) { 24 | return api.get(`${PREFIX2}/apps`, data); 25 | }, 26 | 27 | // Get app info 28 | getAppInfo(id) { 29 | return api.get(`${PREFIX}/${id}`); 30 | }, 31 | 32 | //v2:: Get app info about store。 33 | getAppInfoV2(id) { 34 | return api.get(`${PREFIX2}/apps/${id}`); 35 | }, 36 | 37 | //v2:: Get app info about config。 38 | getAppConfigV2(id) { 39 | return api.get(`${PREFIX2}/container/${id}`); 40 | }, 41 | 42 | // Check app version 43 | checkAppVersion(id) { 44 | return api.patch(`${PREFIX2}/container/${id}`); 45 | }, 46 | 47 | // Check port 48 | checkPort() { 49 | return api.get(`/v2/casaos/health/ports`); 50 | } 51 | 52 | } 53 | 54 | export default apps; -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.ms-publisher.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /public/img/icon/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-firmware.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | image/svg+xml 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/logo/casa-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/components/filebrowser/drop/DropCenterIcon.vue: -------------------------------------------------------------------------------- 1 | 11 | 27 | 28 | 33 | 34 | 48 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/image-vnd.dgn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/image-vnd.dwg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/drop/notebook_online.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 12 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/drop/desktop_offline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 9 | 12 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-generic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-script.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-kotlin.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 28 | 29 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-cmake.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-ruby.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/office-contact.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.oasis.opendocument.formula-template.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/Apps/AppSectionTitleTip.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 46 | 47 | 62 | -------------------------------------------------------------------------------- /src/store/actions.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-06-02 19:50:08 4 | * @LastEditors: zhanghengxin ezreal.ice@icloud.com 5 | * @LastEditTime: 2022-08-30 16:16:32 6 | * @FilePath: /CasaOS-UI/src/store/actions.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | 12 | import $api from "@/service/api.js"; 13 | 14 | const actions = { 15 | // GET_HARDWARE_INFO(context, val) { 16 | // context.commit("GET_HARDWARE_INFO",val) 17 | // }, 18 | // set shortcut data 19 | async SET_SHORTCUT_DATA(context, val) { 20 | try { 21 | // Changing the shortcut data structure 22 | val.forEach((item) => { 23 | item.icon = 'folder' 24 | item.pack = 'casa' 25 | item.visible = true 26 | item.selected = true 27 | item.extensions = null 28 | }) 29 | let data = await $api.users.saveShutcutDetail(val).then(v => v.data.data); 30 | context.commit("SET_SHORTCUT_DATA", data) 31 | } catch (e) { 32 | console.log(e) 33 | } 34 | }, 35 | 36 | //get shortcut data 37 | async GET_SHORTCUT_DATA(context, val) { 38 | try { 39 | let data = await $api.users.getShutcutDetail(val).then(v => v.data.data); 40 | if (!data) { 41 | data = [] 42 | } 43 | context.commit("SET_SHORTCUT_DATA", data) 44 | } catch (e) { 45 | console.log(e) 46 | } 47 | } 48 | 49 | } 50 | export default actions 51 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.oasis.opendocument.formula.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-python.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-tcl.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 28 | 29 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-shellscript.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 28 | 29 | -------------------------------------------------------------------------------- /src/assets/img/drop/desktop_online.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 12 | 15 | 16 | 17 | 19 | 20 | -------------------------------------------------------------------------------- /public/img/driver/GoogleDrive.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-rss_xml.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-lua.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/x-kde-nsplugin-generated.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/text-x-po.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 29 | 30 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/virtualbox-hdd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/virtualbox-ova.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/virtualbox-ovf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/virtualbox-vdi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/virtualbox-vhd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.flatpak.ref.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | image/svg+xml 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/virtualbox-vmdk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/components/filebrowser/components/IconContainer.vue: -------------------------------------------------------------------------------- 1 | 11 | 24 | 25 | 33 | 34 | -------------------------------------------------------------------------------- /src/assets/img/drop/tablet_offline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 9 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/assets/scss/common/_images.scss: -------------------------------------------------------------------------------- 1 | /************************************ 2 | * 3 | * Images 4 | * 5 | *************************************/ 6 | 7 | .image { 8 | &.is-40x40 { 9 | height: 40px; 10 | width: 40px; 11 | 12 | img { 13 | height: 40px; 14 | width: 40px !important; 15 | max-height: 40px !important; 16 | } 17 | } 18 | 19 | &.is-28x28 { 20 | height: 28px; 21 | width: 28px; 22 | } 23 | 24 | &.is-54x54 { 25 | height: 54px; 26 | width: 54px; 27 | } 28 | 29 | &.is-64x64 { 30 | height: 64px; 31 | width: 64px; 32 | } 33 | 34 | &.is-68x68 { 35 | height: 68px; 36 | width: 68px; 37 | } 38 | 39 | &.is-72x72 { 40 | height: 72px; 41 | width: 72px; 42 | } 43 | 44 | &.is-80x80 { 45 | height: 80px; 46 | width: 80px; 47 | img { 48 | height: 80px; 49 | width: 80px !important; 50 | max-height: 80px !important; 51 | } 52 | } 53 | 54 | &.is-100x100 { 55 | height: 80px; 56 | width: 80px; 57 | } 58 | 59 | &.is-160x160 { 60 | height: 160px; 61 | width: 160px; 62 | } 63 | 64 | &.is-176x176 { 65 | height: 176px; 66 | width: 176px; 67 | } 68 | 69 | } 70 | 71 | .img-c { 72 | .image { 73 | cursor: pointer; 74 | transition: all 0.3s; 75 | } 76 | 77 | .image.disabled { 78 | transition: none; 79 | } 80 | 81 | &:hover { 82 | .image { 83 | transform: scale3d(1.1, 1.1, 1.1); 84 | } 85 | 86 | .image.disabled { 87 | pointer-events: none; 88 | transform: scale3d(1, 1, 1); 89 | } 90 | } 91 | } -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-vnd.flatpak.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/font-x-generic.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/inode-symlink.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 28 | 29 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-wine-extension-cpl.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 28 | 29 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-msonenote.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/audio-midi.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 29 | 30 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-lzop.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-tar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-tarz.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-tzo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-gzpostscript.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-lzma-compressed-tar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/drop/tablet_online.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 12 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/image-svg+xml.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-ace.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-ar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-arc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-arj.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-bzdvi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-bzip.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-gzip.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-zip.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/service/local_storage.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Jerryk jerry@icewhale.org 3 | * @Date: 2022-07-14 18:15:24 4 | * @LastEditors: zhanghengxin ezreal.ice@icloud.com 5 | * @LastEditTime: 2022-09-21 01:00:44 6 | * @FilePath: /CasaOS-UI/src/service/local_storage.js 7 | * @Description: 8 | * 9 | * Copyright (c) 2022 by IceWhale, All Rights Reserved. 10 | */ 11 | import {api} from "./service.js"; 12 | 13 | const PREFIX = "/v2/local_storage"; 14 | const local_storage = { 15 | // Gets the storage list mounted to the mergerfs 16 | get(data) { 17 | return api.get(`${PREFIX}/mount`, data) 18 | }, 19 | 20 | // create the storage list mounted to the mergerfs 21 | create(data) { 22 | return api.post(`${PREFIX}/mount`, data); 23 | }, 24 | 25 | // update the storage list mounted to the mergerfs 26 | update(data) { 27 | return api.put(`${PREFIX}/mount?mount_point=${data.mount_point}`, data); 28 | }, 29 | 30 | // init mergerfs 31 | initMergerfs(data) { 32 | return api.post(`${PREFIX}/merge/init`, data); 33 | }, 34 | 35 | // get mergerfs status 36 | getInitMergerfsStatus() { 37 | return api.get(`${PREFIX}/merge/init`); 38 | }, 39 | 40 | // delete the storage list mounted to the mergerfs 41 | delete(data) { 42 | return api.delete(`${PREFIX}/mount`, data); 43 | }, 44 | 45 | // get mergerfs info 46 | getMergerfsInfo(data) { 47 | return api.get(`${PREFIX}/merge`, data); 48 | }, 49 | 50 | // update mergerfs info 51 | updateMergerfsInfo(data) { 52 | return api.post(`${PREFIX}/merge`, data); 53 | }, 54 | } 55 | export default local_storage; 56 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-rar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/components/filebrowser/components/ListIconContainer.vue: -------------------------------------------------------------------------------- 1 | 11 | 24 | 25 | 33 | 34 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-x-bzip-compressed-tar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/extension.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 18 | 19 | -------------------------------------------------------------------------------- /src/assets/img/filebrowser/application-pgp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 14 | 15 | --------------------------------------------------------------------------------