diff --git a/CHANGELOG.md b/CHANGELOG.md index d04fd83..3ed5bfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -## [0.3.3-pre] - +## [0.3.3-pre] - 2022-07-01(UTC) ### Added diff --git a/alpha.md b/alpha.md index 9009e97..d730c68 100644 --- a/alpha.md +++ b/alpha.md @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2022-06-27 11:37:26 * @LastEditors: LinkLeong - * @LastEditTime: 2022-06-27 16:57:38 + * @LastEditTime: 2022-06-30 14:16:31 * @FilePath: /CasaOS/alpha.md * @Description: * @Website: https://www.casaos.io @@ -17,7 +17,7 @@ There is a risk of data loss in non-release versions, so please be careful to ba ## Install/Update -``` curl -fsSL https://get.casaos.io/casaos_new.sh | bash -v v0.3.3-alpha ``` +``` curl -fsSL https://get.casaos.io | bash -v v0.3.3-alpha ``` ## Check change log @@ -27,7 +27,9 @@ There is a risk of data loss in non-release versions, so please be careful to ba [Design drawings](https://www.figma.com/file/pvlGobvuWEvbCb3GLqXfim/CasaOS-V0.3.3) -## 提交issue 需要打标签 +## Feedback questions + +Go [here]() to give feedback on your question, note that try to match the picture or video ## Retest after update diff --git a/conf/conf.conf.sample b/conf/conf.conf.sample index de399fc..5dfe5a6 100644 --- a/conf/conf.conf.sample +++ b/conf/conf.conf.sample @@ -14,7 +14,7 @@ UserDataPath = /var/lib/casaos/conf TempPath = /var/lib/casaos/temp [server] -HttpPort = 8089 +HttpPort = 80 UDPPort = RunMode = release ServerApi = https://api.casaos.io/casaos-api diff --git a/pkg/utils/version/version.go b/pkg/utils/version/version.go index d2c801a..de857d2 100644 --- a/pkg/utils/version/version.go +++ b/pkg/utils/version/version.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong - * @LastEditTime: 2022-06-22 15:24:01 + * @LastEditTime: 2022-06-29 14:29:34 * @FilePath: /CasaOS/pkg/utils/version/version.go * @Description: * @Website: https://www.casaos.io @@ -39,6 +39,9 @@ func IsNeedUpdate(version model.Version) (bool, model.Version) { if a > b { return true, version } + if a < b { + return false, version + } } return false, version } diff --git a/route/init.go b/route/init.go index 77fd0d2..6967c7f 100644 --- a/route/init.go +++ b/route/init.go @@ -25,7 +25,7 @@ import ( func InitFunction() { go checkSystemApp() - Update2_3() + ShellInit() CheckSerialDiskMount() CheckToken2_11() @@ -200,8 +200,12 @@ func CheckSerialDiskMount() { service.MyService.Disk().RemoveLSBLKCache() command.OnlyExec("source " + config.AppInfo.ShellPath + "/helper.sh ;AutoRemoveUnuseDir") } -func Update2_3() { - command.OnlyExec("source " + config.AppInfo.ShellPath + "/assist.sh") +func ShellInit() { + command.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/assist.sh | bash") + if !file.CheckNotExist("/casaOS") { + command.OnlyExec("source /casaOS/server/shell/update.sh ;") + command.OnlyExec("source " + config.AppInfo.ShellPath + "/delete-old-service.sh ;") + } } func CheckToken2_11() { diff --git a/route/periodical.go b/route/periodical.go index 4c0d8cc..4ee7d8c 100644 --- a/route/periodical.go +++ b/route/periodical.go @@ -1,8 +1,18 @@ +/* + * @Author: LinkLeong link@icewhale.com + * @Date: 2022-07-01 15:11:36 + * @LastEditors: LinkLeong + * @LastEditTime: 2022-07-01 15:16:00 + * @FilePath: /CasaOS/route/periodical.go + * @Description: + * @Website: https://www.casaos.io + * Copyright (c) 2022 by icewhale, All Rights Reserved. + */ /* * @Author: LinkLeong link@icewhale.com * @Date: 2022-05-27 15:55:36 * @LastEditors: LinkLeong - * @LastEditTime: 2022-06-24 17:18:46 + * @LastEditTime: 2022-06-29 16:47:19 * @FilePath: /CasaOS/route/periodical.go * @Description: * @Website: https://www.casaos.io @@ -96,16 +106,16 @@ func SendDiskBySocket() { findSystem += 1 continue } - if list[i].Tran == "sata" || list[i].Tran == "nvme" || list[i].Tran == "spi" || list[i].Tran == "sas" || strings.Contains(list[i].SubSystems, "virtio") || list[i].Tran == "ata" { + if list[i].Tran == "sata" || list[i].Tran == "nvme" || list[i].Tran == "spi" || list[i].Tran == "sas" || strings.Contains(list[i].SubSystems, "virtio") || (list[i].Tran == "ata" && list[i].Type == "disk") { temp := service.MyService.Disk().SmartCTL(list[i].Path) if reflect.DeepEqual(temp, model.SmartctlA{}) { - continue + healthy = true + } else { + healthy = temp.SmartStatus.Passed } //list[i].Temperature = temp.Temperature.Current - if !temp.SmartStatus.Passed { - healthy = false - } + if len(list[i].Children) > 0 { for _, v := range list[i].Children { s, _ := strconv.ParseUint(v.FSSize, 10, 64) @@ -219,15 +229,12 @@ func SendAllHardwareStatusBySocket() { findSystem += 1 continue } - if list[i].Tran == "sata" || list[i].Tran == "nvme" || list[i].Tran == "spi" || list[i].Tran == "sas" || strings.Contains(list[i].SubSystems, "virtio") || list[i].Tran == "ata" { + if list[i].Tran == "sata" || list[i].Tran == "nvme" || list[i].Tran == "spi" || list[i].Tran == "sas" || strings.Contains(list[i].SubSystems, "virtio") || (list[i].Tran == "ata" && list[i].Type == "disk") { temp := service.MyService.Disk().SmartCTL(list[i].Path) if reflect.DeepEqual(temp, model.SmartctlA{}) { - continue - } - - //list[i].Temperature = temp.Temperature.Current - if !temp.SmartStatus.Passed { - healthy = false + healthy = true + } else { + healthy = temp.SmartStatus.Passed } if len(list[i].Children) > 0 { for _, v := range list[i].Children { diff --git a/route/v1/disk.go b/route/v1/disk.go index df18b2e..59afcbc 100644 --- a/route/v1/disk.go +++ b/route/v1/disk.go @@ -111,7 +111,7 @@ func GetDiskList(c *gin.Context) { continue } - if list[i].Tran == "sata" || list[i].Tran == "nvme" || list[i].Tran == "spi" || list[i].Tran == "sas" || strings.Contains(list[i].SubSystems, "virtio") || list[i].Tran == "ata" { + if list[i].Tran == "sata" || list[i].Tran == "nvme" || list[i].Tran == "spi" || list[i].Tran == "sas" || strings.Contains(list[i].SubSystems, "virtio") || (list[i].Tran == "ata" && list[i].Type == "disk") { temp := service.MyService.Disk().SmartCTL(list[i].Path) if reflect.DeepEqual(temp, model.SmartctlA{}) { temp.SmartStatus.Passed = true diff --git a/route/v1/system.go b/route/v1/system.go index 026514f..4b57278 100644 --- a/route/v1/system.go +++ b/route/v1/system.go @@ -14,6 +14,7 @@ import ( "github.com/IceWhaleTech/CasaOS/model" "github.com/IceWhaleTech/CasaOS/pkg/config" "github.com/IceWhaleTech/CasaOS/pkg/utils/common_err" + "github.com/IceWhaleTech/CasaOS/pkg/utils/loger" port2 "github.com/IceWhaleTech/CasaOS/pkg/utils/port" "github.com/IceWhaleTech/CasaOS/pkg/utils/version" "github.com/IceWhaleTech/CasaOS/service" @@ -21,6 +22,7 @@ import ( "github.com/IceWhaleTech/CasaOS/types" "github.com/gin-gonic/gin" uuid "github.com/satori/go.uuid" + "go.uber.org/zap" ) // @Summary check version @@ -66,7 +68,7 @@ func SystemUpdate(c *gin.Context) { //Get system config func GetSystemConfig(c *gin.Context) { - c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: json.RawMessage(config.SystemConfigInfo.ConfigStr)}) + c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: ""}) } // @Summary get logs @@ -344,6 +346,8 @@ func GetSystemUtilization(c *gin.Context) { s, _ := strconv.ParseUint(v.FSSize, 10, 64) a, _ := strconv.ParseUint(v.FSAvail, 10, 64) u, _ := strconv.ParseUint(v.FSUsed, 10, 64) + loger.Info("disk info", zap.Any("/ total:", s)) + loger.Info("disk path", zap.Any("path", v.Path)) summary.Size += s summary.Avail += a summary.Used += u @@ -356,6 +360,8 @@ func GetSystemUtilization(c *gin.Context) { s, _ := strconv.ParseUint(list[i].Children[j].FSSize, 10, 64) a, _ := strconv.ParseUint(list[i].Children[j].FSAvail, 10, 64) u, _ := strconv.ParseUint(list[i].Children[j].FSUsed, 10, 64) + loger.Info("disk info", zap.Any("/ total:", s)) + loger.Info("disk path", zap.Any("path", list[i].Path)) summary.Size += s summary.Avail += a summary.Used += u @@ -370,21 +376,20 @@ func GetSystemUtilization(c *gin.Context) { findSystem += 1 continue } - if list[i].Tran == "sata" || list[i].Tran == "nvme" || list[i].Tran == "spi" || list[i].Tran == "sas" || strings.Contains(list[i].SubSystems, "virtio") || list[i].Tran == "ata" { + if list[i].Tran == "sata" || list[i].Tran == "nvme" || list[i].Tran == "spi" || list[i].Tran == "sas" || strings.Contains(list[i].SubSystems, "virtio") || (list[i].Tran == "ata" && list[i].Type == "disk") { temp := service.MyService.Disk().SmartCTL(list[i].Path) if reflect.DeepEqual(temp, model.SmartctlA{}) { - continue - } - - //list[i].Temperature = temp.Temperature.Current - if !temp.SmartStatus.Passed { - healthy = false + healthy = true + } else { + healthy = temp.SmartStatus.Passed } if len(list[i].Children) > 0 { for _, v := range list[i].Children { s, _ := strconv.ParseUint(v.FSSize, 10, 64) a, _ := strconv.ParseUint(v.FSAvail, 10, 64) u, _ := strconv.ParseUint(v.FSUsed, 10, 64) + loger.Info("disk info", zap.Any("/ total:", s)) + loger.Info("disk path", zap.Any("path", list[i].Path)) summary.Size += s summary.Avail += a summary.Used += u @@ -545,9 +550,9 @@ func GetSystemNetInfo(c *gin.Context) { // @Success 200 {string} string "ok" // @Router /guide/check [get] func GetGuideCheck(c *gin.Context) { - initUser := false - if !config.UserInfo.Initialized { - initUser = true + initUser := true + if service.MyService.User().GetUserCount() > 0 { + initUser = false } data := make(map[string]interface{}, 1) data["need_init_user"] = initUser diff --git a/route/v1/user.go b/route/v1/user.go index bcf34e4..f9bb4c8 100644 --- a/route/v1/user.go +++ b/route/v1/user.go @@ -195,7 +195,7 @@ func PutUserName(c *gin.Context) { c.BindJSON(&json) //userName := json["user_name"] username := json["username"] - id := json["id"] + id := json["user_id"] if len(username) == 0 { c.JSON(http.StatusOK, model.Result{Success: common_err.ERROR, Message: common_err.GetMsg(common_err.ERROR)}) return @@ -225,7 +225,7 @@ func PutUserPwd(c *gin.Context) { c.BindJSON(&json) oldPwd := json["old_pwd"] pwd := json["pwd"] - id := json["id"] + id := json["user_id"] if len(oldPwd) == 0 || len(pwd) == 0 { c.JSON(http.StatusOK, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) return @@ -260,7 +260,7 @@ func PutUserNick(c *gin.Context) { json := make(map[string]string) c.BindJSON(&json) nickName := json["nick_name"] - id := json["id"] + id := json["user_id"] if len(nickName) == 0 { c.JSON(http.StatusOK, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) return @@ -290,7 +290,7 @@ func PutUserDesc(c *gin.Context) { // id := c.GetHeader("user_id") json := make(map[string]string) c.BindJSON(&json) - id := json["id"] + id := json["user_id"] desc := json["description"] if len(desc) == 0 { c.JSON(http.StatusOK, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) @@ -319,18 +319,27 @@ func PutUserDesc(c *gin.Context) { // @Success 200 {string} string "ok" // @Router /user/person/info [post] func PostUserPersonInfo(c *gin.Context) { - desc := c.PostForm("description") - nickName := c.PostForm("nick_name") + json := make(map[string]string) + c.BindJSON(&json) + desc := json["description"] + nickName := json["nick_name"] + id := json["user_id"] if len(desc) == 0 || len(nickName) == 0 { c.JSON(http.StatusOK, model.Result{Success: common_err.INVALID_PARAMS, Message: common_err.GetMsg(common_err.INVALID_PARAMS)}) return } + user := service.MyService.User().GetUserInfoById(id) + if user.Id == 0 { + c.JSON(http.StatusOK, + model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)}) + return + } //user_service.SetUser("", "", "", "", desc, nickName) - data := make(map[string]string, 2) - data["description"] = config.UserInfo.Description - data["nick_name"] = config.UserInfo.NickName + user.NickName = nickName + user.Description = desc + service.MyService.User().UpdateUser(user) go service.MyService.Casa().PushUserInfo() - c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: data}) + c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: user}) } // @Summary get user info @@ -711,7 +720,7 @@ func Set_Name_Pwd(c *gin.Context) { } user := model2.UserDBModel{} user.UserName = username - user.Password = encryption.GetMD5ByStr(config.UserInfo.PWD) + user.Password = encryption.GetMD5ByStr(pwd) user.Role = "admin" user = service.MyService.User().CreateUser(user) diff --git a/service/system.go b/service/system.go index b74dbc5..7d693e3 100644 --- a/service/system.go +++ b/service/system.go @@ -208,9 +208,8 @@ func (c *systemService) GetNet(physics bool) []string { } func (s *systemService) UpdateSystemVersion(version string) { - //command2.OnlyExec("curl -fsSL https://get.casaos.io | bash") + command2.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/update.sh | bash") //s.log.Error(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version) - command2.ExecResultStrArray("source " + config.AppInfo.ShellPath + "/tools.sh ;update " + version) //s.log.Error(command2.ExecResultStr(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version)) } func (s *systemService) UpdateAssist() { diff --git a/shell/assist.sh b/shell/assist.sh index 8ffde33..7a693aa 100644 --- a/shell/assist.sh +++ b/shell/assist.sh @@ -1,50 +1,3 @@ #!/bin/bash -### - # @Author: LinkLeong link@icewhale.com - # @Date: 2022-02-17 18:53:29 - # @LastEditors: LinkLeong - # @LastEditTime: 2022-06-27 14:14:26 - # @FilePath: /CasaOS/shell/assist.sh - # @Description: - # @Website: https://www.casaos.io - # Copyright (c) 2022 by icewhale, All Rights Reserved. -### - -# add in v0.2.5 - -readonly CASA_DEPANDS="curl smartmontools parted fdisk ntfs-3g" - -version_0_2_5() { - install_depends "$CASA_DEPANDS" -} -version_0_2_11() { - sysctl -w net.core.rmem_max=2500000 -} - -#Install Depends -install_depends() { - ((EUID)) && sudo_cmd="sudo" - if [[ ! -x "$(command -v '$1')" ]]; then - packagesNeeded=$1 - if [ -x "$(command -v apk)" ]; then - $sudo_cmd apk add --no-cache $packagesNeeded - elif [ -x "$(command -v apt-get)" ]; then - $sudo_cmd apt-get -y -q install $packagesNeeded - elif [ -x "$(command -v dnf)" ]; then - $sudo_cmd dnf install $packagesNeeded - elif [ -x "$(command -v zypper)" ]; then - $sudo_cmd zypper install $packagesNeeded - fi - fi -} - -mvfoder() { - #移动脚本 - -} - -version_0_2_5 - -version_0_2_11 diff --git a/shell/delete-old-service.sh b/shell/delete-old-service.sh new file mode 100644 index 0000000..41ccb88 --- /dev/null +++ b/shell/delete-old-service.sh @@ -0,0 +1,105 @@ +#!/bin/bash +### + # @Author: LinkLeong link@icewhale.com + # @Date: 2022-06-30 10:08:33 + # @LastEditors: LinkLeong + # @LastEditTime: 2022-07-01 11:17:54 + # @FilePath: /CasaOS/shell/delete-old-service.sh + # @Description: +### + +((EUID)) && sudo_cmd="sudo" + +# SYSTEM INFO +readonly UNAME_M="$(uname -m)" + +# CasaOS PATHS +readonly CASA_REPO=IceWhaleTech/CasaOS +readonly CASA_UNZIP_TEMP_FOLDER=/tmp/casaos +readonly CASA_BIN=casaos +readonly CASA_BIN_PATH=/usr/bin/casaos +readonly CASA_CONF_PATH=/etc/casaos.conf +readonly CASA_SERVICE_PATH=/etc/systemd/system/casaos.service +readonly CASA_HELPER_PATH=/usr/share/casaos/shell/ +readonly CASA_USER_CONF_PATH=/var/lib/casaos/conf/ +readonly CASA_DB_PATH=/var/lib/casaos/db/ +readonly CASA_TEMP_PATH=/var/lib/casaos/temp/ +readonly CASA_LOGS_PATH=/var/log/casaos/ +readonly CASA_PACKAGE_EXT=".tar.gz" +readonly CASA_RELEASE_API="https://api.github.com/repos/${CASA_REPO}/releases" +readonly CASA_OPENWRT_DOCS="https://github.com/IceWhaleTech/CasaOS-OpenWrt" + +readonly COLOUR_RESET='\e[0m' +readonly aCOLOUR=( + '\e[38;5;154m' # green | Lines, bullets and separators + '\e[1m' # Bold white | Main descriptions + '\e[90m' # Grey | Credits + '\e[91m' # Red | Update notifications Alert + '\e[33m' # Yellow | Emphasis +) + +Target_Arch="" +Target_Distro="debian" +Target_OS="linux" +Casa_Tag="" + + +####################################### +# Custom printing function +# Globals: +# None +# Arguments: +# $1 0:OK 1:FAILED 2:INFO 3:NOTICE +# message +# Returns: +# None +####################################### + +Show() { + # OK + if (($1 == 0)); then + echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[0]} OK $COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" + # FAILED + elif (($1 == 1)); then + echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[3]}FAILED$COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" + # INFO + elif (($1 == 2)); then + echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[0]} INFO $COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" + # NOTICE + elif (($1 == 3)); then + echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[4]}NOTICE$COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" + fi +} + +Warn() { + echo -e "${aCOLOUR[3]}$1$COLOUR_RESET" +} + +# 0 Check_exist +Check_Exist() { + #Create Dir + Show 2 "Create Folders." + ${sudo_cmd} mkdir -p ${CASA_HELPER_PATH} + ${sudo_cmd} mkdir -p ${CASA_LOGS_PATH} + ${sudo_cmd} mkdir -p ${CASA_USER_CONF_PATH} + ${sudo_cmd} mkdir -p ${CASA_DB_PATH} + ${sudo_cmd} mkdir -p ${CASA_TEMP_PATH} + + + Show 2 "Start cleaning up the old version." + + ${sudo_cmd} rm -rf /usr/lib/systemd/system/casaos.service + + ${sudo_cmd} rm -rf /lib/systemd/system/casaos.service + + ${sudo_cmd} rm -rf /usr/local/bin/${CASA_BIN} + + #Clean + if [[ -d "/casaOS" ]]; then + ${sudo_cmd} rm -rf /casaOS + fi + Show 0 "Clearance completed." + + $sudo_cmd systemctl restart ${CASA_BIN} +} +Check_Exist diff --git a/shell/tools.sh b/shell/tools.sh deleted file mode 100644 index 8ce62d6..0000000 --- a/shell/tools.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -### - # @Author: LinkLeong link@icewhale.com - # @Date: 2021-12-06 17:12:32 - # @LastEditors: LinkLeong - # @LastEditTime: 2022-06-27 14:23:15 - # @FilePath: /CasaOS/shell/tools.sh - # @Description: - # @Website: https://www.casaos.io - # Copyright (c) 2022 by icewhale, All Rights Reserved. -### - -####################################### -# Custom printing function -# Globals: -# None -# Arguments: -# $1 0:OK 1:FAILED -# message -# Returns: -# None -####################################### - - -run_external_script() { - assist.sh -} - -update() { - curl -fsSL https://get.icewhale.io/casaos.sh | bash - run_external_script -} \ No newline at end of file diff --git a/shell/update.sh b/shell/update.sh new file mode 100644 index 0000000..bbe5f67 --- /dev/null +++ b/shell/update.sh @@ -0,0 +1,268 @@ +#!/bin/bash +### + # @Author: LinkLeong link@icewhale.com + # @Date: 2022-06-30 10:08:33 + # @LastEditors: LinkLeong + # @LastEditTime: 2022-07-01 11:18:07 + # @FilePath: /CasaOS/shell/update.sh + # @Description: +### + +((EUID)) && sudo_cmd="sudo" + +# SYSTEM INFO +readonly UNAME_M="$(uname -m)" + +# CasaOS PATHS +readonly CASA_REPO=IceWhaleTech/CasaOS +readonly CASA_UNZIP_TEMP_FOLDER=/tmp/casaos +readonly CASA_BIN=casaos +readonly CASA_BIN_PATH=/usr/bin/casaos +readonly CASA_CONF_PATH=/etc/casaos.conf +readonly CASA_SERVICE_PATH=/etc/systemd/system/casaos.service +readonly CASA_HELPER_PATH=/usr/share/casaos/shell/ +readonly CASA_USER_CONF_PATH=/var/lib/casaos/conf/ +readonly CASA_DB_PATH=/var/lib/casaos/db/ +readonly CASA_TEMP_PATH=/var/lib/casaos/temp/ +readonly CASA_LOGS_PATH=/var/log/casaos/ +readonly CASA_PACKAGE_EXT=".tar.gz" +readonly CASA_RELEASE_API="https://api.github.com/repos/${CASA_REPO}/releases" +readonly CASA_OPENWRT_DOCS="https://github.com/IceWhaleTech/CasaOS-OpenWrt" + +readonly COLOUR_RESET='\e[0m' +readonly aCOLOUR=( + '\e[38;5;154m' # green | Lines, bullets and separators + '\e[1m' # Bold white | Main descriptions + '\e[90m' # Grey | Credits + '\e[91m' # Red | Update notifications Alert + '\e[33m' # Yellow | Emphasis +) + +Target_Arch="" +Target_Distro="debian" +Target_OS="linux" +Casa_Tag="" + + +####################################### +# Custom printing function +# Globals: +# None +# Arguments: +# $1 0:OK 1:FAILED 2:INFO 3:NOTICE +# message +# Returns: +# None +####################################### + +Show() { + # OK + if (($1 == 0)); then + echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[0]} OK $COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" + # FAILED + elif (($1 == 1)); then + echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[3]}FAILED$COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" + # INFO + elif (($1 == 2)); then + echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[0]} INFO $COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" + # NOTICE + elif (($1 == 3)); then + echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[4]}NOTICE$COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" + fi +} + +Warn() { + echo -e "${aCOLOUR[3]}$1$COLOUR_RESET" +} + +# 0 Check_exist +Check_Exist() { + #Create Dir + Show 2 "Create Folders." + ${sudo_cmd} mkdir -p ${CASA_HELPER_PATH} + ${sudo_cmd} mkdir -p ${CASA_LOGS_PATH} + ${sudo_cmd} mkdir -p ${CASA_USER_CONF_PATH} + ${sudo_cmd} mkdir -p ${CASA_DB_PATH} + ${sudo_cmd} mkdir -p ${CASA_TEMP_PATH} + + + Show 2 "Start cleaning up the old version." + + ${sudo_cmd} rm -rf /usr/lib/systemd/system/casaos.service + + ${sudo_cmd} rm -rf /lib/systemd/system/casaos.service + + if [[ -f "/casaOS/server/conf/conf.ini" ]]; then + ${sudo_cmd} cp -rf /casaOS/server/conf/conf.ini ${CASA_CONF_PATH} + ${sudo_cmd} cp -rf /casaOS/server/conf/*.json ${CASA_USER_CONF_PATH} + fi + + if [[ -d "/casaOS/server/db" ]]; then + ${sudo_cmd} cp -rf /casaOS/server/db/* ${CASA_DB_PATH} + fi + + Show 0 "Clearance completed." + +} + +# 1 Check Arch +Check_Arch() { + case $UNAME_M in + *aarch64*) + Target_Arch="arm64" + ;; + *64*) + Target_Arch="amd64" + ;; + *armv7*) + Target_Arch="arm-7" + ;; + *) + Show 1 "Aborted, unsupported or unknown architecture: $UNAME_M" + exit 1 + ;; + esac + Show 0 "Your hardware architecture is : $UNAME_M" +} + + + +#Download CasaOS Package +Download_CasaOS() { + Show 2 "Downloading CasaOS for ${Target_OS}/${Target_Arch}..." + Net_Getter="curl -fsSLk" + Casa_Package="${Target_OS}-${Target_Arch}-casaos${CASA_PACKAGE_EXT}" + if [[ ! -n "$version" ]]; then + Casa_Tag="$(${Net_Getter} ${CASA_RELEASE_API}/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g')" + elif [[ $version == "pre" ]]; then + Casa_Tag="$(${net_getter} ${CASA_RELEASE_API} | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g' | sed -n '1p')" + else + Casa_Tag="$version" + fi + Casa_Package_URL="https://github.com/${CASA_REPO}/releases/download/${Casa_Tag}/${Casa_Package}" + echo + # Remove Temp File + ${sudo_cmd} rm -rf "$PREFIX/tmp/${Casa_Package}" + # Download Package + ${Net_Getter} "${Casa_Package_URL}" >"$PREFIX/tmp/${Casa_Package}" + if [[ $? -ne 0 ]]; then + Show 1 "Download failed, Please check if your internet connection is working and retry." + exit 1 + else + Show 0 "Download successful!" + fi + #Extract CasaOS Package + Show 2 "Extracting..." + case "${Casa_Package}" in + *.zip) ${sudo_cmd} unzip -o "$PREFIX/tmp/${Casa_Package}" -d "$PREFIX/tmp/" ;; + *.tar.gz) ${sudo_cmd} tar -xzf "$PREFIX/tmp/${Casa_Package}" -C "$PREFIX/tmp/" ;; + esac + #Setting Executable Permissions + ${sudo_cmd} chmod +x "$PREFIX${CASA_UNZIP_TEMP_FOLDER}/${CASA_BIN}" + +} + +#Install Addons +Install_Addons() { + Show 2 "Installing CasaOS Addons" + ${sudo_cmd} cp -rf "$PREFIX${CASA_UNZIP_TEMP_FOLDER}/shell/11-usb-mount.rules" "/etc/udev/rules.d/" + ${sudo_cmd} cp -rf "$PREFIX${CASA_UNZIP_TEMP_FOLDER}/shell/usb-mount@.service" "/etc/systemd/system/" + sync +} + +#Clean Temp Files +Clean_Temp_Files() { + Show 0 "Clean..." + ${sudo_cmd} rm -rf "$PREFIX${CASA_UNZIP_TEMP_FOLDER}" + sync +} + +#Install CasaOS +Install_CasaOS() { + Show 2 "Installing..." + + # Install Bin + ${sudo_cmd} mv -f $PREFIX${CASA_UNZIP_TEMP_FOLDER}/${CASA_BIN} ${CASA_BIN_PATH} + + # Install Helper + if [[ -d ${CASA_HELPER_PATH} ]]; then + ${sudo_cmd} rm -rf ${CASA_HELPER_PATH}* + fi + ${sudo_cmd} cp -rf $PREFIX${CASA_UNZIP_TEMP_FOLDER}/shell/* ${CASA_HELPER_PATH} + #Setting Executable Permissions + ${sudo_cmd} chmod +x $PREFIX${CASA_HELPER_PATH}* + + # Install Conf + if [[ ! -f ${CASA_CONF_PATH} ]]; then + if [[ -f $PREFIX${CASA_UNZIP_TEMP_FOLDER}/conf/conf.ini.sample ]]; then + ${sudo_cmd} mv -f $PREFIX${CASA_UNZIP_TEMP_FOLDER}/conf/conf.ini.sample ${CASA_CONF_PATH} + else + ${sudo_cmd} mv -f $PREFIX${CASA_UNZIP_TEMP_FOLDER}/conf/conf.conf.sample ${CASA_CONF_PATH} + fi + + fi + sync + + if [[ ! -x "$(command -v ${CASA_BIN})" ]]; then + Show 1 "Installation failed, please try again." + exit 1 + else + Show 0 "CasaOS Successfully installed." + fi +} + +#Generate Service File +Generate_Service() { + if [ -f ${CASA_SERVICE_PATH} ]; then + Show 2 "Try stop CasaOS system service." + # Stop before generation + if [[ $(systemctl is-active ${CASA_BIN} &>/dev/null) ]]; then + ${sudo_cmd} systemctl stop ${CASA_BIN} + fi + fi + Show 2 "Create system service for CasaOS." + + ${sudo_cmd} tee ${CASA_SERVICE_PATH} >/dev/null < - - - - - - - - - - - - - - - - CasaOS - - - - - -
- - - - + + + + + + + + + + + + + + + + + CasaOS + + + + + +
+ + + + diff --git a/web/js/12.js b/web/js/12.js index 7c6ab30..3717205 100644 --- a/web/js/12.js +++ b/web/js/12.js @@ -18,7 +18,7 @@ /*!**************************************************!*\ !*** ./src/assets/background/preview-widget.svg ***! \**************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "img/preview-widget.e228363c.svg";\n\n//# sourceURL=webpack:///./src/assets/background/preview-widget.svg?')},"./src/assets/background/wallpaper01.jpg": +/*! no static exports found */function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "img/preview-widget.5069b926.svg";\n\n//# sourceURL=webpack:///./src/assets/background/preview-widget.svg?')},"./src/assets/background/wallpaper01.jpg": /*!***********************************************!*\ !*** ./src/assets/background/wallpaper01.jpg ***! \***********************************************/ diff --git a/web/js/13.js b/web/js/13.js index e28c42c..a20e228 100644 --- a/web/js/13.js +++ b/web/js/13.js @@ -18,7 +18,7 @@ /*!***************************************************!*\ !*** ./src/assets/img/account/default-avatar.svg ***! \***************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "img/default-avatar.d92cd43a.svg";\n\n//# sourceURL=webpack:///./src/assets/img/account/default-avatar.svg?')},"./src/assets/img/logo/casa-dark.svg": +/*! no static exports found */function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "img/default-avatar.ab3b9bda.svg";\n\n//# sourceURL=webpack:///./src/assets/img/account/default-avatar.svg?')},"./src/assets/img/logo/casa-dark.svg": /*!*******************************************!*\ !*** ./src/assets/img/logo/casa-dark.svg ***! \*******************************************/ @@ -26,7 +26,7 @@ /*!*************************************!*\ !*** ./src/plugins/vee-validate.js ***! \*************************************/ -/*! no exports provided */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");\n/* harmony import */ var vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vee-validate/dist/rules */ "./node_modules/vee-validate/dist/rules.js");\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! is-valid-hostname */ "./node_modules/is-valid-hostname/index.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid-validate */ "./node_modules/uuid-validate/index.js");\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(uuid_validate__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("required", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["required"]), {}, {\n message: "This field is required"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("email", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["email"]), {}, {\n message: "This field must be a valid email"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("confirmed", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["confirmed"]), {}, {\n message: "This field confirmation does not match"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("length", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["length"]), {}, {\n message: "This field must have 2 options"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("min", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["min"]), {}, {\n message: "This field must have more than {length} characters"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'rfc1123\', {\n validate: function validate(value) {\n return is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default()(value);\n },\n message: \'You entered an invalid RFC1123 hostname\'\n});\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'uuid\', {\n validate: function validate(value) {\n return uuid_validate__WEBPACK_IMPORTED_MODULE_4___default()(value);\n },\n message: \'You entered an invalid share ID\'\n});\n\n//# sourceURL=webpack:///./src/plugins/vee-validate.js?')},"./src/views/Welcome.vue": +/*! no exports provided */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");\n/* harmony import */ var vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vee-validate/dist/rules */ "./node_modules/vee-validate/dist/rules.js");\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! is-valid-hostname */ "./node_modules/is-valid-hostname/index.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid-validate */ "./node_modules/uuid-validate/index.js");\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(uuid_validate__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("required", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["required"]), {}, {\n message: "This field is required"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("email", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["email"]), {}, {\n message: "This field must be a valid email"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("confirmed", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["confirmed"]), {}, {\n message: "This field confirmation does not match"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("length", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["length"]), {}, {\n message: "This field must have 2 options"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("min", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["min"]), {}, {\n message: "This field must have more than {length} characters"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'rfc1123\', {\n validate: function validate(value) {\n return is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default()(value);\n },\n message: \'You entered an invalid RFC1123 hostname\'\n});\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'uuid\', {\n validate: function validate(value) {\n return uuid_validate__WEBPACK_IMPORTED_MODULE_4___default()(value);\n },\n message: \'You entered an invalid share ID\'\n});\n\n//# sourceURL=webpack:///./src/plugins/vee-validate.js?')},"./src/views/Welcome.vue": /*!*******************************!*\ !*** ./src/views/Welcome.vue ***! \*******************************/ diff --git a/web/js/14.js b/web/js/14.js index 67927b4..d84f59d 100644 --- a/web/js/14.js +++ b/web/js/14.js @@ -14,11 +14,11 @@ /*!***************************************************!*\ !*** ./src/assets/img/account/default-avatar.svg ***! \***************************************************/ -/*! no static exports found */function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "img/default-avatar.d92cd43a.svg";\n\n//# sourceURL=webpack:///./src/assets/img/account/default-avatar.svg?')},"./src/plugins/vee-validate.js": +/*! no static exports found */function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__.p + "img/default-avatar.ab3b9bda.svg";\n\n//# sourceURL=webpack:///./src/assets/img/account/default-avatar.svg?')},"./src/plugins/vee-validate.js": /*!*************************************!*\ !*** ./src/plugins/vee-validate.js ***! \*************************************/ -/*! no exports provided */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");\n/* harmony import */ var vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vee-validate/dist/rules */ "./node_modules/vee-validate/dist/rules.js");\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! is-valid-hostname */ "./node_modules/is-valid-hostname/index.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid-validate */ "./node_modules/uuid-validate/index.js");\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(uuid_validate__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("required", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["required"]), {}, {\n message: "This field is required"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("email", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["email"]), {}, {\n message: "This field must be a valid email"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("confirmed", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["confirmed"]), {}, {\n message: "This field confirmation does not match"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("length", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["length"]), {}, {\n message: "This field must have 2 options"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("min", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["min"]), {}, {\n message: "This field must have more than {length} characters"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'rfc1123\', {\n validate: function validate(value) {\n return is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default()(value);\n },\n message: \'You entered an invalid RFC1123 hostname\'\n});\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'uuid\', {\n validate: function validate(value) {\n return uuid_validate__WEBPACK_IMPORTED_MODULE_4___default()(value);\n },\n message: \'You entered an invalid share ID\'\n});\n\n//# sourceURL=webpack:///./src/plugins/vee-validate.js?')},"./src/views/Login.vue": +/*! no exports provided */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");\n/* harmony import */ var vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vee-validate/dist/rules */ "./node_modules/vee-validate/dist/rules.js");\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! is-valid-hostname */ "./node_modules/is-valid-hostname/index.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid-validate */ "./node_modules/uuid-validate/index.js");\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(uuid_validate__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("required", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["required"]), {}, {\n message: "This field is required"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("email", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["email"]), {}, {\n message: "This field must be a valid email"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("confirmed", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["confirmed"]), {}, {\n message: "This field confirmation does not match"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("length", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["length"]), {}, {\n message: "This field must have 2 options"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("min", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["min"]), {}, {\n message: "This field must have more than {length} characters"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'rfc1123\', {\n validate: function validate(value) {\n return is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default()(value);\n },\n message: \'You entered an invalid RFC1123 hostname\'\n});\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'uuid\', {\n validate: function validate(value) {\n return uuid_validate__WEBPACK_IMPORTED_MODULE_4___default()(value);\n },\n message: \'You entered an invalid share ID\'\n});\n\n//# sourceURL=webpack:///./src/plugins/vee-validate.js?')},"./src/views/Login.vue": /*!*****************************!*\ !*** ./src/views/Login.vue ***! \*****************************/ diff --git a/web/js/3.js b/web/js/3.js index cf0df61..6e66641 100644 --- a/web/js/3.js +++ b/web/js/3.js @@ -78,4 +78,4 @@ /*!*************************************!*\ !*** ./src/plugins/vee-validate.js ***! \*************************************/ -/*! no exports provided */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");\n/* harmony import */ var vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vee-validate/dist/rules */ "./node_modules/vee-validate/dist/rules.js");\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! is-valid-hostname */ "./node_modules/is-valid-hostname/index.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid-validate */ "./node_modules/uuid-validate/index.js");\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(uuid_validate__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("required", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["required"]), {}, {\n message: "This field is required"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("email", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["email"]), {}, {\n message: "This field must be a valid email"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("confirmed", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["confirmed"]), {}, {\n message: "This field confirmation does not match"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("length", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["length"]), {}, {\n message: "This field must have 2 options"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("min", Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["min"]), {}, {\n message: "This field must have more than {length} characters"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'rfc1123\', {\n validate: function validate(value) {\n return is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default()(value);\n },\n message: \'You entered an invalid RFC1123 hostname\'\n});\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'uuid\', {\n validate: function validate(value) {\n return uuid_validate__WEBPACK_IMPORTED_MODULE_4___default()(value);\n },\n message: \'You entered an invalid share ID\'\n});\n\n//# sourceURL=webpack:///./src/plugins/vee-validate.js?')}}]); \ No newline at end of file +/*! no exports provided */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");\n/* harmony import */ var vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vee-validate/dist/rules */ "./node_modules/vee-validate/dist/rules.js");\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! is-valid-hostname */ "./node_modules/is-valid-hostname/index.js");\n/* harmony import */ var is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(is_valid_hostname__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid-validate */ "./node_modules/uuid-validate/index.js");\n/* harmony import */ var uuid_validate__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(uuid_validate__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("required", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["required"]), {}, {\n message: "This field is required"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("email", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["email"]), {}, {\n message: "This field must be a valid email"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("confirmed", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["confirmed"]), {}, {\n message: "This field confirmation does not match"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("length", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["length"]), {}, {\n message: "This field must have 2 options"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])("min", Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, vee_validate_dist_rules__WEBPACK_IMPORTED_MODULE_1__["min"]), {}, {\n message: "This field must have more than {length} characters"\n}));\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'rfc1123\', {\n validate: function validate(value) {\n return is_valid_hostname__WEBPACK_IMPORTED_MODULE_3___default()(value);\n },\n message: \'You entered an invalid RFC1123 hostname\'\n});\nObject(vee_validate__WEBPACK_IMPORTED_MODULE_2__["extend"])(\'uuid\', {\n validate: function validate(value) {\n return uuid_validate__WEBPACK_IMPORTED_MODULE_4___default()(value);\n },\n message: \'You entered an invalid share ID\'\n});\n\n//# sourceURL=webpack:///./src/plugins/vee-validate.js?')}}]); diff --git a/web/js/4.js b/web/js/4.js index ec4c3bf..1e25ad2 100644 --- a/web/js/4.js +++ b/web/js/4.js @@ -18,7 +18,7 @@ /*!**********************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/AcquaintanceShare/components/GirdView.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_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _mixins_mixin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/mixins/mixin */ "./src/mixins/mixin.js");\n/* harmony import */ var _ActionButton_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ActionButton.vue */ "./src/components/AcquaintanceShare/components/ActionButton.vue");\n/* harmony import */ var _ContextMenu_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ContextMenu.vue */ "./src/components/AcquaintanceShare/components/ContextMenu.vue");\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\nvar cardWidth = 144;\n/* harmony default export */ __webpack_exports__["default"] = ({\n components: {\n ActionButton: _ActionButton_vue__WEBPACK_IMPORTED_MODULE_5__["default"],\n ContextMenu: _ContextMenu_vue__WEBPACK_IMPORTED_MODULE_6__["default"]\n },\n mixins: [_mixins_mixin__WEBPACK_IMPORTED_MODULE_4__["mixin"]],\n data: function data() {\n return {\n min: 0,\n cols: 1,\n contextIsShow: false,\n colStyle: {\n width: \'33.3333%\'\n }\n };\n },\n model: {\n prop: \'listData\'\n },\n props: {\n listData: Array,\n isLoading: Boolean,\n user: {}\n },\n mounted: function mounted() {\n window.addEventListener(\'resize\', this.onResize);\n this.onResize();\n },\n beforeDestroy: function beforeDestroy() {\n window.removeEventListener(\'resize\', this.onResize);\n },\n methods: {\n onResize: function onResize() {\n var ww = document.getElementById("card-container").clientWidth;\n this.cols = Math.floor(ww / cardWidth);\n this.colStyle.width = (100 / this.cols).toString() + "%";\n },\n\n /**\r\n * @description: Download File\r\n * @param {Object,Object} event item \r\n * @return {void} \r\n */\n clickUserItem: function clickUserItem(event, item) {\n var bounced = event.target.getAttribute(\'class\').includes(\'mdi-dots\');\n\n if (bounced) {\n return false;\n }\n\n if (item.is_dir) {\n this.$emit(\'gotoFolder\', this.user, item.path);\n } else {\n this.$emit(\'showDownloadModal\', this.user, item);\n }\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/AcquaintanceShare/components/GirdView.vue?./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')},"./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/AcquaintanceShare/components/HistoryButton.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_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _mixins_mixin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/mixins/mixin */ "./src/mixins/mixin.js");\n/* harmony import */ var _ActionButton_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ActionButton.vue */ "./src/components/AcquaintanceShare/components/ActionButton.vue");\n/* harmony import */ var _ContextMenu_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ContextMenu.vue */ "./src/components/AcquaintanceShare/components/ContextMenu.vue");\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\nvar cardWidth = 144;\n/* harmony default export */ __webpack_exports__["default"] = ({\n components: {\n ActionButton: _ActionButton_vue__WEBPACK_IMPORTED_MODULE_5__["default"],\n ContextMenu: _ContextMenu_vue__WEBPACK_IMPORTED_MODULE_6__["default"]\n },\n mixins: [_mixins_mixin__WEBPACK_IMPORTED_MODULE_4__["mixin"]],\n data: function data() {\n return {\n min: 0,\n cols: 1,\n contextIsShow: false,\n colStyle: {\n width: \'33.3333%\'\n }\n };\n },\n model: {\n prop: \'listData\'\n },\n props: {\n listData: Array,\n isLoading: Boolean,\n user: {}\n },\n mounted: function mounted() {\n window.addEventListener(\'resize\', this.onResize);\n this.onResize();\n },\n beforeDestroy: function beforeDestroy() {\n window.removeEventListener(\'resize\', this.onResize);\n },\n methods: {\n onResize: function onResize() {\n var ww = document.getElementById("card-container").clientWidth;\n this.cols = Math.floor(ww / cardWidth);\n this.colStyle.width = (100 / this.cols).toString() + "%";\n },\n\n /**\n * @description: Download File\n * @param {Object,Object} event item \n * @return {void} \n */\n clickUserItem: function clickUserItem(event, item) {\n var bounced = event.target.getAttribute(\'class\').includes(\'mdi-dots\');\n\n if (bounced) {\n return false;\n }\n\n if (item.is_dir) {\n this.$emit(\'gotoFolder\', this.user, item.path);\n } else {\n this.$emit(\'showDownloadModal\', this.user, item);\n }\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/AcquaintanceShare/components/GirdView.vue?./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')},"./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/AcquaintanceShare/components/HistoryButton.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/AcquaintanceShare/components/HistoryButton.vue?vue&type=script&lang=js& ***! \***************************************************************************************************************************************************************************************************************************************************************************************/ @@ -34,7 +34,7 @@ /*!************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/AcquaintanceShare/modals/AddFriendModal.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 E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");\n/* harmony import */ var E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/plugins/vee-validate */ "./src/plugins/vee-validate.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/* harmony default export */ __webpack_exports__["default"] = ({\n data: function data() {\n return {\n shardId: "",\n errorType: "is-success",\n errors: "",\n isLoading: false\n };\n },\n components: {\n ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_2__["ValidationObserver"],\n ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_2__["ValidationProvider"]\n },\n methods: {\n /**\r\n * @description: Validate form async\r\n * @param {Object} ref ref of component\r\n * @return {Boolean} \r\n */\n checkValid: function checkValid(ref) {\n return Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().mark(function _callee() {\n var isValid;\n return Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return ref.validate();\n\n case 2:\n isValid = _context.sent;\n return _context.abrupt("return", isValid);\n\n case 4:\n case "end":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n },\n addFriend: function addFriend() {\n var _this = this;\n\n this.isLoading = true;\n this.checkValid(this.$refs.uuidValid).then(function (val) {\n if (val) {\n _this.$api.person.addFriend(_this.shardId).then(function (res) {\n var message = "";\n var type = "";\n\n if (res.data.success == 200) {\n message = _this.$t(\'Friend Request Sent.\');\n type = "is-success";\n\n _this.$emit("reloadFriendList");\n\n _this.$emit(\'close\');\n } else {\n _this.isLoading = false;\n message = _this.shardId + " " + _this.$t(\'is already your friend.\');\n type = "is-danger";\n }\n\n _this.$buefy.toast.open({\n message: message,\n type: type\n });\n });\n } else {\n _this.isLoading = false;\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/AcquaintanceShare/modals/AddFriendModal.vue?./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')},"./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/AcquaintanceShare/modals/DownloadModal.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 _Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");\n/* harmony import */ var _Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/plugins/vee-validate */ "./src/plugins/vee-validate.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/* harmony default export */ __webpack_exports__["default"] = ({\n data: function data() {\n return {\n shardId: "",\n errorType: "is-success",\n errors: "",\n isLoading: false\n };\n },\n components: {\n ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_2__["ValidationObserver"],\n ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_2__["ValidationProvider"]\n },\n methods: {\n /**\n * @description: Validate form async\n * @param {Object} ref ref of component\n * @return {Boolean} \n */\n checkValid: function checkValid(ref) {\n return Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().mark(function _callee() {\n var isValid;\n return Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return ref.validate();\n\n case 2:\n isValid = _context.sent;\n return _context.abrupt("return", isValid);\n\n case 4:\n case "end":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n },\n addFriend: function addFriend() {\n var _this = this;\n\n this.isLoading = true;\n this.checkValid(this.$refs.uuidValid).then(function (val) {\n if (val) {\n _this.$api.person.addFriend(_this.shardId).then(function (res) {\n var message = "";\n var type = "";\n\n if (res.data.success == 200) {\n message = _this.$t(\'Friend Request Sent.\');\n type = "is-success";\n\n _this.$emit("reloadFriendList");\n\n _this.$emit(\'close\');\n } else {\n _this.isLoading = false;\n message = _this.shardId + " " + _this.$t(\'is already your friend.\');\n type = "is-danger";\n }\n\n _this.$buefy.toast.open({\n message: message,\n type: type\n });\n });\n } else {\n _this.isLoading = false;\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/AcquaintanceShare/modals/AddFriendModal.vue?./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')},"./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/AcquaintanceShare/modals/DownloadModal.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/AcquaintanceShare/modals/DownloadModal.vue?vue&type=script&lang=js& ***! \***********************************************************************************************************************************************************************************************************************************************************************************/ @@ -46,7 +46,7 @@ /*!*******************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/AcquaintanceShare/modals/InitModal.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 E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");\n/* harmony import */ var E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");\n/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/plugins/vee-validate */ "./src/plugins/vee-validate.js");\n/* harmony import */ var vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vue-smooth-reflow */ "./node_modules/vue-smooth-reflow/dist/vue-smooth-reflow.min.js");\n/* harmony import */ var vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _components_fileList_FilePanel_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/fileList/FilePanel.vue */ "./src/components/fileList/FilePanel.vue");\n/* harmony import */ var lodash_remove__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/remove */ "./node_modules/lodash/remove.js");\n/* harmony import */ var lodash_remove__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_remove__WEBPACK_IMPORTED_MODULE_9__);\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//\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\n // import Avatar from \'vue-avatar\'\n\n/* harmony default export */ __webpack_exports__["default"] = ({\n mixins: [vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_7___default.a],\n props: {\n myInfo: {}\n },\n data: function data() {\n return {\n isWelcomeShow: true,\n isLoading: false,\n activeStep: 0,\n step2Message: "",\n step3Message: "",\n nickname: "",\n description: "",\n shareFolders: [],\n savePath: "/DATA/Downloads",\n publicServer: [],\n choosePublicServer: []\n };\n },\n components: {\n ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_5__["ValidationObserver"],\n ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_5__["ValidationProvider"] // Avatar\n\n },\n watch: {\n shareFolders: function shareFolders(val) {\n if (val.length > 0) {\n this.step2Message = "";\n }\n }\n },\n created: function created() {\n this.nickname = this.myInfo.user_name;\n this.description = this.myInfo.description;\n this.getPublicServers();\n },\n mounted: function mounted() {\n //Smooth \n this.$smoothReflow({\n el: \'.modal-card\',\n property: [\'height\', \'width\'],\n transition: \'height .25s ease, width .75s ease-out\'\n });\n },\n methods: {\n /**\r\n * @description: Validate form async\r\n * @param {Object} ref ref of component\r\n * @return {Boolean} \r\n */\n checkValid: function checkValid(ref) {\n return Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().mark(function _callee() {\n var isValid;\n return Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return ref.validate();\n\n case 2:\n isValid = _context.sent;\n return _context.abrupt("return", isValid);\n\n case 4:\n case "end":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n },\n getShareFolders: function getShareFolders() {},\n chooseServer: function chooseServer(id) {\n if (this.choosePublicServer.indexOf(id) == -1) {\n this.choosePublicServer.push(id);\n } else {\n this.choosePublicServer = lodash_remove__WEBPACK_IMPORTED_MODULE_9___default()(this.choosePublicServer, function (o) {\n return o != id;\n });\n }\n },\n getPublicServers: function getPublicServers() {\n var _this = this;\n\n this.$api.person.publicServer().then(function (res) {\n if (res.data.success == 200) {\n _this.publicServer = res.data.data;\n }\n });\n },\n deleteShareFolderItem: function deleteShareFolderItem(item) {\n this.shareFolders = lodash_remove__WEBPACK_IMPORTED_MODULE_9___default()(this.shareFolders, function (o) {\n return o != item;\n });\n },\n close: function close() {\n this.$emit("close");\n this.$emit("complete");\n },\n nextStep: function nextStep(next) {\n var _this2 = this;\n\n switch (this.activeStep) {\n case 0:\n this.checkValid(this.$refs.accountValid).then(function (val) {\n if (val) {\n _this2.isLoading = true;\n\n _this2.$api.user.personInfo(_this2.nickname, _this2.description).then(function (res) {\n _this2.isLoading = false;\n\n if (res.data.success == 200) {\n next();\n }\n });\n }\n });\n break;\n\n case 1:\n if (this.shareFolders.length == 0) {\n this.$buefy.toast.open({\n message: this.$t(\'Need to add at least one directory\'),\n type: "is-danger"\n });\n } else {\n this.isLoading = true;\n this.$api.person.updateShareList(this.shareFolders).then(function (res) {\n if (res.data.success == 200) {\n _this2.$api.person.updateSavePath(_this2.savePath).then(function (res) {\n _this2.isLoading = false;\n\n if (res.data.success == 200) {\n next();\n } else {\n _this2.$buefy.toast.open({\n message: res.data.message,\n type: "is-danger"\n });\n }\n });\n } else {\n _this2.isLoading = false;\n\n _this2.$buefy.toast.open({\n message: res.data.message,\n type: "is-danger"\n });\n }\n });\n }\n\n break;\n\n case 2:\n if (this.choosePublicServer.length == 0) {\n this.$buefy.toast.open({\n message: this.$t(\'At least one must be selected.\'),\n type: "is-danger"\n });\n } else {\n var joinString = this.choosePublicServer.join(",");\n this.isLoading = true;\n this.$api.person.addFriend(joinString).then(function (res) {\n var message = "";\n var type = "";\n _this2.isLoading = false;\n\n if (res.data.success == 200) {\n next();\n } else {\n message = res.data.message;\n type = "is-danger";\n }\n\n _this2.$buefy.toast.open({\n message: message,\n type: type\n });\n });\n }\n\n break;\n\n default:\n break;\n }\n },\n showFolderModal: function showFolderModal(action, initPath) {\n var _this3 = this;\n\n var itemIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n this.$buefy.modal.open({\n parent: this,\n component: _components_fileList_FilePanel_vue__WEBPACK_IMPORTED_MODULE_8__["default"],\n hasModalCard: true,\n customClass: \'file-sel-modal\',\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n events: {\n \'updatePath\': function updatePath(e) {\n if (action == \'add\') {\n if (_this3.shareFolders.indexOf(e) == -1) {\n _this3.shareFolders.push(e);\n }\n } else if (action == "edit") {\n _this3.shareFolders[itemIndex] = e;\n\n _this3.$forceUpdate();\n }\n }\n },\n props: {\n initPath: initPath,\n rootPath: "/DATA",\n showFile: false\n }\n });\n },\n showFileModal: function showFileModal() {\n var _this4 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_fileList_FilePanel_vue__WEBPACK_IMPORTED_MODULE_8__["default"],\n hasModalCard: true,\n customClass: \'file-sel-modal\',\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n events: {\n \'updatePath\': function updatePath(e) {\n _this4.savePath = e;\n }\n },\n props: {\n initPath: this.savePath,\n rootPath: this.rootPath,\n showFile: false\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/AcquaintanceShare/modals/InitModal.vue?./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')},"./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/AcquaintanceShare/modals/MyInfoModal.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 _Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");\n/* harmony import */ var _Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");\n/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/plugins/vee-validate */ "./src/plugins/vee-validate.js");\n/* harmony import */ var vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vue-smooth-reflow */ "./node_modules/vue-smooth-reflow/dist/vue-smooth-reflow.min.js");\n/* harmony import */ var vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _components_fileList_FilePanel_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/fileList/FilePanel.vue */ "./src/components/fileList/FilePanel.vue");\n/* harmony import */ var lodash_remove__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/remove */ "./node_modules/lodash/remove.js");\n/* harmony import */ var lodash_remove__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_remove__WEBPACK_IMPORTED_MODULE_9__);\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//\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\n // import Avatar from \'vue-avatar\'\n\n/* harmony default export */ __webpack_exports__["default"] = ({\n mixins: [vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_7___default.a],\n props: {\n myInfo: {}\n },\n data: function data() {\n return {\n isWelcomeShow: true,\n isLoading: false,\n activeStep: 0,\n step2Message: "",\n step3Message: "",\n nickname: "",\n description: "",\n shareFolders: [],\n savePath: "/DATA/Downloads",\n publicServer: [],\n choosePublicServer: []\n };\n },\n components: {\n ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_5__["ValidationObserver"],\n ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_5__["ValidationProvider"] // Avatar\n\n },\n watch: {\n shareFolders: function shareFolders(val) {\n if (val.length > 0) {\n this.step2Message = "";\n }\n }\n },\n created: function created() {\n this.nickname = this.myInfo.user_name;\n this.description = this.myInfo.description;\n this.getPublicServers();\n },\n mounted: function mounted() {\n //Smooth \n this.$smoothReflow({\n el: \'.modal-card\',\n property: [\'height\', \'width\'],\n transition: \'height .25s ease, width .75s ease-out\'\n });\n },\n methods: {\n /**\n * @description: Validate form async\n * @param {Object} ref ref of component\n * @return {Boolean} \n */\n checkValid: function checkValid(ref) {\n return Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().mark(function _callee() {\n var isValid;\n return Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return ref.validate();\n\n case 2:\n isValid = _context.sent;\n return _context.abrupt("return", isValid);\n\n case 4:\n case "end":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n },\n getShareFolders: function getShareFolders() {},\n chooseServer: function chooseServer(id) {\n if (this.choosePublicServer.indexOf(id) == -1) {\n this.choosePublicServer.push(id);\n } else {\n this.choosePublicServer = lodash_remove__WEBPACK_IMPORTED_MODULE_9___default()(this.choosePublicServer, function (o) {\n return o != id;\n });\n }\n },\n getPublicServers: function getPublicServers() {\n var _this = this;\n\n this.$api.person.publicServer().then(function (res) {\n if (res.data.success == 200) {\n _this.publicServer = res.data.data;\n }\n });\n },\n deleteShareFolderItem: function deleteShareFolderItem(item) {\n this.shareFolders = lodash_remove__WEBPACK_IMPORTED_MODULE_9___default()(this.shareFolders, function (o) {\n return o != item;\n });\n },\n close: function close() {\n this.$emit("close");\n this.$emit("complete");\n },\n nextStep: function nextStep(next) {\n var _this2 = this;\n\n switch (this.activeStep) {\n case 0:\n this.checkValid(this.$refs.accountValid).then(function (val) {\n if (val) {\n _this2.isLoading = true;\n\n _this2.$api.user.personInfo(_this2.nickname, _this2.description).then(function (res) {\n _this2.isLoading = false;\n\n if (res.data.success == 200) {\n next();\n }\n });\n }\n });\n break;\n\n case 1:\n if (this.shareFolders.length == 0) {\n this.$buefy.toast.open({\n message: this.$t(\'Need to add at least one directory\'),\n type: "is-danger"\n });\n } else {\n this.isLoading = true;\n this.$api.person.updateShareList(this.shareFolders).then(function (res) {\n if (res.data.success == 200) {\n _this2.$api.person.updateSavePath(_this2.savePath).then(function (res) {\n _this2.isLoading = false;\n\n if (res.data.success == 200) {\n next();\n } else {\n _this2.$buefy.toast.open({\n message: res.data.message,\n type: "is-danger"\n });\n }\n });\n } else {\n _this2.isLoading = false;\n\n _this2.$buefy.toast.open({\n message: res.data.message,\n type: "is-danger"\n });\n }\n });\n }\n\n break;\n\n case 2:\n if (this.choosePublicServer.length == 0) {\n this.$buefy.toast.open({\n message: this.$t(\'At least one must be selected.\'),\n type: "is-danger"\n });\n } else {\n var joinString = this.choosePublicServer.join(",");\n this.isLoading = true;\n this.$api.person.addFriend(joinString).then(function (res) {\n var message = "";\n var type = "";\n _this2.isLoading = false;\n\n if (res.data.success == 200) {\n next();\n } else {\n message = res.data.message;\n type = "is-danger";\n }\n\n _this2.$buefy.toast.open({\n message: message,\n type: type\n });\n });\n }\n\n break;\n\n default:\n break;\n }\n },\n showFolderModal: function showFolderModal(action, initPath) {\n var _this3 = this;\n\n var itemIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n this.$buefy.modal.open({\n parent: this,\n component: _components_fileList_FilePanel_vue__WEBPACK_IMPORTED_MODULE_8__["default"],\n hasModalCard: true,\n customClass: \'file-sel-modal\',\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n events: {\n \'updatePath\': function updatePath(e) {\n if (action == \'add\') {\n if (_this3.shareFolders.indexOf(e) == -1) {\n _this3.shareFolders.push(e);\n }\n } else if (action == "edit") {\n _this3.shareFolders[itemIndex] = e;\n\n _this3.$forceUpdate();\n }\n }\n },\n props: {\n initPath: initPath,\n rootPath: "/DATA",\n showFile: false\n }\n });\n },\n showFileModal: function showFileModal() {\n var _this4 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_fileList_FilePanel_vue__WEBPACK_IMPORTED_MODULE_8__["default"],\n hasModalCard: true,\n customClass: \'file-sel-modal\',\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n events: {\n \'updatePath\': function updatePath(e) {\n _this4.savePath = e;\n }\n },\n props: {\n initPath: this.savePath,\n rootPath: this.rootPath,\n showFile: false\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/AcquaintanceShare/modals/InitModal.vue?./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')},"./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/AcquaintanceShare/modals/MyInfoModal.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/AcquaintanceShare/modals/MyInfoModal.vue?vue&type=script&lang=js& ***! \*********************************************************************************************************************************************************************************************************************************************************************************/ @@ -54,7 +54,7 @@ /*!**********************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/AcquaintanceShare/modals/ProfileModal.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 E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");\n/* harmony import */ var E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/plugins/vee-validate */ "./src/plugins/vee-validate.js");\n/* harmony import */ var clipboard_copy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! clipboard-copy */ "./node_modules/clipboard-copy/index.js");\n/* harmony import */ var clipboard_copy__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(clipboard_copy__WEBPACK_IMPORTED_MODULE_6__);\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 data: function data() {\n return {\n shardId: "",\n errorType: "is-success",\n errors: "",\n nickname: "",\n description: "",\n myID: ""\n };\n },\n components: {\n ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_4__["ValidationObserver"],\n ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_4__["ValidationProvider"]\n },\n created: function created() {\n var _this = this;\n\n this.$api.user.getUserInfo(localStorage.getItem("user_id")).then(function (res) {\n _this.nickname = res.data.data.nick_name;\n _this.description = res.data.data.description;\n });\n this.getMyShareId();\n },\n methods: {\n // Get MyID\n getMyShareId: function getMyShareId() {\n var _this2 = this;\n\n this.$api.person.getMyShareId().then(function (res) {\n _this2.myID = res.data.data;\n });\n },\n // Copy MyID to clipboard\n copyMyId: function copyMyId() {\n clipboard_copy__WEBPACK_IMPORTED_MODULE_6___default()(this.myID);\n this.$buefy.toast.open({\n message: this.$t(\'Copied to clipboard\'),\n type: \'is-success\'\n });\n },\n\n /**\r\n * @description: Validate form async\r\n * @param {Object} ref ref of component\r\n * @return {Boolean} \r\n */\n checkValid: function checkValid(ref) {\n return Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().mark(function _callee() {\n var isValid;\n return Object(E_Company_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return ref.validate();\n\n case 2:\n isValid = _context.sent;\n return _context.abrupt("return", isValid);\n\n case 4:\n case "end":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n },\n saveInfo: function saveInfo() {\n var _this3 = this;\n\n this.checkValid(this.$refs.accountValid).then(function (val) {\n if (val) {\n _this3.$api.user.personInfo(_this3.nickname, _this3.description).then(function (res) {\n var message = "";\n var type = "";\n\n if (res.data.success == 200) {\n message = _this3.$t(\'Update successful\');\n type = "is-success";\n\n _this3.$emit(\'close\');\n } else {\n message = _this3.$t(\'Update failed\');\n type = "is-danger";\n }\n\n _this3.$buefy.toast.open({\n message: message,\n type: type\n });\n });\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/AcquaintanceShare/modals/ProfileModal.vue?./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')},"./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/AcquaintanceShare/modals/SettingsModal.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 _Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");\n/* harmony import */ var _Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vee-validate */ "./node_modules/vee-validate/dist/vee-validate.esm.js");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/plugins/vee-validate */ "./src/plugins/vee-validate.js");\n/* harmony import */ var clipboard_copy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! clipboard-copy */ "./node_modules/clipboard-copy/index.js");\n/* harmony import */ var clipboard_copy__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(clipboard_copy__WEBPACK_IMPORTED_MODULE_6__);\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 data: function data() {\n return {\n shardId: "",\n errorType: "is-success",\n errors: "",\n nickname: "",\n description: "",\n myID: ""\n };\n },\n components: {\n ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_4__["ValidationObserver"],\n ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_4__["ValidationProvider"]\n },\n created: function created() {\n var _this = this;\n\n this.$api.user.getUserInfo(localStorage.getItem("user_id")).then(function (res) {\n _this.nickname = res.data.data.nick_name;\n _this.description = res.data.data.description;\n });\n this.getMyShareId();\n },\n methods: {\n // Get MyID\n getMyShareId: function getMyShareId() {\n var _this2 = this;\n\n this.$api.person.getMyShareId().then(function (res) {\n _this2.myID = res.data.data;\n });\n },\n // Copy MyID to clipboard\n copyMyId: function copyMyId() {\n clipboard_copy__WEBPACK_IMPORTED_MODULE_6___default()(this.myID);\n this.$buefy.toast.open({\n message: this.$t(\'Copied to clipboard\'),\n type: \'is-success\'\n });\n },\n\n /**\n * @description: Validate form async\n * @param {Object} ref ref of component\n * @return {Boolean} \n */\n checkValid: function checkValid(ref) {\n return Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().mark(function _callee() {\n var isValid;\n return Object(_Users_liangjianli_go_CasaOSNew_CasaOS_UI_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__["default"])().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return ref.validate();\n\n case 2:\n isValid = _context.sent;\n return _context.abrupt("return", isValid);\n\n case 4:\n case "end":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n },\n saveInfo: function saveInfo() {\n var _this3 = this;\n\n this.checkValid(this.$refs.accountValid).then(function (val) {\n if (val) {\n _this3.$api.user.personInfo(_this3.nickname, _this3.description).then(function (res) {\n var message = "";\n var type = "";\n\n if (res.data.success == 200) {\n message = _this3.$t(\'Update successful\');\n type = "is-success";\n\n _this3.$emit(\'close\');\n } else {\n message = _this3.$t(\'Update failed\');\n type = "is-danger";\n }\n\n _this3.$buefy.toast.open({\n message: message,\n type: type\n });\n });\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/AcquaintanceShare/modals/ProfileModal.vue?./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')},"./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/AcquaintanceShare/modals/SettingsModal.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/AcquaintanceShare/modals/SettingsModal.vue?vue&type=script&lang=js& ***! \***********************************************************************************************************************************************************************************************************************************************************************************/ @@ -62,7 +62,7 @@ /*!***************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/views/CasaConnect.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_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var vue_avatar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vue-avatar */ "./node_modules/vue-avatar/dist/vue-avatar.min.js");\n/* harmony import */ var vue_avatar__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(vue_avatar__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var vue_multipane__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vue-multipane */ "./node_modules/vue-multipane/dist/vue-multipane.esm.js");\n/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/orderBy */ "./node_modules/lodash/orderBy.js");\n/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/isEqual */ "./node_modules/lodash/isEqual.js");\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js");\n/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _components_AcquaintanceShare_components_DownloadList_vue__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/DownloadList.vue */ "./src/components/AcquaintanceShare/components/DownloadList.vue");\n/* harmony import */ var _components_AcquaintanceShare_components_GirdView_vue__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/GirdView.vue */ "./src/components/AcquaintanceShare/components/GirdView.vue");\n/* harmony import */ var _components_AcquaintanceShare_components_ListView_vue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/ListView.vue */ "./src/components/AcquaintanceShare/components/ListView.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_AddFriendModal_vue__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/AddFriendModal.vue */ "./src/components/AcquaintanceShare/modals/AddFriendModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_DownloadModal_vue__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/DownloadModal.vue */ "./src/components/AcquaintanceShare/modals/DownloadModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_ProfileModal_vue__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/ProfileModal.vue */ "./src/components/AcquaintanceShare/modals/ProfileModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_SettingsModal_vue__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/SettingsModal.vue */ "./src/components/AcquaintanceShare/modals/SettingsModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_components_HistoryButton_vue__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/HistoryButton.vue */ "./src/components/AcquaintanceShare/components/HistoryButton.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_MyInfoModal_vue__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/MyInfoModal.vue */ "./src/components/AcquaintanceShare/modals/MyInfoModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_InitModal_vue__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/InitModal.vue */ "./src/components/AcquaintanceShare/modals/InitModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_components_UserContextMenu_vue__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/UserContextMenu.vue */ "./src/components/AcquaintanceShare/components/UserContextMenu.vue");\n/* harmony import */ var clipboard_copy__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! clipboard-copy */ "./node_modules/clipboard-copy/index.js");\n/* harmony import */ var clipboard_copy__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(clipboard_copy__WEBPACK_IMPORTED_MODULE_23__);\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//\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//\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//\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//\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: "casa-connect",\n provide: function provide() {\n return {\n filePanel: this\n };\n },\n components: {\n Multipane: vue_multipane__WEBPACK_IMPORTED_MODULE_8__["Multipane"],\n MultipaneResizer: vue_multipane__WEBPACK_IMPORTED_MODULE_8__["MultipaneResizer"],\n DownloadList: _components_AcquaintanceShare_components_DownloadList_vue__WEBPACK_IMPORTED_MODULE_12__["default"],\n GirdView: _components_AcquaintanceShare_components_GirdView_vue__WEBPACK_IMPORTED_MODULE_13__["default"],\n ListView: _components_AcquaintanceShare_components_ListView_vue__WEBPACK_IMPORTED_MODULE_14__["default"],\n HistoryButton: _components_AcquaintanceShare_components_HistoryButton_vue__WEBPACK_IMPORTED_MODULE_19__["default"],\n Avatar: vue_avatar__WEBPACK_IMPORTED_MODULE_7___default.a,\n UserContextMenu: _components_AcquaintanceShare_components_UserContextMenu_vue__WEBPACK_IMPORTED_MODULE_22__["default"]\n },\n data: function data() {\n return {\n isSelfLoading: false,\n open: false,\n timer: 0,\n timeGap: 3,\n isViewGird: true,\n isLoading: false,\n isDownloadShow: false,\n isDragIn: false,\n timeout: null,\n rootPath: "/",\n currentPath: "",\n currentPathName: "",\n listData: [],\n myId: "",\n myInfo: {\n user_name: "",\n nick_name: "",\n description: ""\n },\n myFriendsList: [],\n currentUser: {\n token: ""\n },\n currentUserFileList: {},\n cancelRequest: null,\n downloadListLen: 0,\n steps: [{\n target: \'#v-step-0\',\n content: \'Here is your avatar, where you can change your personal information and get your ID to share with your friends.\'\n }, {\n target: \'#v-step-1\',\n content: "Click \\"+\\" and enter your friend\'s ID to send a friend request."\n }, {\n target: \'#v-step-2\',\n content: \'Browse your download progress and download history here.\'\n }, {\n target: \'#v-step-3\',\n content: \'Modify your shared folders, and default download path here.\'\n }]\n };\n },\n computed: {\n isInit: function isInit() {\n return this.myInfo.nick_name != "" && this.myInfo.description != "";\n },\n viewIcon: function viewIcon() {\n return this.$store.state.isShareViewGird ? "view-grid-outline" : "format-list-bulleted";\n },\n listView: function listView() {\n return this.$store.state.isShareViewGird ? "gird-view" : "list-view";\n },\n isNoneUserSelect: function isNoneUserSelect() {\n return lodash_isEqual__WEBPACK_IMPORTED_MODULE_10___default()(this.currentUser, {\n token: ""\n });\n }\n },\n created: function created() {},\n mounted: function mounted() {\n this.getMyInfo();\n this.getMyShareId(); // if (this.timer)\n // clearInterval(this.timer)\n // this.timer = setInterval(() => {\n // this.getMyFriendList()\n // }, this.timeGap * 1000)\n\n this.getDownloadListLen(); // this.$tours[\'myTour\'].start()\n // Handling drag-and-drop upload events\n\n var tranlatePath = document.getElementById("drag-area");\n tranlatePath.addEventListener("dragenter", this.onDrag, false);\n tranlatePath.addEventListener("dragover", this.onDrag, false);\n tranlatePath.addEventListener("drop", this.onDrop, false);\n },\n methods: {\n /*************************************************\r\n * PART 1 Self Logic\r\n **************************************************/\n // Get My Info\n getMyInfo: function getMyInfo() {\n var _this = this;\n\n this.$api.user.getUserInfo(localStorage.getItem("user_id")).then(function (res) {\n _this.myInfo = res.data.data;\n\n if (!_this.isInit) {\n _this.showInitModal();\n } else {\n _this.getMyFriendList(true);\n }\n });\n },\n // Get MyID\n getMyShareId: function getMyShareId() {\n var _this2 = this;\n\n this.$api.person.getMyShareId().then(function (res) {\n _this2.myId = res.data.data;\n });\n },\n // Copy MyID to clipboard\n copyMyId: function copyMyId() {\n clipboard_copy__WEBPACK_IMPORTED_MODULE_23___default()(this.myId);\n this.$buefy.toast.open({\n message: this.myId + " " + this.$t(\'has been copied to the clipboard\'),\n type: \'is-success\'\n });\n },\n\n /*************************************************\r\n * PART 2 Friends share \r\n **************************************************/\n getMyFriendList: function getMyFriendList() {\n var _this3 = this;\n\n var showFirst = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.$api.person.getFriendsList().then(function (res) {\n _this3.myFriendsList = lodash_orderBy__WEBPACK_IMPORTED_MODULE_9___default()(res.data.data, [\'on_line\'], [\'desc\']);\n\n if (showFirst && _this3.myFriendsList.length > 0) {\n var user = lodash_find__WEBPACK_IMPORTED_MODULE_11___default()(_this3.myFriendsList, function (o) {\n return o.on_line;\n });\n\n _this3.getUserFiles(user, _this3.rootPath);\n }\n });\n },\n // Get user Files\n getUserFiles: function getUserFiles(user, path) {\n var _this4 = this;\n\n var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (!user.on_line) {\n this.$buefy.toast.open({\n message: user.nick_name + " " + this.$t(\'is offline\'),\n type: \'is-danger\'\n });\n return false;\n }\n\n if (this.isDownloadShow) this.isDownloadShow = false;\n this.currentUser = user;\n this.isLoading = true;\n\n if (typeof this.cancelRequest === \'function\') {\n this.cancelRequest();\n }\n\n this.$api.person.getDirectory(this.currentUser.token, path, this).then(function (res) {\n _this4.isLoading = false;\n\n if (res.data.success == 200) {\n _this4.currentPath = path;\n _this4.currentPathName = path.split("/").pop();\n _this4.listData = lodash_orderBy__WEBPACK_IMPORTED_MODULE_9___default()(res.data.data, [\'is_dir\'], [\'desc\']);\n\n if (type == 2) {\n _this4.$refs.historyBar.clearHistory();\n } else if (type == 1) {\n _this4.$refs.historyBar.addHistory(path);\n }\n } else {\n _this4.listData = [];\n }\n\n _this4.$store.commit(\'changeCurrentSharePath\', path);\n }).catch(function (err) {\n console.log(err);\n });\n },\n\n /*************************************************\r\n * PART 2 UI Action\r\n **************************************************/\n // Show user side bar context\n showContext: function showContext($event, user) {\n this.$refs.userContextMenu.open($event, user);\n },\n // Reload current folder\n reload: function reload() {\n this.getUserFiles(this.currentUser, this.currentPath);\n },\n // Show Download List\n showDownloadList: function showDownloadList() {\n this.isDownloadShow = true;\n this.listData = [];\n this.currentUser = {\n token: ""\n };\n },\n // Get download list length\n getDownloadListLen: function getDownloadListLen() {\n var _this5 = this;\n\n this.$api.person.getDownloadList().then(function (res) {\n if (res.data.success == 200) {\n _this5.downloadListLen = res.data.data.filter(function (item) {\n return item.state != 5;\n }).length;\n }\n });\n },\n //Update download list length\n updateListLen: function updateListLen(len) {\n this.downloadListLen = len;\n },\n // Change View\n changeView: function changeView() {\n this.isViewGird = !this.$store.state.isShareViewGird;\n this.$store.commit(\'changeShareViewGird\', this.isViewGird);\n },\n // Handle the multipane resize event\n onPanerResize: function onPanerResize() {\n if (this.isViewGird) this.$refs.views.onResize();\n },\n\n /******************************************\r\n * PART 3 Modals\r\n *******************************************/\n // Show Init Modal\n showInitModal: function showInitModal() {\n var _this6 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_InitModal_vue__WEBPACK_IMPORTED_MODULE_21__["default"],\n customClass: "init-modal",\n hasModalCard: true,\n trapFocus: true,\n canCancel: [],\n scroll: "keep",\n animation: "zoom-in",\n props: {\n myInfo: this.myInfo\n },\n events: {\n \'close\': function close() {\n _this6.getMyInfo();\n\n _this6.$tours[\'myTour\'].start();\n\n _this6.getMyFriendList(true);\n }\n }\n });\n },\n // Show Edit My Info Modal\n showEditInfoModal: function showEditInfoModal() {\n var _this7 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_ProfileModal_vue__WEBPACK_IMPORTED_MODULE_17__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n events: {\n \'close\': function close() {\n _this7.getMyInfo();\n }\n }\n });\n },\n // Show Settings Modal\n showSettingsModal: function showSettingsModal() {\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_SettingsModal_vue__WEBPACK_IMPORTED_MODULE_18__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in"\n });\n },\n // Show my ID Modal\n showMyIdModal: function showMyIdModal() {\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_MyInfoModal_vue__WEBPACK_IMPORTED_MODULE_20__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n props: {}\n });\n },\n // Show Add Friend Modal\n showAddFriendModal: function showAddFriendModal() {\n var _this8 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_AddFriendModal_vue__WEBPACK_IMPORTED_MODULE_15__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n events: {\n "reloadFriendList": function reloadFriendList() {\n _this8.getMyFriendList();\n }\n }\n });\n },\n // Show Download Modal\n showDownloadModal: function showDownloadModal(user, item) {\n var _this9 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_DownloadModal_vue__WEBPACK_IMPORTED_MODULE_16__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n props: {\n user: user,\n item: item\n },\n events: {\n "update": function update() {\n _this9.getDownloadListLen();\n }\n }\n });\n },\n\n /*************************************************\r\n * PART 4 Drag and Drop\r\n **************************************************/\n onDrag: function onDrag(e) {\n var _this10 = this;\n\n this.isDragIn = true;\n\n if (this.timeout !== null) {\n clearTimeout(this.timeout);\n }\n\n this.timeout = setTimeout(function () {\n _this10.isDragIn = false;\n _this10.timeout = null;\n }, 100);\n e.stopPropagation();\n e.preventDefault();\n },\n onDrop: function onDrop(e) {\n e.stopPropagation();\n e.preventDefault();\n }\n },\n sockets: {\n person_status: function person_status(data) {\n var isOnline = data.type == "OFFLINE" ? false : true;\n this.myFriendsList.forEach(function (item) {\n if (item.token == data.share_id) {\n item.on_line = isOnline;\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/views/CasaConnect.vue?./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')},'./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5adb896b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/AcquaintanceShare/components/ActionButton.vue?vue&type=template&id=6cb3fb0e&': +/*! 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_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var vue_avatar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vue-avatar */ "./node_modules/vue-avatar/dist/vue-avatar.min.js");\n/* harmony import */ var vue_avatar__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(vue_avatar__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var vue_multipane__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vue-multipane */ "./node_modules/vue-multipane/dist/vue-multipane.esm.js");\n/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/orderBy */ "./node_modules/lodash/orderBy.js");\n/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/isEqual */ "./node_modules/lodash/isEqual.js");\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js");\n/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _components_AcquaintanceShare_components_DownloadList_vue__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/DownloadList.vue */ "./src/components/AcquaintanceShare/components/DownloadList.vue");\n/* harmony import */ var _components_AcquaintanceShare_components_GirdView_vue__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/GirdView.vue */ "./src/components/AcquaintanceShare/components/GirdView.vue");\n/* harmony import */ var _components_AcquaintanceShare_components_ListView_vue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/ListView.vue */ "./src/components/AcquaintanceShare/components/ListView.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_AddFriendModal_vue__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/AddFriendModal.vue */ "./src/components/AcquaintanceShare/modals/AddFriendModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_DownloadModal_vue__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/DownloadModal.vue */ "./src/components/AcquaintanceShare/modals/DownloadModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_ProfileModal_vue__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/ProfileModal.vue */ "./src/components/AcquaintanceShare/modals/ProfileModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_SettingsModal_vue__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/SettingsModal.vue */ "./src/components/AcquaintanceShare/modals/SettingsModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_components_HistoryButton_vue__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/HistoryButton.vue */ "./src/components/AcquaintanceShare/components/HistoryButton.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_MyInfoModal_vue__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/MyInfoModal.vue */ "./src/components/AcquaintanceShare/modals/MyInfoModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_modals_InitModal_vue__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../components/AcquaintanceShare/modals/InitModal.vue */ "./src/components/AcquaintanceShare/modals/InitModal.vue");\n/* harmony import */ var _components_AcquaintanceShare_components_UserContextMenu_vue__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../components/AcquaintanceShare/components/UserContextMenu.vue */ "./src/components/AcquaintanceShare/components/UserContextMenu.vue");\n/* harmony import */ var clipboard_copy__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! clipboard-copy */ "./node_modules/clipboard-copy/index.js");\n/* harmony import */ var clipboard_copy__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(clipboard_copy__WEBPACK_IMPORTED_MODULE_23__);\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//\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//\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//\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//\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: "casa-connect",\n provide: function provide() {\n return {\n filePanel: this\n };\n },\n components: {\n Multipane: vue_multipane__WEBPACK_IMPORTED_MODULE_8__["Multipane"],\n MultipaneResizer: vue_multipane__WEBPACK_IMPORTED_MODULE_8__["MultipaneResizer"],\n DownloadList: _components_AcquaintanceShare_components_DownloadList_vue__WEBPACK_IMPORTED_MODULE_12__["default"],\n GirdView: _components_AcquaintanceShare_components_GirdView_vue__WEBPACK_IMPORTED_MODULE_13__["default"],\n ListView: _components_AcquaintanceShare_components_ListView_vue__WEBPACK_IMPORTED_MODULE_14__["default"],\n HistoryButton: _components_AcquaintanceShare_components_HistoryButton_vue__WEBPACK_IMPORTED_MODULE_19__["default"],\n Avatar: vue_avatar__WEBPACK_IMPORTED_MODULE_7___default.a,\n UserContextMenu: _components_AcquaintanceShare_components_UserContextMenu_vue__WEBPACK_IMPORTED_MODULE_22__["default"]\n },\n data: function data() {\n return {\n isSelfLoading: false,\n open: false,\n timer: 0,\n timeGap: 3,\n isViewGird: true,\n isLoading: false,\n isDownloadShow: false,\n isDragIn: false,\n timeout: null,\n rootPath: "/",\n currentPath: "",\n currentPathName: "",\n listData: [],\n myId: "",\n myInfo: {\n user_name: "",\n nick_name: "",\n description: ""\n },\n myFriendsList: [],\n currentUser: {\n token: ""\n },\n currentUserFileList: {},\n cancelRequest: null,\n downloadListLen: 0,\n steps: [{\n target: \'#v-step-0\',\n content: \'Here is your avatar, where you can change your personal information and get your ID to share with your friends.\'\n }, {\n target: \'#v-step-1\',\n content: "Click \\"+\\" and enter your friend\'s ID to send a friend request."\n }, {\n target: \'#v-step-2\',\n content: \'Browse your download progress and download history here.\'\n }, {\n target: \'#v-step-3\',\n content: \'Modify your shared folders, and default download path here.\'\n }]\n };\n },\n computed: {\n isInit: function isInit() {\n return this.myInfo.nick_name != "" && this.myInfo.description != "";\n },\n viewIcon: function viewIcon() {\n return this.$store.state.isShareViewGird ? "view-grid-outline" : "format-list-bulleted";\n },\n listView: function listView() {\n return this.$store.state.isShareViewGird ? "gird-view" : "list-view";\n },\n isNoneUserSelect: function isNoneUserSelect() {\n return lodash_isEqual__WEBPACK_IMPORTED_MODULE_10___default()(this.currentUser, {\n token: ""\n });\n }\n },\n created: function created() {},\n mounted: function mounted() {\n this.getMyInfo();\n this.getMyShareId(); // if (this.timer)\n // clearInterval(this.timer)\n // this.timer = setInterval(() => {\n // this.getMyFriendList()\n // }, this.timeGap * 1000)\n\n this.getDownloadListLen(); // this.$tours[\'myTour\'].start()\n // Handling drag-and-drop upload events\n\n var tranlatePath = document.getElementById("drag-area");\n tranlatePath.addEventListener("dragenter", this.onDrag, false);\n tranlatePath.addEventListener("dragover", this.onDrag, false);\n tranlatePath.addEventListener("drop", this.onDrop, false);\n },\n methods: {\n /*************************************************\n * PART 1 Self Logic\n **************************************************/\n // Get My Info\n getMyInfo: function getMyInfo() {\n var _this = this;\n\n this.$api.user.getUserInfo(localStorage.getItem("user_id")).then(function (res) {\n _this.myInfo = res.data.data;\n\n if (!_this.isInit) {\n _this.showInitModal();\n } else {\n _this.getMyFriendList(true);\n }\n });\n },\n // Get MyID\n getMyShareId: function getMyShareId() {\n var _this2 = this;\n\n this.$api.person.getMyShareId().then(function (res) {\n _this2.myId = res.data.data;\n });\n },\n // Copy MyID to clipboard\n copyMyId: function copyMyId() {\n clipboard_copy__WEBPACK_IMPORTED_MODULE_23___default()(this.myId);\n this.$buefy.toast.open({\n message: this.myId + " " + this.$t(\'has been copied to the clipboard\'),\n type: \'is-success\'\n });\n },\n\n /*************************************************\n * PART 2 Friends share \n **************************************************/\n getMyFriendList: function getMyFriendList() {\n var _this3 = this;\n\n var showFirst = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.$api.person.getFriendsList().then(function (res) {\n _this3.myFriendsList = lodash_orderBy__WEBPACK_IMPORTED_MODULE_9___default()(res.data.data, [\'on_line\'], [\'desc\']);\n\n if (showFirst && _this3.myFriendsList.length > 0) {\n var user = lodash_find__WEBPACK_IMPORTED_MODULE_11___default()(_this3.myFriendsList, function (o) {\n return o.on_line;\n });\n\n _this3.getUserFiles(user, _this3.rootPath);\n }\n });\n },\n // Get user Files\n getUserFiles: function getUserFiles(user, path) {\n var _this4 = this;\n\n var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (!user.on_line) {\n this.$buefy.toast.open({\n message: user.nick_name + " " + this.$t(\'is offline\'),\n type: \'is-danger\'\n });\n return false;\n }\n\n if (this.isDownloadShow) this.isDownloadShow = false;\n this.currentUser = user;\n this.isLoading = true;\n\n if (typeof this.cancelRequest === \'function\') {\n this.cancelRequest();\n }\n\n this.$api.person.getDirectory(this.currentUser.token, path, this).then(function (res) {\n _this4.isLoading = false;\n\n if (res.data.success == 200) {\n _this4.currentPath = path;\n _this4.currentPathName = path.split("/").pop();\n _this4.listData = lodash_orderBy__WEBPACK_IMPORTED_MODULE_9___default()(res.data.data, [\'is_dir\'], [\'desc\']);\n\n if (type == 2) {\n _this4.$refs.historyBar.clearHistory();\n } else if (type == 1) {\n _this4.$refs.historyBar.addHistory(path);\n }\n } else {\n _this4.listData = [];\n }\n\n _this4.$store.commit(\'changeCurrentSharePath\', path);\n }).catch(function (err) {\n console.log(err);\n });\n },\n\n /*************************************************\n * PART 2 UI Action\n **************************************************/\n // Show user side bar context\n showContext: function showContext($event, user) {\n this.$refs.userContextMenu.open($event, user);\n },\n // Reload current folder\n reload: function reload() {\n this.getUserFiles(this.currentUser, this.currentPath);\n },\n // Show Download List\n showDownloadList: function showDownloadList() {\n this.isDownloadShow = true;\n this.listData = [];\n this.currentUser = {\n token: ""\n };\n },\n // Get download list length\n getDownloadListLen: function getDownloadListLen() {\n var _this5 = this;\n\n this.$api.person.getDownloadList().then(function (res) {\n if (res.data.success == 200) {\n _this5.downloadListLen = res.data.data.filter(function (item) {\n return item.state != 5;\n }).length;\n }\n });\n },\n //Update download list length\n updateListLen: function updateListLen(len) {\n this.downloadListLen = len;\n },\n // Change View\n changeView: function changeView() {\n this.isViewGird = !this.$store.state.isShareViewGird;\n this.$store.commit(\'changeShareViewGird\', this.isViewGird);\n },\n // Handle the multipane resize event\n onPanerResize: function onPanerResize() {\n if (this.isViewGird) this.$refs.views.onResize();\n },\n\n /******************************************\n * PART 3 Modals\n *******************************************/\n // Show Init Modal\n showInitModal: function showInitModal() {\n var _this6 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_InitModal_vue__WEBPACK_IMPORTED_MODULE_21__["default"],\n customClass: "init-modal",\n hasModalCard: true,\n trapFocus: true,\n canCancel: [],\n scroll: "keep",\n animation: "zoom-in",\n props: {\n myInfo: this.myInfo\n },\n events: {\n \'close\': function close() {\n _this6.getMyInfo();\n\n _this6.$tours[\'myTour\'].start();\n\n _this6.getMyFriendList(true);\n }\n }\n });\n },\n // Show Edit My Info Modal\n showEditInfoModal: function showEditInfoModal() {\n var _this7 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_ProfileModal_vue__WEBPACK_IMPORTED_MODULE_17__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n events: {\n \'close\': function close() {\n _this7.getMyInfo();\n }\n }\n });\n },\n // Show Settings Modal\n showSettingsModal: function showSettingsModal() {\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_SettingsModal_vue__WEBPACK_IMPORTED_MODULE_18__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in"\n });\n },\n // Show my ID Modal\n showMyIdModal: function showMyIdModal() {\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_MyInfoModal_vue__WEBPACK_IMPORTED_MODULE_20__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n props: {}\n });\n },\n // Show Add Friend Modal\n showAddFriendModal: function showAddFriendModal() {\n var _this8 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_AddFriendModal_vue__WEBPACK_IMPORTED_MODULE_15__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n events: {\n "reloadFriendList": function reloadFriendList() {\n _this8.getMyFriendList();\n }\n }\n });\n },\n // Show Download Modal\n showDownloadModal: function showDownloadModal(user, item) {\n var _this9 = this;\n\n this.$buefy.modal.open({\n parent: this,\n component: _components_AcquaintanceShare_modals_DownloadModal_vue__WEBPACK_IMPORTED_MODULE_16__["default"],\n hasModalCard: true,\n trapFocus: true,\n canCancel: [\'escape\'],\n scroll: "keep",\n animation: "zoom-in",\n props: {\n user: user,\n item: item\n },\n events: {\n "update": function update() {\n _this9.getDownloadListLen();\n }\n }\n });\n },\n\n /*************************************************\n * PART 4 Drag and Drop\n **************************************************/\n onDrag: function onDrag(e) {\n var _this10 = this;\n\n this.isDragIn = true;\n\n if (this.timeout !== null) {\n clearTimeout(this.timeout);\n }\n\n this.timeout = setTimeout(function () {\n _this10.isDragIn = false;\n _this10.timeout = null;\n }, 100);\n e.stopPropagation();\n e.preventDefault();\n },\n onDrop: function onDrop(e) {\n e.stopPropagation();\n e.preventDefault();\n }\n },\n sockets: {\n person_status: function person_status(data) {\n var isOnline = data.type == "OFFLINE" ? false : true;\n this.myFriendsList.forEach(function (item) {\n if (item.token == data.share_id) {\n item.on_line = isOnline;\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/views/CasaConnect.vue?./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')},'./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5adb896b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/AcquaintanceShare/components/ActionButton.vue?vue&type=template&id=6cb3fb0e&': /*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5adb896b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/AcquaintanceShare/components/ActionButton.vue?vue&type=template&id=6cb3fb0e& ***! \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ diff --git a/web/js/9.js b/web/js/9.js index d60f83c..008b53c 100644 --- a/web/js/9.js +++ b/web/js/9.js @@ -2,15 +2,15 @@ /*!*********************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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\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 = "