-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
5,936 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 250 | ||
trim_trailing_whitespace = true | ||
|
||
[*.{js,json}] | ||
indent_size = 2 | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:jsdoc/recommended" | ||
], | ||
"plugins": [ | ||
"prettier", | ||
"jsdoc", | ||
"jest" | ||
], | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"jest/globals": true, | ||
"node": true | ||
}, | ||
"globals": { | ||
"config": true, | ||
"Log": true, | ||
"MM": true, | ||
"Module": true, | ||
"moment": true | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 13, | ||
"ecmaFeatures": { | ||
"globalReturn": true | ||
} | ||
}, | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"endOfLine": "auto" | ||
} | ||
], | ||
"eqeqeq": "error", | ||
"no-prototype-builtins": "off", | ||
"no-unused-vars": "off", | ||
"no-useless-return": "error", | ||
"no-var": "error", | ||
"jsdoc/require-returns": "off", | ||
"jsdoc/require-param-description": "off", | ||
"semi": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,7 @@ credentials.json | |
token.json | ||
node_modules/ | ||
cache/* | ||
!cache/keep.txt | ||
.idea | ||
msal/token.json | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/config | ||
/coverage | ||
.nyc_output | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# MMM-OneDrive Change Log | ||
|
||
**`[1.0.0] - 2023/07/17`** | ||
First version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## Installation | ||
1. Install Module | ||
```sh | ||
git clone https://github.com/hermanho/MMM-OneDrive.git | ||
cd MMM-OneDrive | ||
npm install | ||
``` | ||
|
||
If you doubt errors are caused by different `node.JS` version, you can try to compile it by yourself. | ||
In that case, you need to rebuild some binaries to match with Electron version. | ||
```sh | ||
cd ~/MagicMirror/modules/MMM-OneDrive | ||
npm install --save-dev electron-rebuild | ||
./node_modules/.bin/electron-rebuild # It could takes dozens sec. | ||
``` | ||
|
||
2. If you are using Docker | ||
```sh | ||
cd ~/magic_mirror/modules | ||
git clone https://github.com/hermanho/MMM-OneDrive.git | ||
docker exec -it -w /opt/magic_mirror/modules/MMM-OneDrive magic_mirror npm install | ||
``` | ||
|
||
### Authorise OAuth Token | ||
|
||
1. Clone this repo in your local pc and execute `npm install` | ||
2. At first execution, It will open a browser and will ask you to login google account and to consent your allowance. | ||
3. Authorize it and close the browser | ||
4. Copy the file `msal/token.json` to the folder `MMM-OneDrive` in the remote device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Seongnoh Sean Yi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#ONEDRIVE_PHOTO_INFO { | ||
--top: none; | ||
--left: none; | ||
--bottom: 0; | ||
--right: 0; | ||
} | ||
|
||
@keyframes trans { | ||
from {opacity: 0} | ||
to {opacity: 1} | ||
} | ||
|
||
.region.fullscreen #ONEDRIVE_PHOTO { | ||
position:static; | ||
top:0; | ||
left:0; | ||
width:100vw; | ||
height:100vh; | ||
} | ||
|
||
|
||
#ONEDRIVE_PHOTO { | ||
position:relative; | ||
min-width: 300px; | ||
min-height:300px; | ||
} | ||
|
||
#ONEDRIVE_PHOTO_CURRENT { | ||
background-size:contain; | ||
background-repeat:no-repeat; | ||
background-position:center; | ||
position: absolute; | ||
top:10px; | ||
left:10px; | ||
right:10px; | ||
bottom:10px; | ||
} | ||
|
||
#ONEDRIVE_PHOTO_CURRENT.animated { | ||
animation-name: trans; | ||
animation-duration: 2s; | ||
} | ||
|
||
#ONEDRIVE_PHOTO_BACK { | ||
background-size:cover; | ||
background-repeat:no-repeat; | ||
background-position:center; | ||
position: absolute; | ||
top:0; | ||
left:0; | ||
right:0; | ||
bottom:0; | ||
filter: blur(10px) sepia(80%) brightness(40%); | ||
} | ||
|
||
#ONEDRIVE_PHOTO_INFO { | ||
position:absolute; | ||
top: var(--top); | ||
left: var(--left); | ||
bottom: var(--bottom); | ||
right: var(--right); | ||
margin:10px; | ||
background-color: rgba(0,0,0,0.5); | ||
padding: 10px; | ||
border-radius: 36px; | ||
line-height: 100%; | ||
text-align:left; | ||
} | ||
|
||
#ONEDRIVE_PHOTO_INFO .albumCover { | ||
width:48px; | ||
height:48px; | ||
border-radius:50%; | ||
background-size:cover; | ||
background-repeat:no-repeat; | ||
background-position:center; | ||
float:left; | ||
} | ||
|
||
#ONEDRIVE_PHOTO_INFO .albumTitle { | ||
color:#FDD; | ||
} | ||
|
||
#ONEDRIVE_PHOTO_INFO .photoTime { | ||
color:#DFD; | ||
} | ||
|
||
#ONEDRIVE_PHOTO_INFO .infoText { | ||
float:right; | ||
margin-left: 12px; | ||
padding-right: 12px; | ||
padding-top:6px; | ||
font-size:18px; | ||
line-height:100%; | ||
color:#FFF; | ||
} |
Oops, something went wrong.