diff --git a/.gitignore b/.gitignore index 9bccd19..9b3fbd7 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,8 @@ gen __debug_bin main CasaOS +github.com .all-contributorsrc +build dist .goreleaser.yaml \ No newline at end of file diff --git a/route/v1/app.go b/route/v1/app.go index 92a7c2d..1a9f278 100644 --- a/route/v1/app.go +++ b/route/v1/app.go @@ -220,6 +220,7 @@ func AppInfo(c *gin.Context) { // sort.EnvSort(envOrder).Sort(info.Envs) // sort.VolSort(volOrder).Sort(info.Volumes.([]model.PathMap)) // sort.DevSort(devOrder).Sort(info.Devices) + info.Image += ":" + info.ImageVersion info.MaxMemory = (service.MyService.System().GetMemInfo()["total"]).(uint64) >> 20 c.JSON(common_err.SUCCESS, &model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: info}) diff --git a/route/v1/disk.go b/route/v1/disk.go index 271c9b5..7601eb4 100644 --- a/route/v1/disk.go +++ b/route/v1/disk.go @@ -3,6 +3,7 @@ package v1 import ( "fmt" "net/http" + "path/filepath" "reflect" "strconv" "strings" @@ -210,6 +211,9 @@ func GetDisksUSBList(c *gin.Context) { tempChildren.Size, _ = strconv.ParseUint(child.FSSize, 10, 64) tempChildren.Avail, _ = strconv.ParseUint(child.FSAvail, 10, 64) tempChildren.Name = child.Label + if len(tempChildren.Name) == 0 { + tempChildren.Name = filepath.Base(child.MountPoint) + } avail, _ := strconv.ParseUint(child.FSAvail, 10, 64) children = append(children, tempChildren) temp.Avail += avail diff --git a/web/img/CasaConnect.svg b/web/img/CasaConnect.svg new file mode 100644 index 0000000..a5abb0e --- /dev/null +++ b/web/img/CasaConnect.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/web/img/Files.svg b/web/img/Files.svg new file mode 100644 index 0000000..3ab1bd1 --- /dev/null +++ b/web/img/Files.svg @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..74b1137 --- /dev/null +++ b/web/index.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + CasaOS + + + + + +
+ + + + diff --git a/web/js/4.js b/web/js/4.js new file mode 100644 index 0000000..ad6f737 --- /dev/null +++ b/web/js/4.js @@ -0,0 +1,1897 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[4],{"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/Apps/AppCard.vue?vue&type=script&lang=js&": +/*!*********************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Apps/AppCard.vue?vue&type=script&lang=js& ***! + \*********************************************************************************************************************************************************************************************************************************************************/ +/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _events_events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/events/events */ "./src/events/events.js");\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__["default"] = ({\n name: "app-card",\n inject: ["homeShowFiles", "openAppStore"],\n data: function data() {\n return {\n hover: false,\n dropState: false,\n isUninstalling: false,\n isRestarting: false,\n isStarting: false,\n isStoping: false,\n isSaving: false\n };\n },\n props: {\n item: {\n type: Object\n },\n isCasa: {\n type: Boolean\n }\n },\n computed: {\n tooltipLable: function tooltipLable() {\n if (!this.isCasa) {\n return this.$t(\'Import to CasaOS\');\n } else {\n if (this.item.type === "system" || this.item.port != "" && this.item.state == \'running\') {\n return this.$t(\'Open\');\n } else {\n return this.$t(\'Setting\');\n }\n }\n },\n tooltipTriger: function tooltipTriger() {\n if (!this.isCasa) {\n return [\'hover\'];\n } else {\n if (this.item.type === "system" || this.item.port != "" && this.item.state == \'running\') {\n return [\'hover\'];\n } else {\n return [];\n }\n }\n }\n },\n methods: {\n /**\r\n * @description: Open app in new windows\r\n * @param {String} state App state\r\n * @param {String} port App access port\r\n * @param {String} index App access index\r\n * @return {*} void\r\n */\n openApp: function openApp(item) {\n if (!this.isCasa) {\n this.$emit("importApp", item.id, item.state, false);\n return false;\n }\n\n if (item.type === "system") {\n this.openSystemApps(item);\n } else {\n this.$refs.dro.isActive = false;\n\n if (item.port != "" && item.state == \'running\') {\n var hostIp = item.host || this.$baseIp;\n var protocol = item.protocol || \'http\';\n var url = "".concat(protocol, "://").concat(hostIp, ":").concat(item.port).concat(item.index);\n\n if (item.image.toLowerCase().indexOf("qbittorrent") == -1) {\n window.open(url, \'_blank\');\n } else {\n var arg = "