diff --git a/package.json b/package.json index 4604e21..63f5f31 100755 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "bcrypt": "^5.1.1", "body-parser": "^1.20.2", "bytes": "^3.1.0", + "classnames": "^2.5.1", "cli-progress": "^3.6.0", "compression": "^1.7.4", "concat-stream": "^2.0.0", diff --git a/public/images/file-svg.svg b/public/images/file-svg.svg index 2bc0e5e..be8c43e 100644 --- a/public/images/file-svg.svg +++ b/public/images/file-svg.svg @@ -1 +1,5 @@ - \ No newline at end of file + + + + + diff --git a/src/api/filesAPI.ts b/src/api/filesAPI.ts index ca8a85d..a665568 100644 --- a/src/api/filesAPI.ts +++ b/src/api/filesAPI.ts @@ -38,3 +38,8 @@ export const getFilesList = async ({ }); return response.data; }; + +export const getQuickFilesList = async () => { + const response = await axios.get(`/file-service/quick-list`); + return response.data; +}; diff --git a/src/components/FileItem/index.jsx b/src/components/FileItem/index.jsx index 01d8191..49fab03 100644 --- a/src/components/FileItem/index.jsx +++ b/src/components/FileItem/index.jsx @@ -1,559 +1,534 @@ import FileItem from "./FileItem"; -import {startSetSelectedItem, setRightSelected, setLastSelected} from "../../actions/selectedItem" -import mobileCheck from "../../utils/mobileCheck" +import { + startSetSelectedItem, + setRightSelected, + setLastSelected, +} from "../../actions/selectedItem"; +import mobileCheck from "../../utils/mobileCheck"; import env from "../../enviroment/envFrontEnd"; import axios from "../../axiosInterceptor"; -import {connect} from "react-redux"; +import { connect } from "react-redux"; import React from "react"; import { startRenameFile, startRemoveFile } from "../../actions/files"; import mobilecheck from "../../utils/mobileCheck"; -import Swal from "sweetalert2" +import Swal from "sweetalert2"; import { setMoverID } from "../../actions/mover"; import { setMobileContextMenu } from "../../actions/mobileContextMenu"; class FileItemContainer extends React.Component { + constructor(props) { + super(props); - constructor(props) { - super(props); - - this.failedToLoad = false; + this.failedToLoad = false; - this.lastTouch = 0; + this.lastTouch = 0; - this.imageLoaded = false + this.imageLoaded = false; - this.state = { - contextMenuPos: {}, - imageSrc: "/images/file-svg.svg", - imageClassname: "noSelect file__item-no-thumbnail", - contextSelected: false, - editNameMode: false, - editName: this.props.filename, - deleteMode: false, - movingMode: false, - movingPercentage: 0, - } + this.state = { + contextMenuPos: {}, + imageSrc: "/images/file-svg.svg", + imageClassname: "noSelect file__item-no-thumbnail", + contextSelected: false, + editNameMode: false, + editName: this.props.filename, + deleteMode: false, + movingMode: false, + movingPercentage: 0, + }; + } + + getThumbnail = async () => { + this.imageLoaded = true; + + const thumbnailID = this.props.metadata.thumbnailID; + // const imageClassname = this.props.listView ? "file__image__listview--no-opacity" : "file__image--no-opacity" + const imageClassname = "noSelect"; + + if (this.props.metadata.drive && !this.props.metadata.googleDoc) { + return await this.setState(() => ({ + ...this.state, + imageSrc: this.props.metadata.thumbnailID, + imageClassname: imageClassname, + })); } - getThumbnail = async() => { + const config = { + responseType: "arraybuffer", + }; - this.imageLoaded = true; + await this.setState(() => ({ + ...this.state, + imageSrc: "/images/file-svg.svg", + imageClassname: "noSelect file__item-no-thumbnail", + })); - const thumbnailID = this.props.metadata.thumbnailID; - // const imageClassname = this.props.listView ? "file__image__listview--no-opacity" : "file__image--no-opacity" - const imageClassname = "noSelect" + const url = !this.props.metadata.personalFile + ? `/file-service/thumbnail/${thumbnailID}` + : `/file-service-personal/thumbnail/${thumbnailID}`; - if (this.props.metadata.drive && !this.props.metadata.googleDoc) { - - return await this.setState(() => ({ - ...this.state, - imageSrc: this.props.metadata.thumbnailID, - imageClassname: imageClassname - })) - } - - const config = { - responseType: 'arraybuffer' - }; - - await this.setState(() => ({ - ...this.state, - imageSrc: "/images/file-svg.svg", - imageClassname: "noSelect file__item-no-thumbnail" - })) - - const url = !this.props.metadata.personalFile ? `/file-service/thumbnail/${thumbnailID}` : `/file-service-personal/thumbnail/${thumbnailID}`; - - axios.get(url, config).then((results) => { - - const imgFile = new Blob([results.data]); - const imgUrl = URL.createObjectURL(imgFile); - - this.setState(() => ({ - ...this.state, - imageSrc: imgUrl, - imageClassname: imageClassname - })) - - - }).catch((err) => { - console.log(err) - }) - } - - thumbnailOnError = () => { - - console.log("thumbnail on error"); + axios + .get(url, config) + .then((results) => { + const imgFile = new Blob([results.data]); + const imgUrl = URL.createObjectURL(imgFile); this.setState(() => ({ - ...this.state, - imageSrc: "/images/file-svg.svg", - imageClassname: "noSelect file__item-no-thumbnail", - })) + ...this.state, + imageSrc: imgUrl, + imageClassname: imageClassname, + })); + }) + .catch((err) => { + console.log(err); + }); + }; + thumbnailOnError = () => { + console.log("thumbnail on error"); + + this.setState(() => ({ + ...this.state, + imageSrc: "/images/file-svg.svg", + imageClassname: "noSelect file__item-no-thumbnail", + })); + }; + + componentDidMount = () => { + const hasThumbnail = this.props.metadata.hasThumbnail; + + if ( + hasThumbnail && + !this.failedToLoad && + !this.props.listView && + !this.imageLoaded + ) { + this.getThumbnail(); + } + }; + + shouldComponentUpdate = (nextProp, nextState) => { + return ( + nextProp.itemSelected !== this.props.itemSelected || + nextProp.listView !== this.props.listView || + nextProp.rightSelected !== this.props.rightSelected || + nextState.imageSrc !== this.state.imageSrc || + nextState.imageClassname !== this.state.imageClassname || + this.props.filename !== nextProp.filename || + this.props.metadata.transcoded !== nextProp.metadata.transcode || + nextState.contextSelected !== this.state.contextSelected || + nextState.editNameMode !== this.state.editNameMode || + nextState.editName !== this.state.editName || + nextState.deleteMode !== this.state.deleteMode || + nextState.movingMode !== this.state.movingMode || + nextState.movingPercentage !== this.state.movingPercentage + ); + }; + + componentDidUpdate = (nextProp) => { + // console.log("file item component updated") + + return; + + const hasThumbnail = this.props.metadata.hasThumbnail; + + if (hasThumbnail && !this.failedToLoad && !this.imageLoaded) { + this.getThumbnail(); + } else if (nextProp.listView !== this.props.listView) { + this.setState(() => ({ + ...this.state, + imageClassname: this.props.listView + ? "file__image__listview" + : "file__image", + })); + } + }; + + onTouchStart = () => { + //alert("Touch start"); + const date = new Date(); + this.lastTouch = date.getTime(); + }; + + onTouchMove = () => { + this.lastTouch = 0; + }; + + onTouchEnd = () => { + if (this.lastTouch === 0) { + //alert("last touch 0"); + return; } - componentDidMount = () => { + const date = new Date(); + const difference = date - this.lastTouch; + //alert("Touch end: " + difference) + //alert("touch end: " + difference); + this.lastTouch = 0; - const hasThumbnail = this.props.metadata.hasThumbnail; + if (difference > 500) { + //alert("Context menu"); + //this.getContextMenu(); + this.selectContext(); + } + }; - if (hasThumbnail && !this.failedToLoad && !this.props.listView && !this.imageLoaded) { - this.getThumbnail(); + getContextMenu = (e) => { + if (e) e.preventDefault(); + + const isMobile = mobileCheck(); + + const windowX = window.innerWidth; + const windowY = window.innerHeight; + + let styleObj = { right: 0, left: 0, top: "-38px", bottom: 0 }; + + if (isMobile) { + styleObj = { bottom: 0, left: "2px", top: "unset", right: "unset" }; + } else { + const clientY = e.nativeEvent.clientY; + const clientX = e.nativeEvent.clientX; + + if (clientY < windowY / 3) { + styleObj = { bottom: "-190px", top: "unset" }; + } + + if (clientY > (windowY / 4) * 3.5) { + styleObj = { bottom: "unset", top: "-190px" }; + } + + if (clientX > windowX / 2) { + styleObj = { ...styleObj, left: "unset", right: 0 }; + } else { + styleObj = { ...styleObj, left: 0, right: "unset" }; + } + } + + // if (isMobile) { + + // styleObj = {bottom: 0, left: "2px", top: "unset", right: "unset"} + // } + + this.setState(() => ({ ...this.state, contextMenuPos: styleObj })); + + this.props.dispatch(startSetSelectedItem(this.props._id, true, false)); + this.props.dispatch(setLastSelected(0)); + this.props.dispatch(setRightSelected(this.props._id)); + }; + + getWrapperClassname = () => { + let classname = ""; + + if (this.props.listView) { + classname += "file__item__listview"; + } else { + classname += "file__item"; + } + + if (this.props._id === this.props.selected) { + classname += " file__item--selected"; + } + + return classname; + }; + + selectContext = (e) => { + if (e) e.stopPropagation(); + if (e) e.preventDefault(); + + if (mobilecheck()) { + this.props.dispatch(setMobileContextMenu(true, this.props)); + + return; + } + + this.setState(() => { + return { + ...this.state, + contextSelected: !this.state.contextSelected, + }; + }); + }; + + closeContext = () => { + this.setState(() => { + return { + ...this.state, + contextSelected: false, + }; + }); + }; + + editNamePopup = async () => { + let inputValue = this.props.filename; + + const { value: folderName } = await Swal.fire({ + title: "Enter A File Name", + input: "text", + inputValue: inputValue, + showCancelButton: true, + inputValidator: (value) => { + if (!value) { + return "Please Enter a Name"; } - } - - shouldComponentUpdate = (nextProp, nextState) => { + }, + }); - return (nextProp.itemSelected !== this.props.itemSelected - || nextProp.listView !== this.props.listView - || nextProp.rightSelected !== this.props.rightSelected - || nextState.imageSrc !== this.state.imageSrc - || nextState.imageClassname !== this.state.imageClassname - || this.props.filename !== nextProp.filename - || this.props.metadata.transcoded !== nextProp.metadata.transcode - || nextState.contextSelected !== this.state.contextSelected - || nextState.editNameMode !== this.state.editNameMode - || nextState.editName !== this.state.editName - || nextState.deleteMode !== this.state.deleteMode - || nextState.movingMode !== this.state.movingMode - || nextState.movingPercentage !== this.state.movingPercentage) - } - - componentDidUpdate = (nextProp) => { - - // console.log("file item component updated") - - return; - - const hasThumbnail = this.props.metadata.hasThumbnail; - - if (hasThumbnail && !this.failedToLoad && !this.imageLoaded) { - - this.getThumbnail(); - - } else if (nextProp.listView !== this.props.listView) { - - this.setState(() => ({ - ...this.state, - imageClassname: this.props.listView ? "file__image__listview" : "file__image" - })) - } + if (folderName === undefined || folderName === null) { + return; } - onTouchStart = () => { - //alert("Touch start"); - const date = new Date(); - this.lastTouch = date.getTime(); + // console.log("rename is google", this.props.isGoogle); + this.props.dispatch( + startRenameFile(this.props._id, folderName, this.props.metadata.drive) + ); + }; + + changeEditNameMode = () => { + this.editNamePopup(); + + // const isMobile = mobilecheck(); + + // if (isMobile || !this.props.listView) { + // this.mobileEditName(); + // return; + // } + + // this.setState(() => { + + // return { + // ...this.state, + // editNameMode: !this.state.editNameMode + // } + // }) + }; + + closeEditNameMode = () => { + this.setState(() => { + return { + ...this.state, + editNameMode: false, + }; + }); + }; + + changeEditName = (e) => { + const value = e.target.value; + + this.setState(() => { + return { + ...this.state, + editName: value, + }; + }); + }; + + saveNameEdit = () => { + const value = this.state.editName; + + this.props.dispatch( + startRenameFile(this.props._id, value, this.props.metadata.drive) + ); + + this.closeEditNameMode(); + }; + + deleteFilePopup = () => { + Swal.fire({ + title: "Confirm Deletion", + text: "You cannot undo this action", + icon: "warning", + showCancelButton: true, + confirmButtonColor: "#3085d6", + cancelButtonColor: "#d33", + confirmButtonText: "Yes, delete", + }).then((result) => { + if (result.value) { + this.props.dispatch( + startRemoveFile( + this.props._id, + this.props.metadata.drive, + this.props.metadata.personalFile + ) + ); + } + }); + }; + + removeDeleteMode = () => { + this.setState(() => { + return { + ...this.state, + deleteMode: false, + }; + }); + }; + + changeDeleteMode = () => { + this.deleteFilePopup(); + + // const isMobile = mobilecheck(); + + // if (isMobile || !this.props.listView) { + // this.mobileDeleteFile() + // return; + // } + + // this.setState(() => { + + // return { + // ...this.state, + // deleteMode: true, + // contextSelected: false + // } + // }) + }; + + startDeleteFile = () => { + //this.props.dispatch(startRemoveFile(this.props._id, this.props.metadata.drive, this.props.metadata.personalFile)) + + this.changeDeleteMode(); + }; + + startMovingFile = () => { + // console.log("moving file") + + // this.setState(() => { + // return { + // ...this.state, + // movingMode: true + // } + // }) + + // window.setInterval(this.changeMoverPos, 50) + // // REMEMBER TO STOP THIS WHEN FINISHED + this.props.dispatch( + setMoverID( + this.props._id, + this.props.metadata.parent, + true, + this.props.metadata.drive, + this.props.metadata.personalFile + ) + ); + }; + + changeMoverPos = () => { + this.setState(() => { + return { + ...this.state, + movingPercentage: + this.state.movingPercentage >= 80 + ? 0 + : this.state.movingPercentage + 1, + }; + }); + }; + + getFileExtension = (filename) => { + const filenameSplit = filename.split("."); + + if (filenameSplit.length > 1) { + let extension = filenameSplit[filenameSplit.length - 1]; + + if (extension.length > 3) + extension = + extension.substring(0, 2) + + extension.substring(extension.length - 1, extension.length); + + return extension.toUpperCase(); + } else { + return "UNK"; } + }; - onTouchMove = () => { + getColor = (ext) => { + const letter = ext.substring(0, 1).toUpperCase(); - this.lastTouch = 0; - } - - onTouchEnd = () => { - - if (this.lastTouch === 0) { - - //alert("last touch 0"); - return; - } - - const date = new Date(); - const difference = date - this.lastTouch; - //alert("Touch end: " + difference) - //alert("touch end: " + difference); - this.lastTouch = 0; - - if (difference > 500) { - //alert("Context menu"); - //this.getContextMenu(); - this.selectContext() - } - - } - - getContextMenu = (e) => { - - if (e) e.preventDefault(); - - const isMobile = mobileCheck(); - - const windowX = window.innerWidth; - const windowY = window.innerHeight; - - let styleObj = {right:0, left:0, top: "-38px", bottom: 0} - - if (isMobile) { - - styleObj = {bottom: 0, left: "2px", top: "unset", right: "unset"} - - } else { - - const clientY = e.nativeEvent.clientY; - const clientX = e.nativeEvent.clientX; - - if (clientY < (windowY / 3)) { - - styleObj = {bottom:"-190px", top:"unset"} - } - - if (clientY > ((windowY / 4) * 3.5)) { - - styleObj = {bottom:"unset", top: "-190px"} - } - - if (clientX > windowX / 2) { - - styleObj = {...styleObj, left:"unset", right:0} - - } else { - - styleObj = {...styleObj, left:0, right:"unset"} - } - } - - // if (isMobile) { - - // styleObj = {bottom: 0, left: "2px", top: "unset", right: "unset"} - // } - - this.setState(() => ({...this.state, contextMenuPos: styleObj})) - - this.props.dispatch(startSetSelectedItem(this.props._id, true, false)) - this.props.dispatch(setLastSelected(0)); - this.props.dispatch(setRightSelected(this.props._id)) - - } - - getWrapperClassname = () => { - - let classname = ""; - - if (this.props.listView) { - - classname += "file__item__listview" - - } else { - - classname += "file__item" - } - - if (this.props._id === this.props.selected) { - - classname += " file__item--selected" - } - - return classname; - } - - selectContext = (e) => { - - if (e) e.stopPropagation(); - if (e) e.preventDefault(); - - if (mobilecheck()) { - - this.props.dispatch(setMobileContextMenu(true, this.props)) - - return; - } - - this.setState(() => { - return { - ...this.state, - contextSelected: !this.state.contextSelected - } - }) - } - - closeContext = () => { - - this.setState(() => { - return { - ...this.state, - contextSelected: false - } - }) - } - - editNamePopup = async() => { - - let inputValue = this.props.filename; - - const { value: folderName} = await Swal.fire({ - title: 'Enter A File Name', - input: 'text', - inputValue: inputValue, - showCancelButton: true, - inputValidator: (value) => { - if (!value) { - return 'Please Enter a Name' - } - } - }) - - if (folderName === undefined || folderName === null) { - - return; - } - - // console.log("rename is google", this.props.isGoogle); - this.props.dispatch(startRenameFile(this.props._id, folderName, this.props.metadata.drive)) - } - - changeEditNameMode = () => { - - this.editNamePopup(); - - // const isMobile = mobilecheck(); - - // if (isMobile || !this.props.listView) { - // this.mobileEditName(); - // return; - // } - - // this.setState(() => { - - // return { - // ...this.state, - // editNameMode: !this.state.editNameMode - // } - // }) - } - - closeEditNameMode = () => { - - this.setState(() => { - - return { - ...this.state, - editNameMode: false - } - }) - } - - changeEditName = (e) => { - - const value = e.target.value; - - this.setState(() => { - return { - ...this.state, - editName: value - } - }) - } - - saveNameEdit = () => { - - const value = this.state.editName; - - this.props.dispatch(startRenameFile(this.props._id, value, this.props.metadata.drive)) - - this.closeEditNameMode(); - } - - deleteFilePopup = () => { - - Swal.fire({ - title: 'Confirm Deletion', - text: "You cannot undo this action", - icon: 'warning', - showCancelButton: true, - confirmButtonColor: '#3085d6', - cancelButtonColor: '#d33', - confirmButtonText: 'Yes, delete' - }).then((result) => { - if (result.value) { - this.props.dispatch(startRemoveFile(this.props._id, this.props.metadata.drive, this.props.metadata.personalFile)) - } - }) - } - - removeDeleteMode = () => { - - this.setState(() => { - - return { - ...this.state, - deleteMode: false, - } - }) - } - - changeDeleteMode = () => { - - this.deleteFilePopup(); - - // const isMobile = mobilecheck(); - - // if (isMobile || !this.props.listView) { - // this.mobileDeleteFile() - // return; - // } - - // this.setState(() => { - - // return { - // ...this.state, - // deleteMode: true, - // contextSelected: false - // } - // }) - } - - startDeleteFile = () => { - - //this.props.dispatch(startRemoveFile(this.props._id, this.props.metadata.drive, this.props.metadata.personalFile)) - - this.changeDeleteMode(); - } - - startMovingFile = () => { - - // console.log("moving file") - - // this.setState(() => { - // return { - // ...this.state, - // movingMode: true - // } - // }) - - // window.setInterval(this.changeMoverPos, 50) - // // REMEMBER TO STOP THIS WHEN FINISHED - this.props.dispatch(setMoverID(this.props._id, this.props.metadata.parent, true, this.props.metadata.drive, this.props.metadata.personalFile)); - } - - changeMoverPos = () => { - - this.setState(() => { - return { - ...this.state, - movingPercentage: this.state.movingPercentage >= 80 ? 0 : this.state.movingPercentage + 1 - } - }) - } - - getFileExtension = (filename) => { - - const filenameSplit = filename.split("."); - - if (filenameSplit.length > 1) { - - let extension = filenameSplit[filenameSplit.length - 1] - - if (extension.length > 3) extension = extension.substring(0,2) + extension.substring(extension.length - 1, extension.length); - - return extension.toUpperCase(); - - } else { - - return "UNK" - } - } - - getColor = (ext) => { - - const letter = ext.substring(0,1).toUpperCase(); - - const colorObj = { - A: '#e53935', - B: '#d81b60', - C: '#8e24aa', - D: '#5e35b1', - E: '#3949ab', - F: '#1e88e5', - G: '#039be5', - H: '#00acc1', - I: '#00897b', - J: '#43a047', - K: '#fdd835', - L: '#ffb300', - M: '#fb8c00', - N: '#f4511e', - O: '#d32f2f', - P: '#c2185b', - Q: '#7b1fa2', - R: '#512da8', - S: '#303f9f', - T: '#1976d2', - U: '#0288d1', - V: '#0097a7', - W: '#0097a7', - X: '#00796b', - Y: '#388e3c', - Z: '#fbc02d' - } - - if (colorObj[letter]) { - return colorObj[letter] - } else { - return "#03a9f4" - } - } - - getExtensionImage = () => { - - const ext = this.getFileExtension(this.props.filename); - - const extensionObj = { - PDF: "/assets/extension1.svg", - DOC: "/assets/extension2.svg", - DOCX: "/assets/extension2.svg", - XLS: "/assets/extension3.svg", - PTT: "/assets/extension4.svg", - ZIP: "/assets/extension5.svg", - } - - if (extensionObj[ext]) { - return {passed: true, ext: extensionObj[ext]}; - } else { - return {passed: false, ext, color: this.getColor(ext)} - } - } - - startFileClick = () => { - this.props.fileClick(this.props._id, this.props) - } - - clickStopPropagation = (e) => { - e.stopPropagation() - } - - render() { - - return + const colorObj = { + A: "#e53935", + B: "#d81b60", + C: "#8e24aa", + D: "#5e35b1", + E: "#3949ab", + F: "#1e88e5", + G: "#039be5", + H: "#00acc1", + I: "#00897b", + J: "#43a047", + K: "#fdd835", + L: "#ffb300", + M: "#fb8c00", + N: "#f4511e", + O: "#d32f2f", + P: "#c2185b", + Q: "#7b1fa2", + R: "#512da8", + S: "#303f9f", + T: "#1976d2", + U: "#0288d1", + V: "#0097a7", + W: "#0097a7", + X: "#00796b", + Y: "#388e3c", + Z: "#fbc02d", + }; + + if (colorObj[letter]) { + return colorObj[letter]; + } else { + return "#03a9f4"; } + }; + + getExtensionImage = () => { + const ext = this.getFileExtension(this.props.filename); + + return { passed: false, ext, color: this.getColor(ext) }; + }; + + startFileClick = () => { + this.props.fileClick(this.props._id, this.props); + }; + + clickStopPropagation = (e) => { + e.stopPropagation(); + }; + + render() { + return ( + + ); + } } const connectStateToProp = (state) => ({ - listView: state.filter.listView, - rightSelected: state.selectedItem.rightSelected, - resetSelected: state.selectedItem.resetSelected, - selected: state.selectedItem.selected -}) + listView: state.filter.listView, + rightSelected: state.selectedItem.rightSelected, + resetSelected: state.selectedItem.resetSelected, + selected: state.selectedItem.selected, +}); -export default connect(connectStateToProp)(FileItemContainer) \ No newline at end of file +export default connect(connectStateToProp)(FileItemContainer); diff --git a/src/components/Homepage/Homepage2.jsx b/src/components/Homepage/Homepage2.jsx index d05237e..90918d1 100644 --- a/src/components/Homepage/Homepage2.jsx +++ b/src/components/Homepage/Homepage2.jsx @@ -32,8 +32,7 @@ const Homepage2 = () => {
-
- +
{/* {photoID.length === 0 ? undefined : } */} diff --git a/src/components/LeftSection/LeftSection.jsx b/src/components/LeftSection/LeftSection.jsx index cd6de81..91d5809 100644 --- a/src/components/LeftSection/LeftSection.jsx +++ b/src/components/LeftSection/LeftSection.jsx @@ -14,7 +14,7 @@ class LeftSection extends React.Component { render() { return (
{ placeholder="Verify Password" onChange={props.verifyPasswordOnChange} value={props.state.verifyPassword} - ref={(ref) => { - props.passwordInput = ref; - }} />
)} diff --git a/src/components/MainSection/MainSection.jsx b/src/components/MainSection/MainSection.jsx index ca9e9d2..a8ffd1d 100644 --- a/src/components/MainSection/MainSection.jsx +++ b/src/components/MainSection/MainSection.jsx @@ -3,6 +3,7 @@ import RightSection from "../RightSection"; import MoverMenu from "../MoverMenu"; import PopupWindow from "../PopupWindow"; import React from "react"; +import LeftSection from "../LeftSection"; const MainSection = React.forwardRef((props, ref) => { return ( @@ -97,17 +98,21 @@ const MainSection = React.forwardRef((props, ref) => { {props.moverID.length === 0 ? undefined : } - +
+ {}} /> - + + + +
); diff --git a/src/components/QuickAccess/QuickAccess.jsx b/src/components/QuickAccess/QuickAccess.jsx deleted file mode 100644 index 27829e2..0000000 --- a/src/components/QuickAccess/QuickAccess.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import QuickAccessItem from "../QuickAccessItem"; -import React from "react"; - -const QuickAccess = (props) => ( -
-
-

Quick Access

-
- -
- {props.quickFiles.map((file) => ( - - ))} -
-
-); - -export default QuickAccess; diff --git a/src/components/QuickAccess/index.jsx b/src/components/QuickAccess/index.jsx index a309e8e..7d9d053 100644 --- a/src/components/QuickAccess/index.jsx +++ b/src/components/QuickAccess/index.jsx @@ -1,22 +1,44 @@ -import QuickAccess from "./QuickAccess"; -import {connect} from "react-redux"; +import { useSelector } from "react-redux"; +import QuickAccessItem from "../QuickAccessItem"; import React from "react"; +import { useQuickFiles } from "../../hooks/files"; -class QuickAccessContainer extends React.Component { +const QuickAccess = (props) => { + const { data: quickfilesList } = useQuickFiles(); + const currentRouteType = useSelector((state) => state.main.currentRouteType); - constructor(props) { - super(props); - } + return ( +
+
+

+ Quick Access +

+
- render() { - return - } +
+ {quickfilesList?.map((file) => ( + + ))} +
+
+ ); +}; -} - -const connectStateToProp = (state) => ({ - quickFiles: state.quickFiles, - currentRouteType: state.main.currentRouteType -}) - -export default connect(connectStateToProp)(QuickAccessContainer) \ No newline at end of file +export default QuickAccess; diff --git a/src/components/QuickAccessItem/QuickAccessItem.jsx b/src/components/QuickAccessItem/QuickAccessItem.jsx index f8cf7f5..a84e1c4 100644 --- a/src/components/QuickAccessItem/QuickAccessItem.jsx +++ b/src/components/QuickAccessItem/QuickAccessItem.jsx @@ -1,28 +1,168 @@ import capitalize from "../../utils/capitalize"; import moment from "moment"; -import React from "react"; +import React, { useMemo } from "react"; import NewContextMenu from "../NewContextMenu"; +import classNames from "classnames"; -const QuickAccessItem = (props) => ( +const QuickAccessItem = (props) => { + const fileExtension = useMemo(() => { + const filenameSplit = props.filename.split("."); -
{props.fileClick(props._id, props, true)}} - onContextMenu={props.selectContext} - onTouchStart={props.onTouchStart} - onTouchEnd={props.onTouchEnd} - onTouchMove={props.onTouchMove} + if (filenameSplit.length > 1) { + let extension = filenameSplit[filenameSplit.length - 1]; + + if (extension.length > 4) + extension = + extension.substring(0, 3) + + extension.substring(extension.length - 1, extension.length); + + return extension.toUpperCase(); + } else { + return "UNK"; + } + }, [props.filename]); + + const imageColor = useMemo(() => { + const letter = fileExtension.substring(0, 1).toUpperCase(); + + const colorObj = { + A: "#e53935", + B: "#d81b60", + C: "#8e24aa", + D: "#5e35b1", + E: "#3949ab", + F: "#1e88e5", + G: "#039be5", + H: "#00acc1", + I: "#00897b", + J: "#43a047", + K: "#fdd835", + L: "#ffb300", + M: "#fb8c00", + N: "#f4511e", + O: "#d32f2f", + P: "#c2185b", + Q: "#7b1fa2", + R: "#512da8", + S: "#303f9f", + T: "#1976d2", + U: "#0288d1", + V: "#0097a7", + W: "#0097a7", + X: "#00796b", + Y: "#388e3c", + Z: "#fbc02d", + }; + + if (colorObj[letter]) { + return colorObj[letter]; + } else { + return "#03a9f4"; + } + }, [props.filename]); + + const elementSelected = useMemo( + () => `quick-${props._id}` === props.selected, + [props._id, props.selected] + ); + + console.log("thumbnail", props.state); + + return ( +
{ + props.fileClick(props._id, props, true); + }} + onContextMenu={props.selectContext} + onTouchStart={props.onTouchStart} + onTouchEnd={props.onTouchEnd} + onTouchMove={props.onTouchMove} > -
- -
-
- -
-
-

{capitalize(props.filename)}

- Created {moment(props.uploadDate).calendar()} -
+
+ +
+
+ {props.state.hasThumbnail ? ( + + ) : ( + + + + )} + {!props.state.hasThumbnail && ( +
+

{fileExtension}

+
+ )} +
+
+

+ {capitalize(props.filename)} +

+ + Created {moment(props.uploadDate).calendar()} + +
-) - -export default QuickAccessItem + ); +}; +export default QuickAccessItem; diff --git a/src/components/QuickAccessItem/index.jsx b/src/components/QuickAccessItem/index.jsx index 3cc4782..6b98ed9 100644 --- a/src/components/QuickAccessItem/index.jsx +++ b/src/components/QuickAccessItem/index.jsx @@ -1,9 +1,13 @@ -import QuickAccessItem from "./QuickAccessItem" -import {setRightSelected, setLastSelected, setSelected} from "../../actions/selectedItem" -import mobileCheck from "../../utils/mobileCheck" +import QuickAccessItem from "./QuickAccessItem"; +import { + setRightSelected, + setLastSelected, + setSelected, +} from "../../actions/selectedItem"; +import mobileCheck from "../../utils/mobileCheck"; import env from "../../enviroment/envFrontEnd"; import axios from "../../axiosInterceptor"; -import {connect} from "react-redux"; +import { connect } from "react-redux"; import React from "react"; import Swal from "sweetalert2"; import { startRenameFile, startRemoveFile } from "../../actions/files"; @@ -14,268 +18,263 @@ import { setMobileContextMenu } from "../../actions/mobileContextMenu"; const currentURL = env.url; class QuickAccessItemContainer extends React.Component { + constructor(props) { + super(props); - constructor(props) { - super(props); + this.failedToLoad = false; + this.lastTouch = 0; - this.failedToLoad = false; - this.lastTouch = 0; + this.state = { + contextMenuPos: {}, + image: "/images/file-svg.svg", + imageClassname: "noSelect file__item-no-thumbnail", + contextSelected: false, + hasThumbnail: false, + }; + } - this.state = { - contextMenuPos: {}, - image: "/images/file-svg.svg", - imageClassname: "noSelect file__item-no-thumbnail", - contextSelected: false, - } + componentDidMount = () => { + const hasThumbnail = this.props.metadata.hasThumbnail; + console.log("has", hasThumbnail); + + if (hasThumbnail && !this.failedToLoad) { + this.getThumbnail(); + } + }; + + closeContext = () => { + this.setState(() => { + return { + ...this.state, + contextSelected: false, + }; + }); + }; + + selectContext = (e) => { + if (e) e.stopPropagation(); + if (e) e.preventDefault(); + + if (mobilecheck()) { + this.props.dispatch(setMobileContextMenu(true, this.props)); + return; } - componentDidMount = () => { + this.setState(() => { + return { + ...this.state, + contextSelected: !this.state.contextSelected, + }; + }); + }; - const hasThumbnail = this.props.metadata.hasThumbnail; + getThumbnail = async () => { + const thumbnailID = this.props.metadata.thumbnailID; + const imageClassname = "noSelect"; - if (hasThumbnail && !this.failedToLoad) { - this.getThumbnail(); - } + // GOOGLE DRIVE IMAGE + if (this.props.metadata.drive) { + return await this.setState(() => ({ + ...this.state, + image: this.props.metadata.thumbnailID, + imageClassname: imageClassname, + })); } - closeContext = () => { - - this.setState(() => { - return { - ...this.state, - contextSelected: false - } - }) - } + const config = { + responseType: "arraybuffer", + }; - selectContext = (e) => { + await this.setState(() => ({ + ...this.state, + image: "/images/file-svg.svg", + imageClassname: "noSelect file__item-no-thumbnail", + })); - if (e) e.stopPropagation() - if (e) e.preventDefault(); + const url = `http://localhost:5173/api/file-service/thumbnail/${thumbnailID}`; - if (mobilecheck()) { - - this.props.dispatch(setMobileContextMenu(true, this.props)); - return; - } - - this.setState(() => { - return { - ...this.state, - contextSelected: !this.state.contextSelected - } - }) - } - - getThumbnail = async() => { - - const thumbnailID = this.props.metadata.thumbnailID; - const imageClassname = "noSelect" - - // GOOGLE DRIVE IMAGE - if (this.props.metadata.drive) { - return await this.setState(() => ({ - ...this.state, - image: this.props.metadata.thumbnailID, - imageClassname: imageClassname - })) - } - - const config = { - responseType: 'arraybuffer' - }; - - await this.setState(() => ({ - ...this.state, - image: "/images/file-svg.svg", - imageClassname: "noSelect file__item-no-thumbnail" - })) - - const isPersonal = this.props.metadata.personalFile; - - const url = !isPersonal ? `/file-service/thumbnail/${thumbnailID}` : `/file-service-personal/thumbnail/${thumbnailID}`; - - axios.get(url, config).then((results) => { - - const imgFile = new Blob([results.data]); - const imgUrl = URL.createObjectURL(imgFile); - - this.setState(() => ({ - ...this.state, - image: imgUrl, - imageClassname: imageClassname - })) - - }).catch((err) => { - console.log(err) - }) - } - - thumbnailOnError = () => { - - console.log("thumbnail on error"); + axios + .get(url, config) + .then((results) => { + const imgFile = new Blob([results.data]); + const imgUrl = URL.createObjectURL(imgFile); + console.log("got image"); this.setState(() => ({ - ...this.state, - image: "/images/file-svg.svg", - imageClassname: "noSelect file__item-no-thumbnail", - })) + ...this.state, + image: imgUrl, + imageClassname: imageClassname, + hasThumbnail: true, + })); + }) + .catch((err) => { + console.log(err); + }); + }; + thumbnailOnError = (e) => { + console.log("thumbnail on error", e); + + this.setState(() => ({ + ...this.state, + image: "/images/file-svg.svg", + imageClassname: "noSelect file__item-no-thumbnail", + hasThumbnail: false, + })); + }; + + onTouchStart = () => { + const date = new Date(); + this.lastTouch = date.getTime(); + }; + + onTouchMove = () => { + this.lastTouch = 0; + }; + + onTouchEnd = () => { + if (this.lastTouch === 0) { + return; } - onTouchStart = () => { - const date = new Date(); - this.lastTouch = date.getTime(); + const date = new Date(); + const difference = date - this.lastTouch; + + this.lastTouch = 0; + + if (difference > 500) { + this.selectContext(); + } + }; + + getContextMenu = (e) => { + if (e) e.preventDefault(); + + const isMobile = mobileCheck(); + + const windowX = window.innerWidth; + const windowY = window.innerHeight; + + let styleObj = { right: 0, left: 0, top: "-3px", bottom: 0 }; + + if (isMobile) { + styleObj = { bottom: 0, left: "2px" }; + } else { + const clientY = e.nativeEvent.clientY; + const clientX = e.nativeEvent.clientX; + + if (clientX > windowX / 2) { + styleObj = { ...styleObj, left: "unset", right: 0 }; + } else { + styleObj = { ...styleObj, left: 0, right: "unset" }; + } } - onTouchMove = () => { + this.setState(() => ({ + ...this.state, + contextMenuPos: styleObj, + })); - this.lastTouch = 0; - } + this.props.dispatch(setSelected("quick-" + this.props._id)); + this.props.dispatch(setRightSelected("quick-" + this.props._id)); + this.props.dispatch(setLastSelected(0)); + }; - onTouchEnd = () => { + changeEditNameMode = async () => { + let inputValue = this.props.filename; - if (this.lastTouch === 0) { - - return; - } - - const date = new Date(); - const difference = date - this.lastTouch; - - this.lastTouch = 0; - - if (difference > 500) { - this.selectContext() + const { value: folderName } = await Swal.fire({ + title: "Enter A File Name", + input: "text", + inputValue: inputValue, + showCancelButton: true, + inputValidator: (value) => { + if (!value) { + return "Please Enter a Name"; } + }, + }); + if (folderName === undefined || folderName === null) { + return; } - getContextMenu = (e) => { + this.props.dispatch( + startRenameFile(this.props._id, folderName, this.props.metadata.drive) + ); + }; - if (e) e.preventDefault(); + closeEditNameMode = () => { + this.setState(() => { + return { + ...this.state, + editNameMode: false, + }; + }); + }; - const isMobile = mobileCheck() - - const windowX = window.innerWidth; - const windowY = window.innerHeight; + changeDeleteMode = async () => { + Swal.fire({ + title: "Confirm Deletion", + text: "You cannot undo this action", + icon: "warning", + showCancelButton: true, + confirmButtonColor: "#3085d6", + cancelButtonColor: "#d33", + confirmButtonText: "Yes, delete", + }).then((result) => { + if (result.value) { + this.props.dispatch( + startRemoveFile( + this.props._id, + this.props.metadata.drive, + this.props.metadata.personalFile + ) + ); + } + }); + }; - let styleObj = {right:0, left:0, top: "-3px", bottom: 0} + startMovingFile = async () => { + this.props.dispatch( + setMoverID( + this.props._id, + this.props.metadata.parent, + true, + this.props.metadata.drive, + this.props.metadata.personalFile + ) + ); + }; - if (isMobile) { - - styleObj = {bottom: 0, left: "2px"}; - - } else { - - const clientY = e.nativeEvent.clientY; - const clientX = e.nativeEvent.clientX; - - if (clientX > windowX / 2) { - - styleObj = {...styleObj, left:"unset", right:0} - - } else { - - styleObj = {...styleObj, left:0, right:"unset"} - } - - } - - this.setState(() => ({ - ...this.state, - contextMenuPos: styleObj - })) - - this.props.dispatch(setSelected("quick-"+this.props._id)) - this.props.dispatch(setRightSelected("quick-"+this.props._id)) - this.props.dispatch(setLastSelected(0)); - } - - changeEditNameMode = async() => { - - let inputValue = this.props.filename; - - const { value: folderName} = await Swal.fire({ - title: 'Enter A File Name', - input: 'text', - inputValue: inputValue, - showCancelButton: true, - inputValidator: (value) => { - if (!value) { - return 'Please Enter a Name' - } - } - }) - - if (folderName === undefined || folderName === null) { - - return; - } - - this.props.dispatch(startRenameFile(this.props._id, folderName, this.props.metadata.drive)) - } - - closeEditNameMode = () => { - - this.setState(() => { - - return { - ...this.state, - editNameMode: false - } - }) - } - - changeDeleteMode = async() => { - - Swal.fire({ - title: 'Confirm Deletion', - text: "You cannot undo this action", - icon: 'warning', - showCancelButton: true, - confirmButtonColor: '#3085d6', - cancelButtonColor: '#d33', - confirmButtonText: 'Yes, delete' - }).then((result) => { - if (result.value) { - this.props.dispatch(startRemoveFile(this.props._id, this.props.metadata.drive, this.props.metadata.personalFile)) - } - }) - } - - startMovingFile = async() => { - this.props.dispatch(setMoverID(this.props._id, this.props.metadata.parent, true, this.props.metadata.drive, this.props.metadata.personalFile)); - } - - clickStopPropagation = (e) => { - e.stopPropagation(); - } - - render() { - - return - } + clickStopPropagation = (e) => { + e.stopPropagation(); + }; + render() { + return ( + + ); + } } const connectStateToProp = (state) => ({ - rightSelected: state.selectedItem.rightSelected, - selected: state.selectedItem.selected -}) + rightSelected: state.selectedItem.rightSelected, + selected: state.selectedItem.selected, +}); export default connect(connectStateToProp)(QuickAccessItemContainer); - diff --git a/src/hooks/files.ts b/src/hooks/files.ts index c14f364..27ff580 100644 --- a/src/hooks/files.ts +++ b/src/hooks/files.ts @@ -1,6 +1,6 @@ -import { useInfiniteQuery } from "react-query"; +import { useInfiniteQuery, useQuery } from "react-query"; import { useParams } from "react-router-dom"; -import { getFilesList } from "../api/filesAPI"; +import { getFilesList, getQuickFilesList } from "../api/filesAPI"; export const useFiles = () => { const params = useParams(); @@ -33,3 +33,9 @@ export const useFiles = () => { return { ...filesReactQuery, testFunction }; }; + +export const useQuickFiles = () => { + const quickFilesQuery = useQuery("quickFiles", getQuickFilesList); + + return quickFilesQuery; +}; diff --git a/src/styles/base/_base.scss b/src/styles/base/_base.scss index cdcc212..0df8531 100644 --- a/src/styles/base/_base.scss +++ b/src/styles/base/_base.scss @@ -1,31 +1,34 @@ * { - box-sizing: border-box; + box-sizing: border-box; } html { - // font-size: 62.5%; - // --webkit-touch-callout: default; + // font-size: 62.5%; + // --webkit-touch-callout: default; } -input[type=text], -input[type=email], -input[type=password], +input[type="text"], +input[type="email"], +input[type="password"], textarea { - -webkit-appearance: none; + -webkit-appearance: none; } body { - // color: $dark-grey; - // font-family: Helvetica, Arial, sans-serif; - // font-size: $m-size; - // background-color: white; - // line-height: 1.6; + // color: $dark-grey; + // font-family: Helvetica, Arial, sans-serif; + // font-size: $m-size; + // background-color: white; + // line-height: 1.6; + height: 100vh; + width: 100vw; + overflow: hidden; } button { - cursor: pointer; + cursor: pointer; } button:disabled { - cursor: default; + cursor: default; } diff --git a/src/styles/components/file_content.scss b/src/styles/components/file_content.scss index 9e90ea8..17705d0 100644 --- a/src/styles/components/file_content.scss +++ b/src/styles/components/file_content.scss @@ -1,302 +1,302 @@ -.file__container{ - display: flex; - height:100%; - & .file__control--panel{ - width:100%; - padding:65px 40px; - &.empty__control--panel{ - &>.file__get--started{ - display: flex; - justify-content:center; - align-items:center; - height:100%; - flex-direction:column; - & .get__started--image{ - margin-bottom:30px; - } - &>h6{ - color:#212B36; - font-size:33px; - font-weight:400; - margin-top:0px; - margin-bottom:20px; - } - &>p{ - color:#637381; - font-size:20px; - font-weight:400; - margin:0px; - } - } - } - } - & .file__details{ - min-width:260px; - max-width:260px; - border-left:1px solid #E8EEF2; - padding:25px; - position: fixed; - top:73px; - background-color:#fff; - height:calc(100vh - 73px); - right:0px; - & .file__info--wrap{ - & .file__control{ - margin-top:15px; - display: flex; - justify-content:space-between; - align-items:center; - &>.file__settings{ - margin-left:15px; - & a{ - min-width:40px; - min-height:40px; - border-radius:4px; - display: inline-flex; - align-items:center; - justify-content:center; - border:1px solid #919EAB; - color:#919EAB; - text-decoration:none; - transition:.4s ease all; - &:hover{ - background-color:#3c85ee; - color:#fff; - } - } - } - &>a{ - width:100%; - max-width:150px; - height:40px; - display: inline-flex; - align-items:center; - justify-content:center; - border:1px solid #3c85ee; - border-radius:4px; - color:#3c85ee; - font-size:15px; - font-weight:500; - text-decoration:none; - transition:.4s ease all; - &:hover{ - background-color:#3c85ee; - color:#fff; - } - } - } - & .file__information{ - & .elem__file--info{ - display: flex; - margin-bottom:7px; - &:last-child{ - margin-bottom:0px; - } - justify-content:flex-start; - &>span:nth-child(1){ - color:#637381; - font-size:13px; - font-weight:400; - margin-right:35px; - line-height:20px; - min-width:50px; - } - &>span:nth-child(2){ - color:#212B36; - font-size:13px; - font-weight:400; - line-height:20px; - } - } - } - &>.file__name{ - margin:20px 0px; - & p{ - margin:0px; - color:#212B36; - font-size:16px; - font-weight:bold; - max-height: 54px; - overflow: hidden; - text-overflow: ellipsis; - display: block; - } - } - &>.file__type{ - & img{ - display: flex; - width:auto; - max-width:100%; - } - } - } - &.empty__details{ - display: flex; - align-items:center; - justify-content:center; - & .file__details--inner{ - display: flex; - flex-direction:column; - justify-content:center; - align-items:center; - text-align:center; - & span{ - display: flex; - justify-content:center; - align-items:center; - } - & p{ - color:#637381; - font-size:16px; - line-height: 24px; - font-weight:400; - margin:0px; - margin-top:30px; - } - } - } - } +.file__container { + display: flex; + height: 100%; + & .file__control--panel { + width: 100%; + padding: 65px 40px; + overflow-y: scroll; + &.empty__control--panel { + & > .file__get--started { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + flex-direction: column; + & .get__started--image { + margin-bottom: 30px; + } + & > h6 { + color: #212b36; + font-size: 33px; + font-weight: 400; + margin-top: 0px; + margin-bottom: 20px; + } + & > p { + color: #637381; + font-size: 20px; + font-weight: 400; + margin: 0px; + } + } + } + } + & .file__details { + min-width: 260px; + max-width: 260px; + border-left: 1px solid #e8eef2; + padding: 25px; + // position: fixed; + // top:73px; + background-color: #fff; + // height:calc(100vh - 73px); + right: 0px; + & .file__info--wrap { + & .file__control { + margin-top: 15px; + display: flex; + justify-content: space-between; + align-items: center; + & > .file__settings { + margin-left: 15px; + & a { + min-width: 40px; + min-height: 40px; + border-radius: 4px; + display: inline-flex; + align-items: center; + justify-content: center; + border: 1px solid #919eab; + color: #919eab; + text-decoration: none; + transition: 0.4s ease all; + &:hover { + background-color: #3c85ee; + color: #fff; + } + } + } + & > a { + width: 100%; + max-width: 150px; + height: 40px; + display: inline-flex; + align-items: center; + justify-content: center; + border: 1px solid #3c85ee; + border-radius: 4px; + color: #3c85ee; + font-size: 15px; + font-weight: 500; + text-decoration: none; + transition: 0.4s ease all; + &:hover { + background-color: #3c85ee; + color: #fff; + } + } + } + & .file__information { + & .elem__file--info { + display: flex; + margin-bottom: 7px; + &:last-child { + margin-bottom: 0px; + } + justify-content: flex-start; + & > span:nth-child(1) { + color: #637381; + font-size: 13px; + font-weight: 400; + margin-right: 35px; + line-height: 20px; + min-width: 50px; + } + & > span:nth-child(2) { + color: #212b36; + font-size: 13px; + font-weight: 400; + line-height: 20px; + } + } + } + & > .file__name { + margin: 20px 0px; + & p { + margin: 0px; + color: #212b36; + font-size: 16px; + font-weight: bold; + max-height: 54px; + overflow: hidden; + text-overflow: ellipsis; + display: block; + } + } + & > .file__type { + & img { + display: flex; + width: auto; + max-width: 100%; + } + } + } + &.empty__details { + display: flex; + align-items: center; + justify-content: center; + & .file__details--inner { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + text-align: center; + & span { + display: flex; + justify-content: center; + align-items: center; + } + & p { + color: #637381; + font-size: 16px; + line-height: 24px; + font-weight: 400; + margin: 0px; + margin-top: 30px; + } + } + } + } } .settings__mobile__margin { - @media (max-width: $desktop-breakpoint) { - - width: 64vw !important; - } + @media (max-width: $desktop-breakpoint) { + width: 64vw !important; + } } .settings__folder__margin { - margin-top: 32px !important; + margin-top: 32px !important; - @media (max-width: $desktop-breakpoint) { - - margin-top: -10px !important; - } + @media (max-width: $desktop-breakpoint) { + margin-top: -10px !important; + } } .access__info--file { - - & .settings__wrap{ - &>a{ - &.active__setting{ - background-color:#3c85ee; - & i{ - color:#fff!important; - } - } - min-width:40px; - min-height:40px; - border-radius:250px; - display: inline-flex; - align-items:center; - justify-content:center; - text-decoration:none; - transition:.4s ease all; - &:hover{ - background-color:#3c85ee; - & i{ - color:#fff!important; - } - } - } - & a i{ - transition:.4s ease all; - } - } + & .settings__wrap { + & > a { + &.active__setting { + background-color: #3c85ee; + & i { + color: #fff !important; + } + } + min-width: 40px; + min-height: 40px; + border-radius: 250px; + display: inline-flex; + align-items: center; + justify-content: center; + text-decoration: none; + transition: 0.4s ease all; + &:hover { + background-color: #3c85ee; + & i { + color: #fff !important; + } + } + } + & a i { + transition: 0.4s ease all; + } + } } .upload__mobile { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -moz-opacity: 0; - -khtml-opacity: 0; - cursor: pointer; - position: absolute; - /* top: 63px; */ - /* left: 0; */ - /* bottom: 0; */ - width: 100%; - top: 0; - background: red; - height: 41px; - margin-top: 3px; + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -moz-opacity: 0; + -khtml-opacity: 0; + cursor: pointer; + position: absolute; + /* top: 63px; */ + /* left: 0; */ + /* bottom: 0; */ + width: 100%; + top: 0; + background: red; + height: 41px; + margin-top: 3px; } .recent__table--wrap { - - & .main__access{ - display: grid; - grid-template-columns:repeat( auto-fit, minmax(185px, 185px)); - grid-column-gap:20px; - grid-row-gap:20px; - & .elem__access{ - width:100%; - border:1px solid #EBE9F9; - border-radius: 4px; - overflow:hidden; - transition:.4s ease all; - cursor:pointer; - &:hover{ - border: 1px solid #3c85ee; - } - & .access__image{ - display: inline-flex; - min-height:100px; - max-height: 100px; - align-items:center; - width: 100%; - background: white; - &>img{ - width:100%; - min-height:100px; - max-height:100px; - height:100%; - display:flex; - object-fit: cover; - } - } - & .access__info--file{ - padding-top:10px; - padding-left:10px; - padding-right:10px; - padding-bottom:15px; - display: flex; - flex-direction:column; - &>p{ - margin:0px; - color: #212B36; - font-size:14px; - line-height:16px; - font-weight:400; - // display: flex; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - &>span{ - color: #637381; - font-size:12px; - line-height:14px; - font-weight:400; - display: flex; - } - } - &.active__recent{ - &:hover{ - background-color:#3c85ee; - &>td.settings__row i{ - color:#fff; - } - } - background-color:#3c85ee; - &>td.location__row , &>td.name__row>.inner__name--row>p , &>td.modified__row , &>td.settings__row i { - color:#fff; - } - } - } - } + & .main__access { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(185px, 185px)); + grid-column-gap: 20px; + grid-row-gap: 20px; + & .elem__access { + width: 100%; + border: 1px solid #ebe9f9; + border-radius: 4px; + overflow: hidden; + transition: 0.4s ease all; + cursor: pointer; + &:hover { + border: 1px solid #3c85ee; + } + & .access__image { + display: inline-flex; + min-height: 100px; + max-height: 100px; + align-items: center; + width: 100%; + background: white; + & > img { + width: 100%; + min-height: 100px; + max-height: 100px; + height: 100%; + display: flex; + object-fit: cover; + } + } + & .access__info--file { + padding-top: 10px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 15px; + display: flex; + flex-direction: column; + & > p { + margin: 0px; + color: #212b36; + font-size: 14px; + line-height: 16px; + font-weight: 400; + // display: flex; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + & > span { + color: #637381; + font-size: 12px; + line-height: 14px; + font-weight: 400; + display: flex; + } + } + &.active__recent { + &:hover { + background-color: #3c85ee; + & > td.settings__row i { + color: #fff; + } + } + background-color: #3c85ee; + & > td.location__row, + & > td.name__row > .inner__name--row > p, + & > td.modified__row, + & > td.settings__row i { + color: #fff; + } + } + } + } } // div { @@ -308,404 +308,394 @@ // } .sorting__select { - border: none; - color: #212b36; - font-size: 14px; - font-weight: 500; - text-align: left; - -moz-appearance: none; - -webkit-appearance: none; - background: none; + border: none; + color: #212b36; + font-size: 14px; + font-weight: 500; + text-align: left; + -moz-appearance: none; + -webkit-appearance: none; + background: none; } .folders__image { - - &>svg { - width: 40px !important; - height: 40px; - color: #3c85ee; - } + & > svg { + width: 40px !important; + height: 40px; + color: #3c85ee; + } } .folder__selected { - - &>svg { - color: #FFF; - } + & > svg { + color: #fff; + } } -.upload__overlay{ - position: fixed; - top:0px; - left:0px; - display: none; - width:100%; - height:100vh; - z-index:10; - & .inner__upload{ - width:100%; - height:100vh; - display: flex; - align-items:center; - justify-content:center; - background: rgba(33, 43, 54, 0.9); - flex-direction:column; - &>p{ - margin:0px; - color: #FFFFFF; - font-size:33px; - line-height:39px; - margin-top:30px; - } - } +.upload__overlay { + position: fixed; + top: 0px; + left: 0px; + display: none; + width: 100%; + height: 100vh; + z-index: 10; + & .inner__upload { + width: 100%; + height: 100vh; + display: flex; + align-items: center; + justify-content: center; + background: rgba(33, 43, 54, 0.9); + flex-direction: column; + & > p { + margin: 0px; + color: #ffffff; + font-size: 33px; + line-height: 39px; + margin-top: 30px; + } + } } .no-extension__wrapper { - - height: 27px; - width: 27px; - background: red; - border-radius: 3px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; + height: 27px; + width: 27px; + background: red; + border-radius: 3px; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; } .no-extension__title { - - font-weight: 600; - font-size: 9.5px; - font-family: sans-serif; - color: white; + font-weight: 600; + font-size: 9.5px; + font-family: sans-serif; + color: white; } -.upload__status{ - position: fixed; - bottom:0px; - right:20px; - z-index: 5; - background: #FFFFFF; - box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15), inset 0px 1px 0px #F5F7FA; - border-radius: 4px; - border-top-left-radius:5px; - border-top-right-radius: 5px; - max-width:315px; - overflow:hidden; - & .content__upload{ - max-height: 300px; - overflow-y: scroll; - &>.elem__upload{ - position: relative; - &.uploading__now{ - &:hover{ - & .stop__download{ - display: block; - } - & .upload__size>span{ - display: none; - } - } - & .stop__download{ - position: absolute; - top:20px; - cursor:pointer; - right: 20px; - display: none; - transition:.4s ease all; - &:hover{ - opacity:.7; - } - } - } - &.uploaded__cancelled{ - &>.upload__info{ - &>.top__upload{ - &>.retry__download{ - &>a{ - text-decoration:none; - transition:.4s ease all; - color:#3c85ee; - font-size:13px; - font-weight:bold; - &:hover{ - opacity:.7; - } - } - } - margin-bottom:5px; - } - } - } - padding:20px; - display: flex; - justify-content:space-between; - align-items:flex-start; - transition:.4s ease all; - &:hover{ - background: #F6F5FD; - } - &>.upload__info{ - width:100%; - &>.bottom__upload{ - & .failed__info{ - &>span{ - display: inline-flex; - color:#BF0711; - font-size:12px; - font-weight:400; - } - } - &>.progress__upload{ - width:100%; - background: #E0DCF3; - border-radius: 1.5px; - height:3px; - position: relative; - & .active__progress{ - height:3px; - background: #3c85ee; - border-radius: 1.5px; - } - } - } - &>.top__upload{ - display: flex; - justify-content:space-between; - align-items:center; - margin-bottom:15px; - &>.upload__text{ - padding-right:30px; - & p{ - // display: inline-flex; - // word-break:break-all; - // max-width:200px; - color: #0E1C71; - font-size:15px; - line-height:18px; - font-weight:500; - max-width: 160px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - } - &>.upload__size{ - &>span{ - color: #637381; - font-size:13px; - line-height:16px; - font-weight:400; - } - } - & p{ - margin:0px; - } - } - } - &>.upload__elem--status{ - display: inline-flex; - margin-right:12px; - &>img{ - min-width:26px; - max-width:26px; - } - } - } - } - & .head__upload{ - padding:20px 15px; - background: #3c85ee; - min-width:315px; - border-radius: 0px 0px 3px 3px; - display: flex; - align-items:center; - position: relative; - & .hide__upload{ - position: absolute; - right:15px; - display: inline-flex; - &>a{ - display: inline-flex; - align-items:center; - justify-content:center; - padding:5px; - transition:.4s ease all; - &:hover{ - opacity:.7; - } - } - } - &>p{ - color: #FFFFFF; - margin:0px; - font-size:15px; - line-height:19px; - } - } +.upload__status { + position: fixed; + bottom: 0px; + right: 20px; + z-index: 5; + background: #ffffff; + box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15), inset 0px 1px 0px #f5f7fa; + border-radius: 4px; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + max-width: 315px; + overflow: hidden; + & .content__upload { + max-height: 300px; + overflow-y: scroll; + & > .elem__upload { + position: relative; + &.uploading__now { + &:hover { + & .stop__download { + display: block; + } + & .upload__size > span { + display: none; + } + } + & .stop__download { + position: absolute; + top: 20px; + cursor: pointer; + right: 20px; + display: none; + transition: 0.4s ease all; + &:hover { + opacity: 0.7; + } + } + } + &.uploaded__cancelled { + & > .upload__info { + & > .top__upload { + & > .retry__download { + & > a { + text-decoration: none; + transition: 0.4s ease all; + color: #3c85ee; + font-size: 13px; + font-weight: bold; + &:hover { + opacity: 0.7; + } + } + } + margin-bottom: 5px; + } + } + } + padding: 20px; + display: flex; + justify-content: space-between; + align-items: flex-start; + transition: 0.4s ease all; + &:hover { + background: #f6f5fd; + } + & > .upload__info { + width: 100%; + & > .bottom__upload { + & .failed__info { + & > span { + display: inline-flex; + color: #bf0711; + font-size: 12px; + font-weight: 400; + } + } + & > .progress__upload { + width: 100%; + background: #e0dcf3; + border-radius: 1.5px; + height: 3px; + position: relative; + & .active__progress { + height: 3px; + background: #3c85ee; + border-radius: 1.5px; + } + } + } + & > .top__upload { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 15px; + & > .upload__text { + padding-right: 30px; + & p { + // display: inline-flex; + // word-break:break-all; + // max-width:200px; + color: #0e1c71; + font-size: 15px; + line-height: 18px; + font-weight: 500; + max-width: 160px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } + & > .upload__size { + & > span { + color: #637381; + font-size: 13px; + line-height: 16px; + font-weight: 400; + } + } + & p { + margin: 0px; + } + } + } + & > .upload__elem--status { + display: inline-flex; + margin-right: 12px; + & > img { + min-width: 26px; + max-width: 26px; + } + } + } + } + & .head__upload { + padding: 20px 15px; + background: #3c85ee; + min-width: 315px; + border-radius: 0px 0px 3px 3px; + display: flex; + align-items: center; + position: relative; + & .hide__upload { + position: absolute; + right: 15px; + display: inline-flex; + & > a { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 5px; + transition: 0.4s ease all; + &:hover { + opacity: 0.7; + } + } + } + & > p { + color: #ffffff; + margin: 0px; + font-size: 15px; + line-height: 19px; + } + } } -@media (max-width:1200px){ - .file__container { - &>.file__control--panel{ - padding:25px 15px; - } - } - .main__wrapper--container{ - padding-left:15px; - padding-right:15px; - &.settings__container{ - &>.content__block{ - &>.small__switcher--content{ - max-width:690px; - } - } - } - &>.content__block{ - & .small__switcher--content{ - padding-top:15px; - display: flex; - justify-content:space-between; - max-width:100%; - margin-left:auto; - margin-right:auto; - padding-left:15px; - padding-right:15px; - position: fixed; - z-index: 3; - width: 100%; - background: white; - margin-top: 0; - padding-bottom: 15px; - // top: 109px; - margin-top: -2px; - &>a{ - text-decoration:none; - font-size:30px; - color:#3c85ee; - transition:.4s ease all; - display: inline-flex; - margin-right: 23px; - &:hover{ - opacity:.7 - } - } - } - } - } - .upload__status { - &>.head__upload{ - padding:15px 12px; - } - & .content__upload{ - &>.elem__upload{ - padding:12px; - } - } - } +@media (max-width: 1200px) { + .file__container { + & > .file__control--panel { + padding: 25px 15px; + } + } + .main__wrapper--container { + padding-left: 15px; + padding-right: 15px; + &.settings__container { + & > .content__block { + & > .small__switcher--content { + max-width: 690px; + } + } + } + & > .content__block { + & .small__switcher--content { + padding-top: 15px; + display: flex; + justify-content: space-between; + max-width: 100%; + margin-left: auto; + margin-right: auto; + padding-left: 15px; + padding-right: 15px; + position: fixed; + z-index: 3; + width: 100%; + background: white; + margin-top: 0; + padding-bottom: 15px; + // top: 109px; + margin-top: -2px; + & > a { + text-decoration: none; + font-size: 30px; + color: #3c85ee; + transition: 0.4s ease all; + display: inline-flex; + margin-right: 23px; + &:hover { + opacity: 0.7; + } + } + } + } + } + .upload__status { + & > .head__upload { + padding: 15px 12px; + } + & .content__upload { + & > .elem__upload { + padding: 12px; + } + } + } } -@media (max-width:640px){ - // .small__switcher--content { - // width: 92% !important; - // } +@media (max-width: 640px) { + // .small__switcher--content { + // width: 92% !important; + // } - .upload__overlay{ - & .inner__upload { - &>p{ - padding-left:10px; - padding-right:10px; - text-align:center; - font-size:24px; - } - } - } - .main__wrapper--container{ - min-height:auto; - } - .file__container{ - &>.file__control--panel.empty__control--panel{ - padding:15px 0px; - & .file__get--started{ - &>h6{ - font-size:24px; - margin-bottom:15px; - text-align:center; - } - &>p{ - font-size:16px; - text-align:center; - } - &>.get__started--image{ - margin-bottom:12px; - &>img{ - max-width:170px; - } - } - } - } - } - .upload__status{ - right:0px; - width:100%; - border-radius:0px; - max-width:100%; - position: fixed; - bottom:0px; - &>.head__upload{ - padding:10px; - } - & .content__upload{ - // display: none; - max-height:120px; - overflow-y: scroll; - &>.elem__upload { - padding:10px; - } - } - } + .upload__overlay { + & .inner__upload { + & > p { + padding-left: 10px; + padding-right: 10px; + text-align: center; + font-size: 24px; + } + } + } + .main__wrapper--container { + min-height: auto; + } + .file__container { + & > .file__control--panel.empty__control--panel { + padding: 15px 0px; + & .file__get--started { + & > h6 { + font-size: 24px; + margin-bottom: 15px; + text-align: center; + } + & > p { + font-size: 16px; + text-align: center; + } + & > .get__started--image { + margin-bottom: 12px; + & > img { + max-width: 170px; + } + } + } + } + } + .upload__status { + right: 0px; + width: 100%; + border-radius: 0px; + max-width: 100%; + position: fixed; + bottom: 0px; + & > .head__upload { + padding: 10px; + } + & .content__upload { + // display: none; + max-height: 120px; + overflow-y: scroll; + & > .elem__upload { + padding: 10px; + } + } + } } -@media (max-width:500px){ - - .recent__table--wrap { - &>.main__access{ - grid-template-columns: repeat(auto-fit, minmax(40%, 48%)); - grid-column-gap:10px; - & .elem__access{ - &>.access__image{ - min-height: 85px; - max-height:85px; - &>img{ - min-height: 85px; - max-height:85px; - object-fit: cover; - } - } - } - } - } +@media (max-width: 500px) { + .recent__table--wrap { + & > .main__access { + grid-template-columns: repeat(auto-fit, minmax(40%, 48%)); + grid-column-gap: 10px; + & .elem__access { + & > .access__image { + min-height: 85px; + max-height: 85px; + & > img { + min-height: 85px; + max-height: 85px; + object-fit: cover; + } + } + } + } + } } .location__row { + @media (max-width: 780px) { + display: none; + } - @media (max-width:780px) { - display: none; - } - - @media (max-width: $desktop-breakpoint) { - - display: none; - } + @media (max-width: $desktop-breakpoint) { + display: none; + } } - .modified__row { + @media (max-width: 780px) { + display: none; + } - @media (max-width:780px) { - display: none; - } - - @media (max-width: $desktop-breakpoint) { - - display: none; - } -} \ No newline at end of file + @media (max-width: $desktop-breakpoint) { + display: none; + } +} diff --git a/src/styles/components/file_panel.scss b/src/styles/components/file_panel.scss index 94b71b6..55d9791 100644 --- a/src/styles/components/file_panel.scss +++ b/src/styles/components/file_panel.scss @@ -2,1183 +2,1180 @@ // pointer-events: auto; // } -.content__block{ - & .no__results{ - width:100%; - display: flex; - flex-direction:column; - justify-content:center; - align-items:center; - & .results__image{ - margin-bottom:30px; - &>img{ - max-width:90px; - } - } - &>h6{ - color:#212B36; - font-size:33px; - font-weight:400; - margin:0px; - margin-bottom:20px; - } - &>p{ - color:#637381; - font-size:20px; - font-weight:400; - margin:0px; - } - &>p.searching__result{ - color:#637381; - font-size:13px; - font-weight:400; - margin:0px; - margin-top:20px; - &>span{ - color:#212B36; - font-size:13px; - font-weight:400; - display: inline-flex; - margin:0px 2px; - } - &>a{ - color:#3c85ee; - font-size:13px; - font-weight:500; - text-decoration:none; - transition:.4s ease all; - &:hover{ - opacity:.7; - } - } - } - } - & .recent__table{ - width:100%; - border-collapse:collapse; - & tbody>tr:nth-child(1):hover{ - background-color:#fff; - } - & tr{ - position: relative; - // transform:scale(1); - &.moving__file{ - width:100%; - height:75px; - & .inner__moving{ - position: absolute; - left:0px; - top:0px; - width:100%; - padding:15px 20px; - height:75px; - display: flex; - align-items:center; - justify-content:space-between; - &>.moving__info{ - width:100%; - margin-right:30px; - } - & p{ - margin:0px; - color:#212B36; - font-size:16px; - font-weight:400; - } - & span{ - color:#637381; - font-size:12px; - font-weight:400; - } - &>.cancel__moving{ - position: static; - transition:.4s ease all; - &:hover{ - opacity:.7; - } - } - & .progress__moving{ - width:100%; - height:3px; - background-color:#DAE6FF; - position: relative; - margin-top:7px; - border-radius:25px; - & .active__progress{ - height:3px; - border-radius:250px; - background-color:#5864FF; - } - } - } - } - & .delete__wrap{ - position: absolute; - left:0px; - width:100%; - background-color:green; - top:0px; - display: flex; - justify-content:center; - align-items:center; - height:100%; - background: rgba(149, 13, 20, 0.8); - & .delete__buttons{ - display: flex; - align-items:center; - justify-content:center; - &>.keep__button{ - min-width:100px; - min-height:35px; - display: inline-flex; - align-items:center; - justify-content:center; - border-radius: 4px; - transition:.4s ease all; - border:1px solid #fff; - font-size: 15px; - line-height: 18px; - font-weight:500; - text-decoration:none; - color:#fff; - transition:.4s ease all; - &:hover{ - background-color:#fff; - color:#BF0711; - } - } - &>a.delete__button{ - min-width:100px; - min-height:35px; - display: inline-flex; - align-items:center; - justify-content:center; - border-radius: 4px; - background-color:#fff; - transition:.4s ease all; - color: #BF0711; - font-size:15px; - line-height:18px; - font-weight:500; - text-decoration:none; - margin-right:10px; - &:hover{ - opacity:.7; - } - } - } - & p{ - margin:0px; - margin-right:20px; - color:#FFFFFF; - display: inline-flex; - font-size:15px; - font-weight:500; - } - } - &:nth-child(1){ - cursor:default - } - & .settings__drop{ - display: none; - position: absolute; - left:-60%; - right:50%; - bottom:auto; - min-width:215px; - background: #FFFFFF; - box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15), inset 0px 1px 0px #F5F7FA; - border-radius: 4px; - top: -100%; - margin-top:-5px; - transform: translate(0%,-80%); - z-index:4; - & ul{ - padding:0px; - list-style-type: none; - margin:0px; - & li{ - & a{ - display:flex; - width:100%; - padding:12px 20px; - align-items:center; - font-weight:400; - justify-content:flex-start; - text-decoration:none; - transition:.4s ease all; - & a{ - & img{ - transition:.4s ease all; - } - } - &:hover{ - background: #F6F5FD; - color:#3c85ee; - font-weight:500; - & img{ - filter: invert(43%) sepia(91%) saturate(1645%) hue-rotate(198deg) brightness(96%) contrast(94%); - //filter: invert(66%) sepia(149%) saturate(3678%) hue-rotate(239deg) brightness(72%) contrast(113%); - } - } - & span{ - display: inline-flex; - margin-right:18px; - } - } - } - } - } - cursor:pointer; - &.active__recent{ - &:hover{ - background-color:#3c85ee; - &>td.settings__row i{ - color:#fff; - } - } - background-color:#3c85ee; - &>td.location__row , &>td.name__row>.inner__name--row>p , &>td.modified__row , &>td.settings__row i { - color:#fff; - } - } - transition:.4s ease all; - & .settings__wrap{ - &>a{ - &.active__setting{ - background-color:#3c85ee; - & i{ - color:#fff!important; - } - } - min-width:40px; - min-height:40px; - border-radius:250px; - display: inline-flex; - align-items:center; - justify-content:center; - text-decoration:none; - transition:.4s ease all; - &:hover{ - background-color:#3c85ee; - & i{ - color:#fff!important; - } - } - } - & a i{ - transition:.4s ease all; - } - } - } - & tr:hover{ - background-color:#F6F5FD; - & .settings__wrap{ - position: relative; - & a i{ - color:#3c85ee; - } - } - } - & tr>td.location__row , & tr>td.modified__row{ - color:#212B36; - font-size:14px; - font-weight:400; - } - & tr>td.modified__row , & tr>th.modified__row{ - min-width:150px; - padding-right:10px; - padding-left:10px; - transition:.4s ease all; - } - & tr>th.size__row{ - min-width:90px; - padding-right:10px; - padding-left:10px; - } - & tr>td.size__row{ - margin:0px; - min-width:90px; - align-items:center; - color:#212B36; - font-size:14px; - font-weight:400; - transition:.4s ease all; - padding-right:10px; - padding-left:10px; - min-height:71px; - } - & tr>td.location__row , & tr>th.location__row{ - min-width:190px; - padding-right:10px; - padding-left:10px; - transition:.4s ease all; - } - & tr>td.settings__row , & tr>th.settings__row{ - padding-right:20px; - min-width:120px; - & .settings__wrap{ - & a{ - color:#919EAB; - } - position: relative; - display: flex; - justify-content:center; - align-items:center; - @media (max-width: $desktop-breakpoint) { - width: 58vw; - } - } - } - & tr>td.name__row , & tr>th.name__row{ - // width:100%; - padding-left:20px; - text-align:left; - transition:.4s ease all; - & .edit__name{ - width:100%; - position: relative; - display: flex; - align-items:center; - &>input{ - width: 100%; - min-height: 42px; - border: 1px solid #BEC9D3; - padding-left: 15px; - padding-right: 80px; - font-size: 14px; - color: #212B36; - border-radius: 5px; - caret-color: #3c85ee; - } - &>a{ - position: absolute; - right:10px; - min-width:62px; - min-height:28px; - display: inline-flex; - align-items:center; - justify-content:center; - border:1px solid #3c85ee; - border-radius:4px; - color:#3c85ee; - font-size:13px; - font-weight:500; - text-decoration:none; - transition:.4s ease all; - &:hover{ - color:#fff; - background-color:#3c85ee; - } - } - } - & .inner__name--row{ - display: flex; - align-items:center; - & p{ - // margin:0px; - // // word-break:break-all; - // max-width: 33%; - // max-height: 30px; - // overflow: hidden; - // text-overflow: ellipsis; - // word-break: break-word; - margin: 0px; - // max-width: 50%; - max-height: 30px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - display: block; - - } - } - & p{ - margin:0px; - display: inline-flex; - align-items:center; - color:#212B36; - font-size:14px; - font-weight:400; - transition:.4s ease all; - } - & .extension__wrap{ - display: inline-flex; - align-items:center; - margin-right:15px; - max-width:27px; - min-width:27px; - min-height:27px; - max-height:27px; - } - } - & tr>td{ - padding-top:15px; - padding-bottom:15px; - border-bottom:1px solid #E8EEF2; - } - & tr>th{ - padding-bottom:10px; - border-bottom:1px solid #E8EEF2; - & a{ - display: inline-flex; - margin-left:5px; - } - color:#212B36; - font-size:14px; - font-weight:500; - text-align:left; - } - } - & .file__view{ - margin-top:50px; - & .recent__table--wrap { - & .head__recent--files{ - display: flex; - justify-content:space-between; - margin-bottom:20px; - &>h2{ - color: #212B36; - font-size:22px; - font-weight:500; - line-height:26px; - margin:0px; - } - & .view__recent{ - & ul{ - display: flex; - align-items:center; - list-style-type: none; - margin:0px; - padding:0px; - & li{ - &.active__view{ - & a{ - color:#3c85ee; - } - } - margin-right:15px; - & a:hover{ - color:#3c85ee; - } - & a{ - transition:.4s ease all; - color:#919EAB; - } - &:last-child{ - margin-right:0px; - } - } - } - } - } - } - } - & .file__control--panel { - &.folder__view{ - &.file__control--panel{ - & .settings__row{ - & .settings__wrap{ - &> .settings__drop{ - left:20%; - transform:translate(-100%, -40%); - } - } - - } - } - padding-top:65px; - &>.results__files{ - margin-bottom:25px; - &>p.searching__result{ - color:#637381; - font-size:13px; - font-weight:400; - margin:0px; - display: inline-flex; - &>span{ - color:#212B36; - font-size:13px; - font-weight:400; - display: inline-flex; - margin:0px 3px; - &.current__folder{ - margin-right:0px; - } - } - &>a{ - color:#3c85ee; - font-size:13px; - font-weight:500; - text-decoration:none; - transition:.4s ease all; - &:hover{ - opacity:.7; - } - } - } - &>h2{ - margin-top:0px; - margin-bottom:5px; - color:#637381; - font-size:18px; - line-height:24px; - font-weight:400; - &>.result__search--word{ - color:#212B36; - font-weight:500; - font-size:18px; - } - } - } - &>.file__view{ - // margin-top:0px; - & >.recent__table--wrap { - & >.head__recent--files{ - & .path__files{ - display: flex; - align-items:center; - &>a{ - color:#637381; - font-size:18px; - line-height:21px; - font-weight:500; - margin:0px; - text-decoration:none; - transition:.4s ease all; - &:hover{ - opacity:.7; - } - } - &>p{ - color:#212B36; - font-size:18px; - line-height:21px; - font-weight:500; - margin:0px; - white-space: nowrap; - } - & .spacer__path{ - display: inline-flex; - margin:0px 10px; - } - } - } - } - - } - } - & .folders__panel{ - // margin-top:50px; - & .inner__folders{ - display: grid; - grid-template-columns:repeat( auto-fit, minmax(185px, 185px)); - grid-column-gap:20px; - grid-row-gap:20px; - & .elem__folders{ - padding:12px; - border: 1px solid #EBE9F9; - border-radius: 4px; - overflow: hidden; - cursor:pointer; - transition:.4s ease all; - &.active__folder{ - background-color:#3c85ee; - & .folders__image{ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - & i{ - color:#fff; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - ::before{ - content: "\f07b"; - } - } - } - & .folder__info{ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - &>p{ - color:#fff; - } - &>ul{ - & li{ - color:#fff; - } - } - } - } - &:hover{ - border-color: #3c85ee; - } - & .folder__info{ - margin-top:8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - &>p{ - margin:0px; - color: #212B36; - font-size:15px; - line-height:18px; - font-weight:500; - margin-bottom:5px; - transition:.4s ease all; - max-width: 97%; - overflow: hidden; - // word-break: break-word; - //max-height: 36px; - white-space: nowrap; - text-overflow: ellipsis; - } - & ul{ - display: flex; - padding:0px; - list-style-type: none; - margin:0px; - transition:.4s ease all; - & li{ - display: inline-flex; - color: #637381; - font-size:12px; - line-height:14px; - transition:.4s ease all; - } - & .spacer__folder{ - display: inline-flex; - margin:0px 4px; - } - } - } - & .folders__image{ - & i{ - color: #3c85ee; - font-size:40px; - transition:.4s ease all; +.content__block { + & .no__results { + width: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + & .results__image { + margin-bottom: 30px; + & > img { + max-width: 90px; + } + } + & > h6 { + color: #212b36; + font-size: 33px; + font-weight: 400; + margin: 0px; + margin-bottom: 20px; + } + & > p { + color: #637381; + font-size: 20px; + font-weight: 400; + margin: 0px; + } + & > p.searching__result { + color: #637381; + font-size: 13px; + font-weight: 400; + margin: 0px; + margin-top: 20px; + & > span { + color: #212b36; + font-size: 13px; + font-weight: 400; + display: inline-flex; + margin: 0px 2px; + } + & > a { + color: #3c85ee; + font-size: 13px; + font-weight: 500; + text-decoration: none; + transition: 0.4s ease all; + &:hover { + opacity: 0.7; + } + } + } + } + & .recent__table { + width: 100%; + border-collapse: collapse; + & tbody > tr:nth-child(1):hover { + background-color: #fff; + } + & tr { + position: relative; + // transform:scale(1); + &.moving__file { + width: 100%; + height: 75px; + & .inner__moving { + position: absolute; + left: 0px; + top: 0px; + width: 100%; + padding: 15px 20px; + height: 75px; + display: flex; + align-items: center; + justify-content: space-between; + & > .moving__info { + width: 100%; + margin-right: 30px; + } + & p { + margin: 0px; + color: #212b36; + font-size: 16px; + font-weight: 400; + } + & span { + color: #637381; + font-size: 12px; + font-weight: 400; + } + & > .cancel__moving { + position: static; + transition: 0.4s ease all; + &:hover { + opacity: 0.7; + } + } + & .progress__moving { + width: 100%; + height: 3px; + background-color: #dae6ff; + position: relative; + margin-top: 7px; + border-radius: 25px; + & .active__progress { + height: 3px; + border-radius: 250px; + background-color: #5864ff; + } + } + } + } + & .delete__wrap { + position: absolute; + left: 0px; + width: 100%; + background-color: green; + top: 0px; + display: flex; + justify-content: center; + align-items: center; + height: 100%; + background: rgba(149, 13, 20, 0.8); + & .delete__buttons { + display: flex; + align-items: center; + justify-content: center; + & > .keep__button { + min-width: 100px; + min-height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 4px; + transition: 0.4s ease all; + border: 1px solid #fff; + font-size: 15px; + line-height: 18px; + font-weight: 500; + text-decoration: none; + color: #fff; + transition: 0.4s ease all; + &:hover { + background-color: #fff; + color: #bf0711; + } + } + & > a.delete__button { + min-width: 100px; + min-height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 4px; + background-color: #fff; + transition: 0.4s ease all; + color: #bf0711; + font-size: 15px; + line-height: 18px; + font-weight: 500; + text-decoration: none; + margin-right: 10px; + &:hover { + opacity: 0.7; + } + } + } + & p { + margin: 0px; + margin-right: 20px; + color: #ffffff; + display: inline-flex; + font-size: 15px; + font-weight: 500; + } + } + &:nth-child(1) { + cursor: default; + } + & .settings__drop { + display: none; + position: absolute; + left: -60%; + right: 50%; + bottom: auto; + min-width: 215px; + background: #ffffff; + box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15), inset 0px 1px 0px #f5f7fa; + border-radius: 4px; + top: -100%; + margin-top: -5px; + transform: translate(0%, -80%); + z-index: 4; + & ul { + padding: 0px; + list-style-type: none; + margin: 0px; + & li { + & a { + display: flex; + width: 100%; + padding: 12px 20px; + align-items: center; + font-weight: 400; + justify-content: flex-start; + text-decoration: none; + transition: 0.4s ease all; + & a { + & img { + transition: 0.4s ease all; + } + } + &:hover { + background: #f6f5fd; + color: #3c85ee; + font-weight: 500; + & img { + filter: invert(43%) sepia(91%) saturate(1645%) + hue-rotate(198deg) brightness(96%) contrast(94%); + //filter: invert(66%) sepia(149%) saturate(3678%) hue-rotate(239deg) brightness(72%) contrast(113%); + } + } + & span { + display: inline-flex; + margin-right: 18px; + } + } + } + } + } + cursor: pointer; + &.active__recent { + &:hover { + background-color: #3c85ee; + & > td.settings__row i { + color: #fff; + } + } + background-color: #3c85ee; + & > td.location__row, + & > td.name__row > .inner__name--row > p, + & > td.modified__row, + & > td.settings__row i { + color: #fff; + } + } + transition: 0.4s ease all; + & .settings__wrap { + & > a { + &.active__setting { + background-color: #3c85ee; + & i { + color: #fff !important; + } + } + min-width: 40px; + min-height: 40px; + border-radius: 250px; + display: inline-flex; + align-items: center; + justify-content: center; + text-decoration: none; + transition: 0.4s ease all; + &:hover { + background-color: #3c85ee; + & i { + color: #fff !important; + } + } + } + & a i { + transition: 0.4s ease all; + } + } + } + & tr:hover { + background-color: #f6f5fd; + & .settings__wrap { + position: relative; + & a i { + color: #3c85ee; + } + } + } + & tr > td.location__row, + & tr > td.modified__row { + color: #212b36; + font-size: 14px; + font-weight: 400; + } + & tr > td.modified__row, + & tr > th.modified__row { + min-width: 150px; + padding-right: 10px; + padding-left: 10px; + transition: 0.4s ease all; + } + & tr > th.size__row { + min-width: 90px; + padding-right: 10px; + padding-left: 10px; + } + & tr > td.size__row { + margin: 0px; + min-width: 90px; + align-items: center; + color: #212b36; + font-size: 14px; + font-weight: 400; + transition: 0.4s ease all; + padding-right: 10px; + padding-left: 10px; + min-height: 71px; + } + & tr > td.location__row, + & tr > th.location__row { + min-width: 190px; + padding-right: 10px; + padding-left: 10px; + transition: 0.4s ease all; + } + & tr > td.settings__row, + & tr > th.settings__row { + padding-right: 20px; + min-width: 120px; + & .settings__wrap { + & a { + color: #919eab; + } + position: relative; + display: flex; + justify-content: center; + align-items: center; + @media (max-width: $desktop-breakpoint) { + width: 58vw; + } + } + } + & tr > td.name__row, + & tr > th.name__row { + // width:100%; + padding-left: 20px; + text-align: left; + transition: 0.4s ease all; + & .edit__name { + width: 100%; + position: relative; + display: flex; + align-items: center; + & > input { + width: 100%; + min-height: 42px; + border: 1px solid #bec9d3; + padding-left: 15px; + padding-right: 80px; + font-size: 14px; + color: #212b36; + border-radius: 5px; + caret-color: #3c85ee; + } + & > a { + position: absolute; + right: 10px; + min-width: 62px; + min-height: 28px; + display: inline-flex; + align-items: center; + justify-content: center; + border: 1px solid #3c85ee; + border-radius: 4px; + color: #3c85ee; + font-size: 13px; + font-weight: 500; + text-decoration: none; + transition: 0.4s ease all; + &:hover { + color: #fff; + background-color: #3c85ee; + } + } + } + & .inner__name--row { + display: flex; + align-items: center; + & p { + // margin:0px; + // // word-break:break-all; + // max-width: 33%; + // max-height: 30px; + // overflow: hidden; + // text-overflow: ellipsis; + // word-break: break-word; + margin: 0px; + // max-width: 50%; + max-height: 30px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + display: block; + } + } + & p { + margin: 0px; + display: inline-flex; + align-items: center; + color: #212b36; + font-size: 14px; + font-weight: 400; + transition: 0.4s ease all; + } + & .extension__wrap { + display: inline-flex; + align-items: center; + margin-right: 15px; + max-width: 27px; + min-width: 27px; + min-height: 27px; + max-height: 27px; + } + } + & tr > td { + padding-top: 15px; + padding-bottom: 15px; + border-bottom: 1px solid #e8eef2; + } + & tr > th { + padding-bottom: 10px; + border-bottom: 1px solid #e8eef2; + & a { + display: inline-flex; + margin-left: 5px; + } + color: #212b36; + font-size: 14px; + font-weight: 500; + text-align: left; + } + } + & .file__view { + margin-top: 50px; + & .recent__table--wrap { + & .head__recent--files { + display: flex; + justify-content: space-between; + margin-bottom: 20px; + & > h2 { + color: #212b36; + font-size: 22px; + font-weight: 500; + line-height: 26px; + margin: 0px; + } + & .view__recent { + & ul { + display: flex; + align-items: center; + list-style-type: none; + margin: 0px; + padding: 0px; + & li { + &.active__view { + & a { + color: #3c85ee; + } + } + margin-right: 15px; + & a:hover { + color: #3c85ee; + } + & a { + transition: 0.4s ease all; + color: #919eab; + } + &:last-child { + margin-right: 0px; + } + } + } + } + } + } + } + & .file__control--panel { + &.folder__view { + &.file__control--panel { + & .settings__row { + & .settings__wrap { + & > .settings__drop { + left: 20%; + transform: translate(-100%, -40%); + } + } + } + } + padding-top: 65px; + & > .results__files { + margin-bottom: 25px; + & > p.searching__result { + color: #637381; + font-size: 13px; + font-weight: 400; + margin: 0px; + display: inline-flex; + & > span { + color: #212b36; + font-size: 13px; + font-weight: 400; + display: inline-flex; + margin: 0px 3px; + &.current__folder { + margin-right: 0px; + } + } + & > a { + color: #3c85ee; + font-size: 13px; + font-weight: 500; + text-decoration: none; + transition: 0.4s ease all; + &:hover { + opacity: 0.7; + } + } + } + & > h2 { + margin-top: 0px; + margin-bottom: 5px; + color: #637381; + font-size: 18px; + line-height: 24px; + font-weight: 400; + & > .result__search--word { + color: #212b36; + font-weight: 500; + font-size: 18px; + } + } + } + & > .file__view { + // margin-top:0px; + & > .recent__table--wrap { + & > .head__recent--files { + & .path__files { + display: flex; + align-items: center; + & > a { + color: #637381; + font-size: 18px; + line-height: 21px; + font-weight: 500; + margin: 0px; + text-decoration: none; + transition: 0.4s ease all; + &:hover { + opacity: 0.7; + } + } + & > p { + color: #212b36; + font-size: 18px; + line-height: 21px; + font-weight: 500; + margin: 0px; + white-space: nowrap; + } + & .spacer__path { + display: inline-flex; + margin: 0px 10px; + } + } + } + } + } + } + & .folders__panel { + // margin-top:50px; + & .inner__folders { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(185px, 185px)); + grid-column-gap: 20px; + grid-row-gap: 20px; + & .elem__folders { + padding: 12px; + border: 1px solid #ebe9f9; + border-radius: 4px; + overflow: hidden; + cursor: pointer; + transition: 0.4s ease all; + &.active__folder { + background-color: #3c85ee; + & .folders__image { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + & i { + color: #fff; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + ::before { + content: "\f07b"; + } + } + } + & .folder__info { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + & > p { + color: #fff; + } + & > ul { + & li { + color: #fff; + } + } + } + } + &:hover { + border-color: #3c85ee; + } + & .folder__info { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + & > p { + margin: 0px; + color: #212b36; + font-size: 15px; + line-height: 18px; + font-weight: 500; + margin-bottom: 5px; + transition: 0.4s ease all; + max-width: 97%; + overflow: hidden; + // word-break: break-word; + //max-height: 36px; + white-space: nowrap; + text-overflow: ellipsis; + } + & ul { + display: flex; + padding: 0px; + list-style-type: none; + margin: 0px; + transition: 0.4s ease all; + & li { + display: inline-flex; + color: #637381; + font-size: 12px; + line-height: 14px; + transition: 0.4s ease all; + } + & .spacer__folder { + display: inline-flex; + margin: 0px 4px; + } + } + } + & .folders__image { + & i { + color: #3c85ee; + font-size: 40px; + transition: 0.4s ease all; - ::before{ - content: "\f07b"; - } - } - } - } - } - & .head__folders{ - &>h2{ - margin:0px; - margin-bottom:20px; - color:#212B36; - font-size:22px; - font-weight:500; - } - } - } - & .quick__access{ - & .main__access{ - display: grid; - grid-template-columns:repeat( auto-fit, minmax(185px, 185px)); - grid-column-gap:20px; - grid-row-gap:20px; - & .elem__access{ - width:100%; - border:1px solid #EBE9F9; - border-radius: 4px; - overflow:hidden; - transition:.4s ease all; - cursor:pointer; - &:hover{ - border: 1px solid #3c85ee; - } - & .access__image{ - display: inline-flex; - min-height:100px; - max-height: 100px; - align-items:center; - width: 100%; - background: white; - &>img{ - width:100%; - min-height:100px; - max-height:100px; - height:100%; - display:flex; - object-fit: cover; - } - } - & .access__info--file{ - padding-top:10px; - padding-left:10px; - padding-right:10px; - padding-bottom:15px; - //display: flex; - flex-direction:column; - // white-space: nowrap; - max-width: 98%; - overflow: hidden; - text-overflow: ellipsis; - display: block; - &>p{ - margin:0px; - color: #212B36; - font-size:14px; - line-height:16px; - font-weight:400; - // display: flex; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - &>span{ - color: #637381; - font-size:12px; - line-height:14px; - font-weight:400; - display: flex; - } - } - &.active__recent{ - &:hover{ - background-color:#3c85ee; - &>td.settings__row i{ - color:#fff; - } - } - background-color:#3c85ee; - &>td.location__row , &>td.name__row>.inner__name--row>p , &>td.modified__row , &>td.settings__row i { - color:#fff; - } - } - } - } - &>.head__access{ - &>h2{ - margin:0px; - margin-bottom:20px; - color:#212B36; - font-size:22px; - font-weight:500; - } - } - } - } + ::before { + content: "\f07b"; + } + } + } + } + } + & .head__folders { + & > h2 { + margin: 0px; + margin-bottom: 20px; + color: #212b36; + font-size: 22px; + font-weight: 500; + } + } + } + & .quick__access { + & .main__access { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(185px, 185px)); + grid-column-gap: 20px; + grid-row-gap: 20px; + & .elem__access { + width: 100%; + border: 1px solid #ebe9f9; + border-radius: 4px; + overflow: hidden; + transition: 0.4s ease all; + cursor: pointer; + &:hover { + border: 1px solid #3c85ee; + } + & .access__image { + display: inline-flex; + min-height: 100px; + max-height: 100px; + align-items: center; + width: 100%; + background: white; + & > img { + width: 100%; + min-height: 100px; + max-height: 100px; + height: 100%; + display: flex; + object-fit: cover; + } + } + & .access__info--file { + padding-top: 10px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 15px; + //display: flex; + flex-direction: column; + // white-space: nowrap; + max-width: 98%; + overflow: hidden; + text-overflow: ellipsis; + display: block; + & > p { + margin: 0px; + color: #212b36; + font-size: 14px; + line-height: 16px; + font-weight: 400; + // display: flex; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + & > span { + color: #637381; + font-size: 12px; + line-height: 14px; + font-weight: 400; + display: flex; + } + } + &.active__recent { + &:hover { + background-color: #3c85ee; + & > td.settings__row i { + color: #fff; + } + } + background-color: #3c85ee; + & > td.location__row, + & > td.name__row > .inner__name--row > p, + & > td.modified__row, + & > td.settings__row i { + color: #fff; + } + } + } + } + & > .head__access { + & > h2 { + margin: 0px; + margin-bottom: 20px; + color: #212b36; + font-size: 22px; + font-weight: 500; + } + } + } + } } .noSelect { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .context__menu--wrapper { - - & .settings__drop{ - display: none; - position: absolute; - // left:-60%; - // right:50%; - //bottom:auto; - min-width:215px; - background: #FFFFFF; - box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15), inset 0px 1px 0px #F5F7FA; - border-radius: 4px; - //top: -100%; - margin-top:-5px; - transform: translate(0%,-80%); - z-index:2; - // @media (max-width: $desktop-breakpoint) { - // transform: translate(-6%,-80%) !important; - // } - & ul{ - padding:0px; - list-style-type: none; - margin:0px; - & li{ - & a{ - display:flex; - width:100%; - padding:12px 20px; - align-items:center; - font-weight:400; - justify-content:flex-start; - text-decoration:none; - transition:.4s ease all; - & a{ - & img{ - transition:.4s ease all; - } - } - &:hover{ - background: #F6F5FD; - color:#3c85ee; - font-weight:500; - & img{ - filter: invert(43%) sepia(91%) saturate(1645%) hue-rotate(198deg) brightness(96%) contrast(94%); - //filter: invert(66%) sepia(149%) saturate(3678%) hue-rotate(239deg) brightness(72%) contrast(113%); - } - } - & span{ - display: inline-flex; - margin-right:18px; - } - } - } - } - } + & .settings__drop { + display: none; + position: absolute; + // left:-60%; + // right:50%; + //bottom:auto; + min-width: 215px; + background: #ffffff; + box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15), inset 0px 1px 0px #f5f7fa; + border-radius: 4px; + //top: -100%; + margin-top: -5px; + transform: translate(0%, -80%); + z-index: 2; + // @media (max-width: $desktop-breakpoint) { + // transform: translate(-6%,-80%) !important; + // } + & ul { + padding: 0px; + list-style-type: none; + margin: 0px; + & li { + & a { + display: flex; + width: 100%; + padding: 12px 20px; + align-items: center; + font-weight: 400; + justify-content: flex-start; + text-decoration: none; + transition: 0.4s ease all; + & a { + & img { + transition: 0.4s ease all; + } + } + &:hover { + background: #f6f5fd; + color: #3c85ee; + font-weight: 500; + & img { + filter: invert(43%) sepia(91%) saturate(1645%) hue-rotate(198deg) + brightness(96%) contrast(94%); + //filter: invert(66%) sepia(149%) saturate(3678%) hue-rotate(239deg) brightness(72%) contrast(113%); + } + } + & span { + display: inline-flex; + margin-right: 18px; + } + } + } + } + } } // .recent__table { // @media (max-width: $desktop-breakpoint) { - + // min-width: 129vw; // } // } .folders__panel { + margin-top: 35px; - margin-top: 35px; - - @media (max-width:1200px){ - - margin-top: 35px; - } + @media (max-width: 1200px) { + margin-top: 35px; + } } .folders__panel__folder { + margin-top: 0px; - margin-top: 0px; + // @media (max-width: $desktop-breakpoint) { + // margin-top: 50px; + // } - // @media (max-width: $desktop-breakpoint) { - // margin-top: 50px; - // } - - @media (max-width:1200px){ - - margin-top: 50px; - } + @media (max-width: 1200px) { + margin-top: 50px; + } } .path__files { + & p { + max-width: 300px; + overflow: hidden; + text-overflow: ellipsis; - & p { - max-width: 300px; - overflow: hidden; - text-overflow: ellipsis; - - @media (max-width:1200px){ - - max-width: 50vw; - } - } + @media (max-width: 1200px) { + max-width: 50vw; + } + } } .quick__access { - height: 221px; - overflow: hidden; + height: 221px; + overflow: hidden; } -@media (max-width:1200px){ - - .results__files { - margin-top: 50px; - } - .quick__access { - margin-top: 33px; - } - .content__block{ - & .file__control--panel.folder__view{ - padding-top:25px; - } - & .recent__table { - & tr { - & .settings__drop{ - left: 20%; - transform: translate(-100%, -40%) - } - } - } - } - .file__container { - & .file__details{ - z-index: 6; - position: fixed; - top:0px; - right:-260px; - height: 100vh; - transition:.5s ease all; - } - } +@media (max-width: 1200px) { + .results__files { + margin-top: 50px; + } + .quick__access { + margin-top: 33px; + } + .content__block { + & .file__control--panel.folder__view { + padding-top: 25px; + } + & .recent__table { + & tr { + & .settings__drop { + left: 20%; + transform: translate(-100%, -40%); + } + } + } + } + .file__container { + & .file__details { + // z-index: 6; + // top:0px; + // right:-260px; + // height: 100vh; + // transition:.5s ease all; + } + } } .name__row-filename { + //max-width: 50%; + max-width: 353px; - //max-width: 50%; - max-width: 353px; + @media (max-width: 1500px) { + max-width: 250px; + } - @media (max-width:1500px) { - max-width: 250px; - } + @media (max-width: 1400px) { + max-width: 150px; + } - @media (max-width:1400px) { - max-width: 150px; - } + @media (max-width: 1300px) { + max-width: 80px; + } - @media (max-width:1300px) { - max-width: 80px; - } + @media (max-width: 1200px) { + max-width: 400px; + } - @media (max-width:1200px) { - max-width: 400px; - } + @media (max-width: 1000px) { + max-width: 300px; + } - @media (max-width:1000px) { - max-width: 300px; - } + @media (max-width: 900px) { + max-width: 250px; + } - @media (max-width:900px) { - max-width: 250px; - } - - @media (max-width: $desktop-breakpoint) { - max-width: 50vw; - } + @media (max-width: $desktop-breakpoint) { + max-width: 50vw; + } } .recent__table { - @media (max-width: $desktop-breakpoint) { - table-layout: fixed; - } + @media (max-width: $desktop-breakpoint) { + table-layout: fixed; + } } -@media (max-width:767px){ +@media (max-width: 767px) { + // .inner__name--row { + // display: flex; + // align-items:center; + // & p{ + // // margin:0px; + // // // word-break:break-all; + // // max-width: 33%; + // // max-height: 30px; + // // overflow: hidden; + // // text-overflow: ellipsis; + // // word-break: break-word; + // margin: 0px; + // max-width: 25%; + // max-height: 30px; + // overflow: hidden; + // white-space: nowrap; + // text-overflow: ellipsis; + // display: block; - // .inner__name--row { - // display: flex; - // align-items:center; - // & p{ - // // margin:0px; - // // // word-break:break-all; - // // max-width: 33%; - // // max-height: 30px; - // // overflow: hidden; - // // text-overflow: ellipsis; - // // word-break: break-word; - // margin: 0px; - // max-width: 25%; - // max-height: 30px; - // overflow: hidden; - // white-space: nowrap; - // text-overflow: ellipsis; - // display: block; - - // } - // } + // } + // } - .file__view { - margin-top:0px !important; - } + .file__view { + margin-top: 0px !important; + } - .file__container{ - &>.file__control--panel{ - padding:25px 0px; - } - } - .content__block{ - &>.file__container{ - &>.file__control--panel{ - &>.quick__access{ - &>.main__access{ - grid-template-columns: repeat(auto-fit, minmax(165px, 165px)); - } - } - &>.folders__panel{ - &>.inner__folders{ - grid-template-columns: repeat(auto-fit, minmax(165px, 165px)); - } - } - &>.file__view{ - &> .recent__table--wrap { - &>.head__recent--files{ - // margin-bottom:-80px; - } - } - - &>.recent__table--wrap{ - overflow-x: hidden; - padding-top: 32px; - // pointer-events: none; - } - } - } - } - - & .file__control--panel.folder__view{ - &> .file__view{ - &> .recent__table--wrap { - &>.head__recent--files{ - // margin-bottom:-80px; - } - } - &>.recent__table--wrap{ - overflow-x: hidden; - padding-top: 32px; - // pointer-events: none; - } - } - } - & .recent__table{ - width:100%; - min-width: 125vw; - max-width:100%; - } - } + .file__container { + & > .file__control--panel { + padding: 25px 0px; + } + } + .content__block { + & > .file__container { + & > .file__control--panel { + & > .quick__access { + & > .main__access { + grid-template-columns: repeat(auto-fit, minmax(165px, 165px)); + } + } + & > .folders__panel { + & > .inner__folders { + grid-template-columns: repeat(auto-fit, minmax(165px, 165px)); + } + } + & > .file__view { + & > .recent__table--wrap { + & > .head__recent--files { + // margin-bottom:-80px; + } + } + + & > .recent__table--wrap { + overflow-x: hidden; + padding-top: 32px; + // pointer-events: none; + } + } + } + } + + & .file__control--panel.folder__view { + & > .file__view { + & > .recent__table--wrap { + & > .head__recent--files { + // margin-bottom:-80px; + } + } + & > .recent__table--wrap { + overflow-x: hidden; + padding-top: 32px; + // pointer-events: none; + } + } + } + & .recent__table { + width: 100%; + min-width: 125vw; + max-width: 100%; + } + } } -@media (max-width:480px){ - .content__block { - & .recent__table { - & tr { - & .settings__drop{ - min-width:170px; - & ul{ - & li{ - & a{ - & span{ - margin-right:10px; - } - padding:10px 12px; - font-size:14px; - } - } - } - } - } - } - } - .content__block { - &>.file__container{ - &>.file__control--panel{ - &>.quick__access{ - &>.main__access{ - grid-template-columns: repeat(auto-fit, minmax(40%, 47%)); - } - } - &>.folders__panel{ - &>.inner__folders{ - grid-template-columns: repeat(auto-fit, minmax(40%, 47%)); - } - } - } - } - & .file__control--panel.folder__view{ - padding-top: 15px; - & .file__view{ - & .recent__table--wrap { - & .head__recent--files{ - flex-direction:column; - justify-content:center; - align-items:center; - position: relative; - // z-index:4; - &>.view__recent{ - margin-top:15px; - } - &>.path__files{ - flex-wrap:wrap; - &>a{ - font-size:15px; - line-height:17px; - } - &>.current__folder{ - font-size:15px; - line-height:17px; - white-space: nowrap; - } - } - } - } - - } - } - } +@media (max-width: 480px) { + .content__block { + & .recent__table { + & tr { + & .settings__drop { + min-width: 170px; + & ul { + & li { + & a { + & span { + margin-right: 10px; + } + padding: 10px 12px; + font-size: 14px; + } + } + } + } + } + } + } + .content__block { + & > .file__container { + & > .file__control--panel { + & > .quick__access { + & > .main__access { + grid-template-columns: repeat(auto-fit, minmax(40%, 47%)); + } + } + & > .folders__panel { + & > .inner__folders { + grid-template-columns: repeat(auto-fit, minmax(40%, 47%)); + } + } + } + } + & .file__control--panel.folder__view { + padding-top: 15px; + & .file__view { + & .recent__table--wrap { + & .head__recent--files { + flex-direction: column; + justify-content: center; + align-items: center; + position: relative; + // z-index:4; + & > .view__recent { + margin-top: 15px; + } + & > .path__files { + flex-wrap: wrap; + & > a { + font-size: 15px; + line-height: 17px; + } + & > .current__folder { + font-size: 15px; + line-height: 17px; + white-space: nowrap; + } + } + } + } + } + } + } } -@media (max-width:400px){ - .content__block { - &>.file__container{ - &>.file__control--panel{ - &>.quick__access{ - &>.main__access{ - grid-template-columns: repeat(auto-fit, minmax(40%, 47%)); - grid-column-gap:10px; - & .elem__access{ - &>.access__image{ - min-height: 85px; - max-height:85px; - &>img{ - min-height: 85px; - max-height:85px; - object-fit: cover; - } - } - } - } - } - &>.folders__panel{ - &>.inner__folders{ - grid-template-columns: repeat(auto-fit, minmax(40%, 47%)); - grid-column-gap:10px; - & .elem__access{ - &>.access__image{ - min-height: 85px; - max-height:85px; - &>img{ - min-height: 85px; - max-height:85px; - object-fit: cover; - } - } - } - } - } - } - } - } +@media (max-width: 400px) { + .content__block { + & > .file__container { + & > .file__control--panel { + & > .quick__access { + & > .main__access { + grid-template-columns: repeat(auto-fit, minmax(40%, 47%)); + grid-column-gap: 10px; + & .elem__access { + & > .access__image { + min-height: 85px; + max-height: 85px; + & > img { + min-height: 85px; + max-height: 85px; + object-fit: cover; + } + } + } + } + } + & > .folders__panel { + & > .inner__folders { + grid-template-columns: repeat(auto-fit, minmax(40%, 47%)); + grid-column-gap: 10px; + & .elem__access { + & > .access__image { + min-height: 85px; + max-height: 85px; + & > img { + min-height: 85px; + max-height: 85px; + object-fit: cover; + } + } + } + } + } + } + } + } } .name__row { - width: 100%; + width: 100%; - @media (max-width:767px) { - width: 46%; - } + @media (max-width: 767px) { + width: 46%; + } - @media (max-width: $desktop-breakpoint) { - - width: 40%; - } + @media (max-width: $desktop-breakpoint) { + width: 40%; + } } // .inner__name--row { // @media (max-width: $desktop-breakpoint) { - + // display: flex; // align-items:center; // & p{ @@ -1196,7 +1193,7 @@ // white-space: nowrap; // text-overflow: ellipsis; // display: block; - + // } // } -// } \ No newline at end of file +// }