├── .DS_Store
├── .editorconfig
├── .env.example
├── .gitattributes
├── .github
└── ISSUE_TEMPLATE
│ └── bug-report.md
├── .gitignore
├── LICENSE
├── Procfile
├── README.md
├── app
├── Console
│ ├── Commands
│ │ ├── .gitignore
│ │ └── OneDrive
│ │ │ ├── Copy.php
│ │ │ ├── CreateFolder.php
│ │ │ ├── Direct.php
│ │ │ ├── Download.php
│ │ │ ├── Find.php
│ │ │ ├── Install.php
│ │ │ ├── ListCommand.php
│ │ │ ├── ListItem.php
│ │ │ ├── Login.php
│ │ │ ├── Logout.php
│ │ │ ├── Move.php
│ │ │ ├── Offline.php
│ │ │ ├── Quota.php
│ │ │ ├── RefreshCache.php
│ │ │ ├── RefreshToken.php
│ │ │ ├── Remove.php
│ │ │ ├── Reset.php
│ │ │ ├── ResetPassword.php
│ │ │ ├── Share.php
│ │ │ ├── UploadFile.php
│ │ │ └── WhereIs.php
│ └── Kernel.php
├── Entities
│ ├── BaseEntity.php
│ └── ClientConfigEntity.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── AdminController.php
│ │ ├── ApiController.php
│ │ ├── Controller.php
│ │ ├── ImageController.php
│ │ ├── IndexController.php
│ │ ├── InstallController.php
│ │ ├── LoginController.php
│ │ ├── ManageController.php
│ │ └── OauthController.php
│ ├── Kernel.php
│ └── Middleware
│ │ ├── Authenticate.php
│ │ ├── CheckForMaintenanceMode.php
│ │ ├── EncryptCookies.php
│ │ ├── HandleEncryptDir.php
│ │ ├── HandleForbidFile.php
│ │ ├── HandleHideDir.php
│ │ ├── HotlinkProtection.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustProxies.php
│ │ ├── VerifyAccessToken.php
│ │ ├── VerifyCsrfToken.php
│ │ ├── VerifyImageHost.php
│ │ ├── VerifyInstallation.php
│ │ └── VerifyThirdToken.php
├── Jobs
│ ├── ProcessUpload.php
│ └── RefreshCache.php
├── Models
│ ├── Account.php
│ ├── Config.php
│ ├── Drive.php
│ ├── OfflineDlFile.php
│ ├── OnedriveAccount.php
│ ├── Setting.php
│ └── User.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── Service
│ ├── AuthCode.php
│ ├── Authorize.php
│ ├── CoreConstants.php
│ ├── GraphRequest.php
│ └── OneDrive.php
├── Traits
│ └── HelperModel.php
└── Utils
│ ├── Aria2.php
│ ├── Extension.php
│ ├── Tool.php
│ └── helpers.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── composer.lock
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── database.php
├── filesystems.php
├── hashing.php
├── log-viewer.php
├── logging.php
├── mail.php
├── olaindex.php
├── queue.php
├── services.php
├── session.php
├── tracy.php
└── view.php
├── database
├── .DS_Store
├── .gitignore
├── database.sample.sqlite
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2019_06_09_213118_create_settings_table.php
│ ├── 2019_06_09_215137_create_users_table.php
│ ├── 2019_06_12_172611_create_jobs_table.php
│ ├── 2019_06_12_172726_create_failed_jobs_table.php
│ ├── 2019_12_16_224455_create_onedrive_accounts_table.php
│ └── 2019_12_24_120156_create_offline_dl_files_table.php
└── seeds
│ ├── DatabaseSeeder.php
│ └── UsersTableSeeder.php
├── docs
├── .nojekyll
├── README.md
├── _coverpage.md
├── _sidebar.md
├── api.md
├── apply.md
├── changelog.md
├── env.md
├── index.html
├── install.md
├── issue.md
├── logo.svg
├── offlineDownload.md
├── other.md
└── question.md
├── package-lock.json
├── phpunit.xml
├── pm2.json
├── public
├── .DS_Store
├── .htaccess
├── css
│ ├── app.css
│ ├── filepond-plugin-image-preview.min.css
│ ├── filepond.min.css
│ ├── mdui.css
│ └── mod.css
├── img
│ ├── app.png
│ ├── code.png
│ ├── doc.png
│ ├── exe.png
│ ├── file.png
│ ├── folder.png
│ ├── image.png
│ ├── loading.gif
│ ├── mp4.png
│ ├── music.png
│ ├── pdf.png
│ ├── return.png
│ ├── text.png
│ ├── video.png
│ └── zip.png
├── index.php
├── js
│ ├── app.js
│ ├── filepond-plugin-file-validate-size.min.js
│ ├── filepond-plugin-file-validate-type.min.js
│ ├── filepond-plugin-image-preview.min.js
│ └── filepond.min.js
├── robots.txt
├── svg
│ ├── 403.svg
│ ├── 404.svg
│ ├── 500.svg
│ └── 503.svg
├── vendor
│ └── cacert.pem
└── web.config
├── resources
├── lang
│ └── vendor
│ │ └── log-viewer
│ │ ├── ar
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── bg
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── de
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── en
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── es
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── et
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── fa
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── fr
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── hu
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── hy
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── id
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── it
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── ja
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── ko
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── nl
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── pl
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── pt-BR
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── ro
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── ru
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── sv
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── th
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── tr
│ │ ├── general.php
│ │ └── levels.php
│ │ ├── zh-TW
│ │ ├── general.php
│ │ └── levels.php
│ │ └── zh
│ │ ├── general.php
│ │ └── levels.php
└── views
│ ├── default
│ ├── about.blade.php
│ ├── admin
│ │ ├── add.blade.php
│ │ ├── basic.blade.php
│ │ ├── bind.blade.php
│ │ ├── edit.blade.php
│ │ ├── file.blade.php
│ │ ├── login.blade.php
│ │ ├── newdrive.blade.php
│ │ ├── offlineDownload.blade.php
│ │ ├── other.blade.php
│ │ ├── profile.blade.php
│ │ ├── show.blade.php
│ │ └── usage.blade.php
│ ├── breadcrumb.blade.php
│ ├── image.blade.php
│ ├── install
│ │ ├── bind.blade.php
│ │ └── init.blade.php
│ ├── layouts
│ │ ├── admin.blade.php
│ │ ├── common.blade.php
│ │ └── main.blade.php
│ ├── message.blade.php
│ ├── one.blade.php
│ ├── page.blade.php
│ ├── password.blade.php
│ ├── search.blade.php
│ └── show
│ │ ├── audio.blade.php
│ │ ├── code.blade.php
│ │ ├── dash.blade.php
│ │ ├── image.blade.php
│ │ └── video.blade.php
│ ├── mdui
│ ├── about.blade.php
│ ├── admin
│ │ ├── add.blade.php
│ │ ├── basic.blade.php
│ │ ├── bind.blade.php
│ │ ├── edit.blade.php
│ │ ├── file.blade.php
│ │ ├── login.blade.php
│ │ ├── other.blade.php
│ │ ├── profile.blade.php
│ │ └── show.blade.php
│ ├── breadcrumb.blade.php
│ ├── image.blade.php
│ ├── install
│ │ ├── bind.blade.php
│ │ └── init.blade.php
│ ├── layouts
│ │ ├── admin.blade.php
│ │ └── main.blade.php
│ ├── message.blade.php
│ ├── one.blade.php
│ ├── page.blade.php
│ ├── password.blade.php
│ ├── search.blade.php
│ └── show
│ │ ├── audio.blade.php
│ │ ├── code.blade.php
│ │ ├── dash.blade.php
│ │ ├── image.blade.php
│ │ └── video.blade.php
│ └── vendor
│ └── log-viewer
│ ├── bootstrap-3
│ ├── _master.blade.php
│ ├── dashboard.blade.php
│ ├── logs.blade.php
│ └── show.blade.php
│ └── bootstrap-4
│ ├── _master.blade.php
│ ├── dashboard.blade.php
│ ├── logs.blade.php
│ └── show.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── server.php
├── storage
├── app
│ ├── .gitignore
│ ├── example.config.json
│ └── public
│ │ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
├── logs
│ └── .gitignore
└── tmp
│ └── .gitignore
└── tests
├── CreatesApplication.php
├── Feature
└── ExampleTest.php
├── TestCase.php
└── Unit
└── ExampleTest.php
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/.DS_Store
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | insert_final_newline = true
7 | indent_style = space
8 | indent_size = 4
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.yml]
15 | indent_size = 2
16 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=OLAINDEX
2 | APP_ENV=local
3 | APP_KEY=
4 | APP_DEBUG=false
5 | APP_URL=http://localhost:8000
6 |
7 | LOG_CHANNEL=daily
8 |
9 | #sqlite/mysql
10 | DB_CONNECTION=sqlite
11 | #DB_HOST=127.0.0.1
12 | #DB_PORT=3306
13 | #DB_DATABASE=homestead
14 | #DB_USERNAME=homestead
15 | #DB_PASSWORD=secret
16 |
17 | # 缓存配置
18 | # file/memcached/redis
19 | CACHE_DRIVER=file
20 | QUEUE_CONNECTION=sync
21 | SESSION_DRIVER=file
22 | SESSION_LIFETIME=120
23 |
24 | # redis配置
25 | REDIS_HOST=127.0.0.1
26 | REDIS_PASSWORD=null
27 | REDIS_PORT=6379
28 |
29 | # 主题
30 | # default/mdui
31 | THEME=default
32 |
33 | # php 路径
34 | PHP_PATH=
35 |
36 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug Report
3 | about: 提供问题,帮助改进
4 |
5 | ---
6 |
7 | ### 1. 该问题的重现步骤是什么?
8 |
9 | ### 2. 你期待的结果是什么?实际看到的又是什么?
10 |
11 | ### 3. 问题出现的环境
12 |
13 | - 操作系统版本:
14 | - Apache/NGINX 版本:
15 | - PHP 版本:
16 | - OLAINDEX 版本:
17 | - 浏览器版本:
18 |
19 | [//]: # (如有图片请附上截图)
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /public/favicon.ico
6 | /vendor
7 | # /.idea
8 | /.vscode
9 | # /.vagrant
10 | # Homestead.json
11 | # Homestead.yaml
12 | # npm-debug.log
13 | # yarn-error.log
14 | .env
15 | # .phpunit.result.cache
16 | # /frontend
17 | # .php_cs.cache
18 | # _ide_helper.php
19 | # .phpstorm.meta.php
20 | debugfiles
21 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 WangNingkai
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: vendor/bin/heroku-php-apache2 public/
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OLAINDEX Magic
2 |
3 | ✨ Another OneDrive Directory Index.
4 |
5 |

6 |
7 | > 👋 本项目受 Oneindex 启发,借鉴其部分功能,在这里感谢。 项目持续开发,会加入更多功能,欢迎大家提交 issue.
8 |
9 | ## 简介
10 | 魔改自:[https://github.com/WangNingkai/OLAINDEX](https://github.com/WangNingkai/OLAINDEX)
11 | (只不过是在大佬的作品上狗续貂尾罢了。
12 |
13 | 演示站点:[https://magic.yukino.co/](https://magic.yukino.co/)
14 | ## 安装方法
15 | 原教程:[https://github.com/YukiCoco/OLAINDEX-Magic/blob/master/docs/install.md](https://github.com/YukiCoco/OLAINDEX-Magic/blob/master/docs/install.md)
16 |
17 | **此项目长期维护,请直接拉取 Master 分支部署,欢迎提交 issue,欢迎 star**
18 |
19 |
20 | ## 魔改内容
21 |
22 | + **多 Onedrive 账户支持:**
23 | + 可同时挂载多个 Onedrive 网盘
24 | + 图床可选择上传到不同的盘区
25 | + 多网盘命令支持
26 | + 同时支持国际版/世纪互联
27 | + **离线下载([已废除](https://github.com/YukiCoco/OLAINDEX-Magic/blob/master/docs/offlineDownload.md)):**
28 | + 对接 Aria2,支持 HTTP/FTP/SFTP/磁力链接/种子
29 | + 选择下载到不同盘区的不同文件夹
30 | + 配置方式:[https://github.com/YukiCoco/OLAINDEX-Magic/blob/master/docs/offlineDownload.md](https://github.com/YukiCoco/OLAINDEX-Magic/blob/master/docs/offlineDownload.md)
31 | + 一些小修复:
32 | + 一键获取所有下载链接(配合 [AriaNg](https://github.com/mayswind/AriaNg) 可下载所有文件)
33 | + 图床:添加复制链接、修复上传失败问题
34 | + Ajax 删除文件
35 | + ......
36 |
37 | ## 常见问题
38 | [https://github.com/YukiCoco/OLAINDEX-Magic/blob/master/docs/question.md](https://github.com/YukiCoco/OLAINDEX-Magic/blob/master/docs/question.md)
39 |
--------------------------------------------------------------------------------
/app/Console/Commands/.gitignore:
--------------------------------------------------------------------------------
1 | Test.php
2 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/CreateFolder.php:
--------------------------------------------------------------------------------
1 | argument('name');
43 | $remote = $this->argument('remote');
44 | $clientId = $this->argument('clientId');
45 | refresh_token(getOnedriveAccount($clientId));
46 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->mkdirByPath($name, $remote);
47 | $this->call('cache:clear');
48 | $response['errno'] === 0 ? $this->info('Folder Created!') : $this->warn("Failed!\n{$response['msg']} ");
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/Direct.php:
--------------------------------------------------------------------------------
1 | info('Please waiting...');
40 | $remote = $this->argument('remote');
41 | $clientId = $this->argument('clientId');
42 | refresh_token(getOnedriveAccount($clientId));
43 | $_remote = OneDrive::getInstance(getOnedriveAccount($clientId))->pathToItemId($remote);
44 | $remote_id = $_remote['errno'] === 0 ? Arr::get($_remote, 'data.id') : exit('Remote Path Abnormal');
45 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->createShareLink($remote_id);
46 | $response['errno'] === 0
47 | ? $this->info("Success! Direct Link:\n{$response['data']['redirect']}")
48 | : $this->warn("Failed!\n{$response['msg']} ");
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/Download.php:
--------------------------------------------------------------------------------
1 | argument('remote');
43 | $id = $this->option('id');
44 | $clientId = $this->argument('clientId');
45 | refresh_token(getOnedriveAccount($clientId));
46 | if ($id) {
47 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->getItem($id);
48 | } else {
49 | if (empty($remote)) {
50 | exit('Parameters Missing!');
51 | }
52 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->getItemByPath($remote);
53 | }
54 | if ($response['errno'] === 0) {
55 | $download = $response['data']['@microsoft.graph.downloadUrl'] ??
56 | exit('404 NOT FOUND');
57 | $this->info("Download Link:\n{$download}");
58 | } else {
59 | $this->warn("Failed!\n{$response['msg']} ");
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/ListCommand.php:
--------------------------------------------------------------------------------
1 | info(CoreConstants::LOGO);
42 | $output = <<<'EOF'
43 | OLAINDEX Console Tool
44 |
45 | Usage:
46 | command [options] [arguments]
47 |
48 | Options:
49 | -h, --help Display this help message
50 | -q, --quiet Do not output any message
51 | --ansi Force ANSI output
52 | --no-ansi Disable ANSI output
53 | -n, --no-interaction Do not ask any interactive question
54 | -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
55 | Available commands:
56 |
57 | od:cache Cache Dir
58 | od:command List Command
59 | od:cp Copy Item
60 | od:direct Create Direct Share Link
61 | od:download Download File
62 | od:find Find Items
63 | od:info OneDriveGraph Info
64 | od:install Install App
65 | od:login Account Login
66 | od:logout Account Logout
67 | od:ls List Items
68 | od:mkdir Create New Folder
69 | od:mv Move Item
70 | od:offline Remote download links to your drive
71 | od:password Reset Password
72 | od:refresh Refresh Token
73 | od:reset Reset App
74 | od:rm Delete Item
75 | od:share ShareLink For File
76 | od:upload UploadFile File
77 | od:whereis Find The Item's Remote Path
78 |
79 | Magic版本:请使用od:info查看账号id,然后在命令后面加上id
80 |
81 | EOF;
82 |
83 | $this->info($output);
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/Logout.php:
--------------------------------------------------------------------------------
1 | option('force')) {
42 | return $this->logout();
43 | }
44 | if ($this->confirm('Confirm Logout?')) {
45 | return $this->logout();
46 | }
47 | }
48 |
49 | /**
50 | * Execute Reset Command
51 | */
52 | public function logout()
53 | {
54 | $data = [
55 | 'access_token' => '',
56 | 'refresh_token' => '',
57 | 'access_token_expires' => 0,
58 | 'root' => '/',
59 | 'image_hosting' => 0,
60 | 'image_hosting_path' => '',
61 | 'account_email' => '',
62 | 'account_state' => '暂时无法使用',
63 | 'account_extend' => ''
64 | ];
65 | $saved = Setting::batchUpdate($data);
66 | if ($saved) {
67 | $this->call('cache:clear');
68 | $this->warn('Logout Success!');
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/Move.php:
--------------------------------------------------------------------------------
1 | argument('clientId');
45 | $this->info('开始移动...');
46 | $this->info('Please waiting...');
47 | $origin = $this->argument('origin');
48 | $_origin = OneDrive::getInstance(getOnedriveAccount($clientId))->pathToItemId($origin);
49 | $origin_id = $_origin['errno'] === 0 ? Arr::get($_origin, 'data.id')
50 | : exit('Origin Path Abnormal');
51 | $target = $this->argument('target');
52 | $_target = OneDrive::getInstance(getOnedriveAccount($clientId))->pathToItemId($target);
53 | $target_id = $_origin['errno'] === 0 ? Arr::get($_target, 'data.id')
54 | : exit('Target Path Abnormal');
55 | $rename = $this->option('rename') ?: '';
56 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->move($origin_id, $target_id, $rename);
57 | $response['errno'] === 0 ? $this->info('Move Success!')
58 | : $this->warn("Failed!\n{$response['msg']} ");
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/Offline.php:
--------------------------------------------------------------------------------
1 | call('refresh:token');
44 | $remote = $this->argument('remote');
45 | $url = $this->argument('url');
46 | $clientId = $this->argument('clientId');
47 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->uploadUrl($remote, $url);
48 | if ($response['errno'] === 200) {
49 | $redirect = Arr::get($response, 'data.redirect');
50 | $this->info('progress link: '.$redirect);
51 | $done = false;
52 | while (!$done) {
53 | $result = OneDrive::getInstance(getOnedriveAccount($clientId))->request('get', $redirect, false);
54 | $status = Arr::get($result, 'data.status');
55 | if ($status === 'failed') {
56 | $this->error(Arr::get($result, 'data.error.message'));
57 | $done = true;
58 | } elseif ($status === 'inProgress') {
59 | $this->info(
60 | 'Progress: '
61 | .Arr::get($result, 'data.percentageComplete')
62 | );
63 | sleep(3);
64 | $done = false;
65 | } elseif ($status === 'completed') {
66 | $this->info(
67 | 'Progress: '
68 | .Arr::get($result, 'data.percentageComplete')
69 | );
70 | $done = true;
71 | } elseif ($status === 'notStarted') {
72 | $this->error('Status:'.$status);
73 | $done = false;
74 | } else {
75 | $this->error('Status:'.$status);
76 | $done = true;
77 | }
78 | }
79 | } else {
80 | $this->warn("Failed!\n{$response['msg']} ");
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/Quota.php:
--------------------------------------------------------------------------------
1 | info(CoreConstants::LOGO);
41 | foreach (getOnedriveAccounts() as $key => $account) {
42 | $this->info('ID:' . $account->id . ' 账号:' . $account->account_email);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/RefreshCache.php:
--------------------------------------------------------------------------------
1 | argument('path');
46 |
47 | $this->getRecursive(Tool::getOriginPath($path));
48 | }
49 |
50 | /**
51 | * @param $path
52 | *
53 | * @return mixed
54 | * @throws \ErrorException
55 | */
56 | public function getChildren($path)
57 | {
58 | $clientId = $this->argument('clientId');
59 | refresh_token(getOnedriveAccount($clientId));
60 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->getItemListByPath(
61 | $path,
62 | '?select=id,eTag,name,size,lastModifiedDateTime,file,image,folder,'
63 | . 'parentReference,@microsoft.graph.downloadUrl&expand=thumbnails'
64 | );
65 | return $response['errno'] === 0 ? $response['data'] : null;
66 | }
67 |
68 | /**
69 | * @param $path
70 | *
71 | * @throws \ErrorException
72 | */
73 | public function getRecursive($path)
74 | {
75 | set_time_limit(0);
76 | $this->info($path);
77 | $data = $this->getChildren($path);
78 | if (is_array($data)) {
79 | FacadesCache::put(
80 | 'one:list:' . $path,
81 | $data,
82 | setting('expires')
83 | );
84 | } else {
85 | exit('Cache Error!');
86 | }
87 | foreach ((array)$data as $item) {
88 | if (Arr::has($item, 'folder')) {
89 | $this->getRecursive($path . $item['name'] . '/');
90 | }
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/RefreshToken.php:
--------------------------------------------------------------------------------
1 | argument('clientId');
49 | refresh_token(getOnedriveAccount($clientId));
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/Remove.php:
--------------------------------------------------------------------------------
1 | info('请稍等...');
42 | $clientId = $this->argument('clientId');
43 | refresh_token(getOnedriveAccount($clientId));
44 | if ($this->option('force')) {
45 | return $this->delete();
46 | }
47 | if ($this->confirm('You can not restore,continue?')) {
48 | return $this->delete();
49 | }
50 | }
51 |
52 | /**
53 | * @throws \ErrorException
54 | */
55 | public function delete()
56 | {
57 | $clientId = $this->argument('clientId');
58 | if ($this->option('id')) {
59 | $id = $this->option('id');
60 | } else {
61 | $remote = $this->argument('remote');
62 | if (!$remote) {
63 | $this->warn('Parameter Missing!');
64 | exit;
65 | }
66 | $id_response
67 | = OneDrive::getInstance(getOnedriveAccount($clientId))->pathToItemId($remote);
68 | if ($id_response['errno'] === 0) {
69 | $id = $id_response['data']['id'];
70 | } else {
71 | $this->warn('Path Abnormal!');
72 | exit;
73 | }
74 | }
75 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->delete($id);
76 | $this->call('cache:clear');
77 | $response['errno'] === 0 ? $this->info('Deleted')
78 | : $this->warn("Failed!\n{$response['msg']} ");
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/Reset.php:
--------------------------------------------------------------------------------
1 | option('force')) {
41 | $this->reset();
42 | }
43 | if ($this->confirm('Reset will erase all data, continue?')) {
44 | $this->reset();
45 | }
46 | }
47 |
48 | /**
49 | * Execute the console command.
50 | */
51 | public function reset()
52 | {
53 | $this->call('cache:clear');
54 | $this->callSilent('migrate:reset');
55 | $this->info('Reset Completed!');
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/ResetPassword.php:
--------------------------------------------------------------------------------
1 | ask('Please input your username');
44 | $password = $this->ask('Please input your new password (default: ' . $defaultPassword . ')');
45 | $password = $password ?: $defaultPassword;
46 | $this->info('username: ' . $name);
47 | $this->info('password: ' . $password);
48 | if ($this->confirm('Confirm reset password?')) {
49 | User::query()->update([
50 | 'name' => $name,
51 | 'password' => bcrypt($password),
52 | ]);
53 | $this->info("New Password:[ {$password} ]");
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/Share.php:
--------------------------------------------------------------------------------
1 | argument('clientId');
41 | refresh_token(getOnedriveAccount($clientId));
42 | $this->info('Please waiting...');
43 | $remote = $this->argument('remote');
44 | $_remote
45 | = OneDrive::getInstance(getOnedriveAccount($clientId))->pathToItemId($remote);
46 | $remote_id = $_remote['errno'] === 0 ? Arr::get($_remote, 'data.id')
47 | : exit('Remote Path Abnormal');
48 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->createShareLink($remote_id);
49 | if ($response['errno'] === 0) {
50 | $direct = str_replace(
51 | '15/download.aspx',
52 | '15/guestaccess.aspx',
53 | $response['data']['redirect']
54 | );
55 | $this->info("Success! Share Link:\n{$direct}");
56 | } else {
57 | $this->warn("Failed!\n{$response['msg']}");
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/app/Console/Commands/OneDrive/WhereIs.php:
--------------------------------------------------------------------------------
1 | argument('id');
40 | $clientId = $this->argument('clientId');
41 | refresh_token(getOnedriveAccount($clientId));
42 | $response = OneDrive::getInstance(getOnedriveAccount($clientId))->itemIdToPath($id);
43 | if ($response['errno'] === 0) {
44 | $this->info(Arr::get($response, 'data.path'));
45 | } else {
46 | $this->error($response['msg']);
47 | exit;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
29 | // ->hourly();
30 | //$schedule->command('od:refresh')->everyThirtyMinutes();
31 | //$schedule->command('od:cache')->everyFifteenMinutes();
32 | }
33 |
34 | /**
35 | * Register the commands for the application.
36 | *
37 | * @return void
38 | */
39 | protected function commands()
40 | {
41 | $this->load(__DIR__.'/Commands');
42 |
43 | require base_path('routes/console.php');
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/Entities/BaseEntity.php:
--------------------------------------------------------------------------------
1 | $v) {
12 | if (property_exists($this, $k)) {
13 | $this->$k = $v;
14 | }
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/Entities/ClientConfigEntity.php:
--------------------------------------------------------------------------------
1 | middleware('guest')->except('logout');
37 | }
38 |
39 | /**
40 | * Get the login username to be used by the controller.
41 | *
42 | * @return string
43 | */
44 | public function username()
45 | {
46 | return 'name';
47 | }
48 |
49 | /**
50 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
51 | */
52 | public function showLoginForm()
53 | {
54 | return view(config('olaindex.theme') . 'admin.login');
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | route()->getName();
24 | $requestPath = $request->route()->parameter('query', '/');
25 | $encryptDir = Tool::handleEncryptItem(setting('encrypt_path'));
26 |
27 | if (blank($encryptDir)) {
28 | return $next($request);
29 | }
30 | foreach ($encryptDir as $path => $password) {
31 | $encryptPath = explode('>', $path)[1];
32 | if (Str::startsWith(Tool::getAbsolutePath($requestPath), $encryptPath)) {
33 | $encryptKey = 'password:' . $encryptPath;
34 | if (Session::has($encryptKey)) {
35 | $data = Session::get($encryptKey);
36 | if (time() > $data['expires'] || strcmp($password, decrypt($data['password'])) !== 0) {
37 | Session::forget($encryptKey);
38 | Tool::showMessage('密码已过期', false);
39 |
40 | return response()->view(
41 | config('olaindex.theme') . 'password',
42 | compact('route', 'requestPath', 'encryptKey')
43 | );
44 | }
45 | return $next($request);
46 | }
47 | return response()->view(
48 | config('olaindex.theme') . 'password',
49 | compact('route', 'requestPath', 'encryptKey')
50 | );
51 | }
52 | }
53 |
54 | return $next($request);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/app/Http/Middleware/HandleForbidFile.php:
--------------------------------------------------------------------------------
1 | route()->parameter('query');
21 | $path = trim(Tool::getAbsolutePath($queryPath), '/');
22 | $origin_path = rawurldecode($path);
23 | $path_array = $origin_path ? explode('/', $origin_path) : [];
24 | $fileName = array_pop($path_array);
25 | $illegalFile = ['README.md', 'HEAD.md', '.password', '.deny'];
26 | $pattern = '/^README\.md|HEAD\.md|\.password|\.deny/';
27 | if (in_array($fileName, $illegalFile, false) || preg_match($pattern, $fileName, $arr) > 0) {
28 | Tool::showMessage('非法请求', false);
29 |
30 | return response()->view(config('olaindex.theme') . 'message');
31 | }
32 |
33 | return $next($request);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/Http/Middleware/HandleHideDir.php:
--------------------------------------------------------------------------------
1 | route()->parameter('query', '/');
21 |
22 | $hideDir = Tool::handleHideItem(setting('hide_path'));
23 |
24 | $requestPath = trim($requestPath, '/');
25 | if ($requestPath === '' || blank($hideDir)) {
26 | return $next($request);
27 | }
28 | if (in_array($requestPath, $hideDir, false) && !auth()->check()) {
29 | Tool::showMessage('非法请求', false);
30 | return response()->view(config('olaindex.theme') . 'message');
31 | }
32 | return $next($request);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Http/Middleware/HotlinkProtection.php:
--------------------------------------------------------------------------------
1 | getHttpHost();
23 |
24 | // 简单处理防盗链,建议加入更加其他防盗链措施
25 | $whiteList = explode(' ', $hotlink_protection);
26 | $whiteList[] = $self; // 添加应用本身为白名单
27 | if (!$request->server('HTTP_REFERER')) {
28 | abort(403);
29 | }
30 | //判断 $_SERVER['HTTP_REFERER'] 是不是处于白名单
31 | if (Str::contains($request->server('HTTP_REFERER'), $whiteList)) {
32 | return $next($request);
33 | }
34 | abort(403);
35 | }
36 |
37 | return $next($request);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Http/Middleware/RedirectIfAuthenticated.php:
--------------------------------------------------------------------------------
1 | check()) {
21 | return redirect('/home');
22 | }
23 |
24 | return $next($request);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | route('bind');
33 | }
34 | $onedriveAccounts = OnedriveAccount::all();
35 | foreach ($onedriveAccounts as $account) {
36 | refresh_token($account->toArray());
37 | }
38 | return $next($request);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 | route('home');
23 | }
24 |
25 | return $next($request);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyInstallation.php:
--------------------------------------------------------------------------------
1 | route('_1stInstall');
23 | }
24 |
25 | return $next($request);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyThirdToken.php:
--------------------------------------------------------------------------------
1 | header($this->header);
30 |
31 | if ($authHeader !== null) {
32 | if ($this->pattern !== null) {
33 | if (preg_match($this->pattern, $authHeader, $matches)) {
34 | $authHeader = $matches[1];
35 | } else {
36 | abort(401);
37 | }
38 | }
39 | if (strcmp(setting('third_access_token'), $authHeader) === 0) {
40 | return $next($request);
41 | }
42 |
43 | }
44 | abort(401);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/Jobs/RefreshCache.php:
--------------------------------------------------------------------------------
1 | > {$log}"
29 | : "/usr/bin/nohup {$phpPath} {$artisan} od:cache >> {$log} 2>&1 &";
30 | $process = new Process($command);
31 | $process->run(static function ($type, $buffer) {
32 | if (Process::ERR === $type) {
33 | echo 'ERR > ' . $buffer;
34 | } else {
35 | echo 'OUT > ' . $buffer;
36 | }
37 | });
38 | }
39 |
40 | /**
41 | * Execute the job.
42 | *
43 | * @return void
44 | */
45 | public function handle()
46 | {
47 | //
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/Models/Account.php:
--------------------------------------------------------------------------------
1 | 'int',
37 | ];
38 | public $timestamps = false;
39 |
40 | /**
41 | * 如果 value 是 json 则转成数组
42 | *
43 | * @param $value
44 | * @return mixed
45 | */
46 | public function getValueAttribute($value)
47 | {
48 | return is_json($value) ? json_decode($value, true) : $value;
49 | }
50 |
51 | /**
52 | * 如果 value 是数组 则转成 json
53 | *
54 | * @param $value
55 | */
56 | public function setValueAttribute($value): void
57 | {
58 | $this->attributes['value'] = is_array($value) ? json_encode($value) : $value;
59 | }
60 |
61 | public static function batchUpdate($data)
62 | {
63 | $editData = [];
64 | foreach ($data as $k => $v) {
65 | $editData[] = [
66 | 'name' => $k,
67 | 'value' => is_array($v) ? json_encode($v) : $v
68 | ];
69 | }
70 | // 查询数据库中是否有配置
71 | $saved = self::query()->pluck('name')->all();
72 |
73 | $newData = collect($editData)->filter(static function ($value) use ($saved) {
74 | return !in_array($value['name'], $saved, false);
75 | })->toArray();
76 | $editData = collect($editData)->reject(static function ($value) use ($saved) {
77 | return !in_array($value['name'], $saved, false);
78 | })->toArray();
79 | // 存在新数据先插入
80 | if ($newData) {
81 | self::query()->insert($newData);
82 | }
83 |
84 | $model = new self;
85 | $model->updateBatch($editData);
86 |
87 | Cache::forget('setting');
88 |
89 | return $data;
90 | }
91 |
92 | }
93 |
--------------------------------------------------------------------------------
/app/Models/User.php:
--------------------------------------------------------------------------------
1 | app->environment() !== 'production') {
29 | $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Providers/AuthServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | *
22 | * @return void
23 | */
24 | public function boot()
25 | {
26 | $this->registerPolicies();
27 |
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
19 | SendEmailVerificationNotification::class,
20 | ],
21 | ];
22 |
23 | /**
24 | * Register any events for your application.
25 | *
26 | * @return void
27 | */
28 | public function boot()
29 | {
30 | parent::boot();
31 |
32 | //
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapApiRoutes();
39 |
40 | $this->mapWebRoutes();
41 |
42 | //
43 | }
44 |
45 | /**
46 | * Define the "web" routes for the application.
47 | *
48 | * These routes all receive session state, CSRF protection, etc.
49 | *
50 | * @return void
51 | */
52 | protected function mapWebRoutes()
53 | {
54 | Route::middleware('web')
55 | ->namespace($this->namespace)
56 | ->group(base_path('routes/web.php'));
57 | }
58 |
59 | /**
60 | * Define the "api" routes for the application.
61 | *
62 | * These routes are typically stateless.
63 | *
64 | * @return void
65 | */
66 | protected function mapApiRoutes()
67 | {
68 | Route::prefix('api')
69 | ->middleware('api')
70 | ->namespace($this->namespace)
71 | ->group(base_path('routes/api.php'));
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
34 |
35 | $status = $kernel->handle(
36 | $input = new Symfony\Component\Console\Input\ArgvInput,
37 | new Symfony\Component\Console\Output\ConsoleOutput
38 | );
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Shutdown The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once Artisan has finished running, we will fire off the shutdown events
46 | | so that any final work may be done by the application before we shut
47 | | down the process. This is the last thing to happen to the request.
48 | |
49 | */
50 |
51 | $kernel->terminate($input, $status);
52 |
53 | exit($status);
54 |
--------------------------------------------------------------------------------
/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'encrypted' => true,
41 | ],
42 | ],
43 |
44 | 'redis' => [
45 | 'driver' => 'redis',
46 | 'connection' => 'default',
47 | ],
48 |
49 | 'log' => [
50 | 'driver' => 'log',
51 | ],
52 |
53 | 'null' => [
54 | 'driver' => 'null',
55 | ],
56 |
57 | ],
58 |
59 | ];
60 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DRIVER', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'url' => env('APP_URL').'/storage',
55 | 'visibility' => 'public',
56 | ],
57 |
58 | 's3' => [
59 | 'driver' => 's3',
60 | 'key' => env('AWS_ACCESS_KEY_ID'),
61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
62 | 'region' => env('AWS_DEFAULT_REGION'),
63 | 'bucket' => env('AWS_BUCKET'),
64 | 'url' => env('AWS_URL'),
65 | ],
66 |
67 | ],
68 |
69 | ];
70 |
--------------------------------------------------------------------------------
/config/hashing.php:
--------------------------------------------------------------------------------
1 | 'bcrypt',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Bcrypt Options
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may specify the configuration options that should be used when
26 | | passwords are hashed using the Bcrypt algorithm. This will allow you
27 | | to control the amount of time it takes to hash the given password.
28 | |
29 | */
30 |
31 | 'bcrypt' => [
32 | 'rounds' => env('BCRYPT_ROUNDS', 10),
33 | ],
34 |
35 | /*
36 | |--------------------------------------------------------------------------
37 | | Argon Options
38 | |--------------------------------------------------------------------------
39 | |
40 | | Here you may specify the configuration options that should be used when
41 | | passwords are hashed using the Argon algorithm. These will allow you
42 | | to control the amount of time it takes to hash the given password.
43 | |
44 | */
45 |
46 | 'argon' => [
47 | 'memory' => 1024,
48 | 'threads' => 2,
49 | 'time' => 2,
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/config/logging.php:
--------------------------------------------------------------------------------
1 | env('LOG_CHANNEL', 'daily'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Log Channels
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may configure the log channels for your application. Out of
26 | | the box, Laravel uses the Monolog PHP logging library. This gives
27 | | you a variety of powerful log handlers / formatters to utilize.
28 | |
29 | | Available Drivers: "single", "daily", "slack", "syslog",
30 | | "errorlog", "monolog",
31 | | "custom", "stack"
32 | |
33 | */
34 |
35 | 'channels' => [
36 | 'stack' => [
37 | 'driver' => 'stack',
38 | 'channels' => ['single'],
39 | ],
40 |
41 | 'single' => [
42 | 'driver' => 'single',
43 | 'path' => storage_path('logs/laravel.log'),
44 | 'level' => 'debug',
45 | ],
46 |
47 | 'daily' => [
48 | 'driver' => 'daily',
49 | 'path' => storage_path('logs/laravel.log'),
50 | 'level' => 'debug',
51 | 'days' => 7,
52 | ],
53 |
54 | 'slack' => [
55 | 'driver' => 'slack',
56 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
57 | 'username' => 'Laravel Log',
58 | 'emoji' => ':boom:',
59 | 'level' => 'critical',
60 | ],
61 |
62 | 'stderr' => [
63 | 'driver' => 'monolog',
64 | 'handler' => StreamHandler::class,
65 | 'with' => [
66 | 'stream' => 'php://stderr',
67 | ],
68 | ],
69 |
70 | 'syslog' => [
71 | 'driver' => 'syslog',
72 | 'level' => 'debug',
73 | ],
74 |
75 | 'errorlog' => [
76 | 'driver' => 'errorlog',
77 | 'level' => 'debug',
78 | ],
79 | ],
80 |
81 | ];
82 |
--------------------------------------------------------------------------------
/config/olaindex.php:
--------------------------------------------------------------------------------
1 | env('THEME', 'default').'.',
5 | 'php_path' => env('PHP_PATH', '/usr/bin/php'),
6 | ];
7 |
--------------------------------------------------------------------------------
/config/queue.php:
--------------------------------------------------------------------------------
1 | env('QUEUE_CONNECTION', 'sync'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Queue Connections
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure the connection information for each server that
24 | | is used by your application. A default configuration has been added
25 | | for each back-end shipped with Laravel. You are free to add more.
26 | |
27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'sync' => [
34 | 'driver' => 'sync',
35 | ],
36 |
37 | 'database' => [
38 | 'driver' => 'database',
39 | 'table' => 'jobs',
40 | 'queue' => 'default',
41 | 'retry_after' => 90,
42 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'retry_after' => 90,
49 | ],
50 |
51 | 'sqs' => [
52 | 'driver' => 'sqs',
53 | 'key' => env('SQS_KEY', 'your-public-key'),
54 | 'secret' => env('SQS_SECRET', 'your-secret-key'),
55 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
56 | 'queue' => env('SQS_QUEUE', 'your-queue-name'),
57 | 'region' => env('SQS_REGION', 'us-east-1'),
58 | ],
59 |
60 | 'redis' => [
61 | 'driver' => 'redis',
62 | 'connection' => 'default',
63 | 'queue' => 'default',
64 | 'retry_after' => 90,
65 | 'block_for' => null,
66 | ],
67 |
68 | ],
69 |
70 | /*
71 | |--------------------------------------------------------------------------
72 | | Failed Queue Jobs
73 | |--------------------------------------------------------------------------
74 | |
75 | | These options configure the behavior of failed queue job logging so you
76 | | can control which database and table are used to store the jobs that
77 | | have failed. You may change them to any database / table you wish.
78 | |
79 | */
80 |
81 | 'failed' => [
82 | 'database' => env('DB_CONNECTION', 'mysql'),
83 | 'table' => 'failed_jobs',
84 | ],
85 |
86 | ];
87 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | ],
21 |
22 | 'ses' => [
23 | 'key' => env('SES_KEY'),
24 | 'secret' => env('SES_SECRET'),
25 | 'region' => env('SES_REGION', 'us-east-1'),
26 | ],
27 |
28 | 'sparkpost' => [
29 | 'secret' => env('SPARKPOST_SECRET'),
30 | ],
31 |
32 | 'stripe' => [
33 | 'model' => App\User::class,
34 | 'key' => env('STRIPE_KEY'),
35 | 'secret' => env('STRIPE_SECRET'),
36 | ],
37 |
38 | ];
39 |
--------------------------------------------------------------------------------
/config/tracy.php:
--------------------------------------------------------------------------------
1 | env('APP_DEBUG') === true,
4 | 'showBar' => env('APP_ENV') !== 'production',
5 | 'showException' => true,
6 | 'route' => [
7 | 'prefix' => 'tracy',
8 | 'as' => 'tracy.',
9 | ],
10 | 'accepts' => [
11 | 'text/html',
12 | ],
13 | 'appendTo' => 'body',
14 | 'editor' => 'subl://open?url=file://%file&line=%line',
15 | 'maxDepth' => 4,
16 | 'maxLength' => 1000,
17 | 'scream' => true,
18 | 'showLocation' => true,
19 | 'strictMode' => true,
20 | 'editorMapping' => [],
21 | 'panels' => [
22 | 'routing' => true,
23 | 'database' => true,
24 | 'view' => true,
25 | 'event' => false,
26 | 'session' => true,
27 | 'request' => true,
28 | 'auth' => true,
29 | 'html-validator' => false,
30 | 'terminal' => true,
31 | ],
32 | ];
33 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => realpath(storage_path('framework/views')),
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/database/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/database/.DS_Store
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 | !database.sample.sqlite
3 |
--------------------------------------------------------------------------------
/database/database.sample.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/database/database.sample.sqlite
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | define(App\User::class, function (Faker $faker) {
17 | return [
18 | 'name' => $faker->name,
19 | 'email' => $faker->unique()->safeEmail,
20 | 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
21 | 'remember_token' => str_random(10),
22 | ];
23 | });
24 |
--------------------------------------------------------------------------------
/database/migrations/2019_06_09_213118_create_settings_table.php:
--------------------------------------------------------------------------------
1 | integerIncrements('id');
18 | $table->string('name');
19 | $table->mediumText('value');
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::dropIfExists('settings');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/2019_06_09_215137_create_users_table.php:
--------------------------------------------------------------------------------
1 | integerIncrements('id');
18 | $table->string('name');
19 | $table->string('email')->unique();
20 | $table->string('password');
21 | $table->rememberToken();
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('users');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/database/migrations/2019_06_12_172611_create_jobs_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->string('queue')->index();
19 | $table->longText('payload');
20 | $table->unsignedTinyInteger('attempts');
21 | $table->unsignedInteger('reserved_at')->nullable();
22 | $table->unsignedInteger('available_at');
23 | $table->unsignedInteger('created_at');
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('jobs');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2019_06_12_172726_create_failed_jobs_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->text('connection');
19 | $table->text('queue');
20 | $table->longText('payload');
21 | $table->longText('exception');
22 | $table->timestamp('failed_at')->useCurrent();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('failed_jobs');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/database/migrations/2019_12_16_224455_create_onedrive_accounts_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->string('client_id')->nullable();
19 | $table->string('client_secret')->nullable();
20 | $table->string('redirect_uri')->nullable();
21 | $table->string('account_type')->nullable();
22 | $table->string('access_token')->nullable();
23 | $table->string('refresh_token')->nullable();
24 | $table->string('access_token_expires')->nullable();
25 | $table->string('account_email')->nullable();
26 | $table->string('account_state')->nullable();
27 | $table->string('account_extend')->nullable();
28 | $table->string('nick_name')->nullable();
29 | $table->timestamps();
30 | });
31 | }
32 |
33 | /**
34 | * Reverse the migrations.
35 | *
36 | * @return void
37 | */
38 | public function down()
39 | {
40 | Schema::dropIfExists('onedrive_accounts');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/database/migrations/2019_12_24_120156_create_offline_dl_files_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->timestamps();
19 | $table->string('name')->nullable();
20 | $table->string('gid')->nullable();
21 | $table->string('upload_path')->nullable();
22 | $table->string('client_id')->nullable();
23 | $table->string('speed')->nullable();
24 | $table->string('status')->nullable();
25 | $table->string('progress')->nullable();
26 | $table->string('error')->nullable();
27 | });
28 | }
29 |
30 | /**
31 | * Reverse the migrations.
32 | *
33 | * @return void
34 | */
35 | public function down()
36 | {
37 | Schema::dropIfExists('offline_dl_files');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call(UsersTableSeeder::class);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/database/seeds/UsersTableSeeder.php:
--------------------------------------------------------------------------------
1 | updateOrInsert([
16 | 'name' => 'admin',
17 | 'email' => 'admin@admin.com',
18 | 'password' => bcrypt('12345678'),
19 | ]);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/docs/.nojekyll
--------------------------------------------------------------------------------
/docs/_coverpage.md:
--------------------------------------------------------------------------------
1 | 
2 | # OLAINDEX
3 |
4 | > ✨ Another OneDrive Directory Index.
5 |
6 | * 简单而强大
7 | * 多主题
8 | * 基于 Laravel
9 |
10 | [GitHub](https://github.com/WangNingkai/OLAINDEX/)
11 | [演示地址](https://share.imwnk.cn/)
12 |
13 | 
14 |
--------------------------------------------------------------------------------
/docs/_sidebar.md:
--------------------------------------------------------------------------------
1 | - **概览**
2 | - [简介](README.md)
3 | - [更新日志](changelog.md)
4 | - **帮助**
5 | - [环境要求](env.md)
6 | - [部署安装](install.md)
7 | - [账号申请](apply.md)
8 | - [其它配置](other.md)
9 | - **接口**
10 | - [开放接口](api.md)
11 | - **常见问题**
12 | - [Q&A](question.md)
13 | - [issue](issue.md)
14 |
15 |
--------------------------------------------------------------------------------
/docs/api.md:
--------------------------------------------------------------------------------
1 | !> 此文档待完善
2 |
3 | > 版本 v4.0 后,添加第三方访问接口,目前支持图床接口,之后支持文件列表、文件详情的接口。
4 |
5 | ## 用法
6 |
7 | 1. 后台设置第三方访问密钥 {third_access_token}
8 |
9 | 2. Header 头信息 添加认证信息
10 |
11 | `"Authorization":"Bearer {third_access_token}"`
12 |
13 | 3. 接口调用
14 |
15 | ## 接口列表
16 |
17 | ### 上传图床
18 |
19 | - 地址:{domain}/api/image
20 |
21 | - 访问方式: POST
22 |
23 | - 参数:
24 |
25 | ```
26 | Content-Disposition: form-data;
27 | name="olaindex_img";
28 | filename="onedrive.png"
29 | Content-Type: image/png
30 | ```
31 |
32 | - 返回参数:
33 |
34 | ```json
35 | {
36 | "errno": 200,
37 | "data": {
38 | "id": "01FGBPEFYAMCC",
39 | "filename": "onedrive.png",
40 | "size": 32303,
41 | "time": "2019-06-14T03:15:08Z",
42 | "url": "http://{domain}/view/2019/06/14/UwNZdw2M/onedrive.svg.png",
43 | "delete": "http://{domain}/file/delete/eyJpdiI6IktZaVc0Z01OWU4wUzRuYXpuRjFBZVE9PSIsInZhbHVlIjoiWEFzTGtLWnhibUQxVWVxTlRoU3RYRmpuTE40YlwvVnJYdWhPUTJwcStSd1JaRGpGZ0hwMFpVTnd1QWU0NCtBcGhiZ011UnRwRnBac3Jjd2RHTGZ4clRHWUFIeWFpT2VqMTE3M2dDZk9ibkpaMjRxODBjdUhIRzBSd0VoRk9TMGRwQWNcL29TQ3lvbDR1U3hUcGE3QzVqQUZvZ1hLTmI2emlVbnNtaWdmMVJsQ1hUY096cFB1aFZKajNhOW41eEVHQ3ZONEJkM09wQXRORjVoWGtrZExzaHg3U0llbXFsa0VKQlwvR0pzVXBvd0YxNkpuVDVyYWhIeFI3UHFJK0szV09Gc3hyUlBTb2JyeG5XRTg4RFlnZjFQUnNZcDh3V0xDM1ZLOGRcL0QycUNjNk1acU1aQmhMbUZ6SFVuRU84MkwyXC9VOURKRit6TERBeEVZNHhPd1p6ZkhSOGpJNlNrTUp0cjU0MFRma25vVGxxemJTenFKclBjV1dCOGpSdEp2dU5TUG5wVFNxSzVqNWFvSXJ4M2hoNmNNNzhiS0dmbkRBVkhiSGdEbk1UIiwibWFjIjoiNWQzMjYyZjllMjhlMjVlZTViMjE5MTVlOGQzNTEzNjE4ZmE1ZTBjOTFjYzcxOTlkMTgxZTBjNjIzM2QyMTFhMyJ9"
44 | }
45 | }
46 | ```
47 | - 举例
48 |
49 | ```php
50 | "http://{domain}/api/image",
56 | CURLOPT_RETURNTRANSFER => true,
57 | CURLOPT_ENCODING => "",
58 | CURLOPT_MAXREDIRS => 10,
59 | CURLOPT_TIMEOUT => 30,
60 | CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
61 | CURLOPT_CUSTOMREQUEST => "POST",
62 | CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"olaindex_img\"; filename=\"onedrive.png\"\r\nContent-Type: image/png\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
63 | CURLOPT_HTTPHEADER => array(
64 | "Accept: */*",
65 | "Authorization: Bearer 123123",
66 | "Cache-Control: no-cache",
67 | "Connection: keep-alive",
68 | "Content-Type: application/json",
69 | "Host: 127.0.0.1:8000",
70 | "Postman-Token: b09bec02-8905-4c8d-9476-79787df9da4c,bceb64fb-2208-45c7-81ab-b131eba1aaf0",
71 | "User-Agent: PostmanRuntime/7.15.0",
72 | "accept-encoding: gzip, deflate",
73 | "cache-control: no-cache",
74 | "content-length: 32524",
75 | "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
76 | ),
77 | ));
78 |
79 | $response = curl_exec($curl);
80 | $err = curl_error($curl);
81 |
82 | curl_close($curl);
83 |
84 | if ($err) {
85 | echo "cURL Error #:" . $err;
86 | } else {
87 | echo $response;
88 | }
89 | ```
90 |
--------------------------------------------------------------------------------
/docs/apply.md:
--------------------------------------------------------------------------------
1 | ## 公共账号
2 |
3 | - 公告测试账号1
4 |
5 | **redirect_uri:** `https://olaindex.ningkai.wang`
6 |
7 | **client_id:** `e704ef00-c552-421d-a521-e47ee321220e`
8 |
9 | **client_secret:** `M2kRFM2^KNVMl8__*J(N;e;b5Iz>_B&SK(Lj7c`
10 |
11 | - 公告测试账号2
12 |
13 | **redirect_uri:** `https://olaindex.ningkai.wang`
14 |
15 | **client_id:** `2539c0f7-e089-4ae6-9032-b29bb385f69c`
16 |
17 | **client_secret:** `IhxA?4Q6qld=-:6HMGGASku0T3HC5W?/`
18 |
19 |
20 | ## 回调地址
21 |
22 | - 非中转域名回调,必须是 `https` 协议,格式一般为 `https://your.domain/oauth` 所以配置服务器需要为域名添加 `SSL`,否则无法生效。
23 |
24 | - 中转域名进行回调,可不使用 `https` 协议。需通过 `https://olaindex.ningkai.wang` 申请 `client_id` 和 `client_secret`,前提是在执行安装时填写了正确的绑定域名。
25 |
26 | - 本地回调,默认 `http://localhost:8000/oauth`。
27 |
28 | ## 世纪互联账号申请
29 |
30 | **初始安装页面一键申请方法与世纪互联申请方法不兼容,需要单独到Azure申请。(参考[issue 40](https://github.com/WangNingkai/OLAINDEX/issues/40))**
31 |
32 | **申请需要添加Graph Api权限(包括文件的读写和基本的个人信息读取)**
33 |
34 |
35 | ## 一键申请(推荐)
36 |
37 | **申请密钥建议使用个人账号注册应用,使用企业账号绑定网盘,同一账号申请可能会导致登录异常**
38 |
39 |
40 | - 安装
41 |
42 | 
43 |
44 | - 获取密钥
45 |
46 | 
47 |
48 | - 获取id
49 |
50 |
51 | 
52 |
53 |
54 | - 保存提交
55 |
56 | 
57 |
58 |
59 | ## 错误处理
60 |
61 | 如果填写过程出现错误,可以执行命令,重置数据文件,重新安装。 `php artisan od:reset` 此操作会重置配置文件未初始化状态;
62 | 也可以通过页面的返回修改重置数据,并进行再一次绑定。
63 |
64 |
--------------------------------------------------------------------------------
/docs/changelog.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ```
4 | ____ __ ___ _____ ______ _______ __
5 | / __ \/ / / | / _/ | / / __ \/ ____/ |/ /
6 | / / / / / / /| | / // |/ / / / / __/ | /
7 | / /_/ / /___/ ___ |_/ // /| / /_/ / /___ / |
8 | \____/_____/_/ |_/___/_/ |_/_____/_____//_/|_|
9 | ```
10 |
11 | ## 2019.06 v4.0
12 |
13 | - 搜索功能增强(前台可搜索、后台设置搜索频次)
14 | - 目录额外功能优化(文件隐藏、加密)
15 | - 文件排序功能加强
16 | - 静态资源CDN更换
17 | - 路径优化(可自定义兼容模式)
18 | - 后台刷新任务执行
19 | - 整合部分命令
20 | - 上传、搜索频次设置
21 | - 更换信息存储为数据库存储
22 |
23 | ## 2019.03
24 |
25 | - 添加前端排序 orderBy={field},asc 正序
26 | orderBy={field},desc 倒序
27 | - field 支持 id/name/size/lastModifiedDateTime
28 |
29 | - 优化长视频401问题
30 |
31 |
32 | ## 2019.01.27
33 |
34 | - 添加链接排序 orderBy={field},asc 正序
35 | orderBy={field},desc 倒序
36 | - field 支持 id/name/size/lastModifiedDateTime
37 |
38 | ## 2018.12.22
39 |
40 | - 优化防盗链,前端代码压缩优化
41 |
42 | ## 2018.12.20
43 |
44 | - 优化加密逻辑,可指定加密选项
45 |
46 | ## 2018.12.18
47 |
48 | - 更新加密目录逻辑,支持递归加密,层级由下到上
49 |
50 | ## 2018.12.12 / v3.2.1
51 |
52 | - 优化缩略图显示
53 | - 优化页面打开速度
54 | - 添加后台调试日志查看
55 |
56 | ## 2018.12.07
57 |
58 | - fix curl:35 错误
59 | ```
60 | {"code":35,"msg":"SSL connect error: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection toxxx:443"}
61 | ```
62 | - 添加多主题
63 |
64 | ## 2018.12.06
65 |
66 | - 更换核心请求类,优化报错显示
67 |
68 | ## 2018.12.04
69 |
70 | - 添加批量获取下载链接
71 | - 优化请求响应
72 |
73 | ## 2018.12.01
74 |
75 | - 添加任务调度
76 | - 添加命令行缓存目录
77 |
78 | ## 2018.11.25 / v3.2
79 |
80 | - 不再兼容 `3.2` 以下升级
81 |
82 | ## 2018.11.19
83 |
84 | - 命令行添加文件目录列表功能
85 | - 命令行添加搜索文件功能
86 | - 命令行添加登录功能
87 |
88 | ## 2018.11.19
89 |
90 | - 自定义页脚版权区
91 | - 可使用 https://olaindex.ningkai.wang 进行中转,此中转可不再强制使用https
92 |
93 | ## 2018.11.16
94 |
95 | - 优化账户绑定流程,后台可直接解绑、绑定(建议重新绑定账号)
96 |
97 | ## 2018.11.15
98 |
99 | - 安装流程优化,支持及时重置。
100 |
101 | ## 2018.11.11 / v3.1.1
102 |
103 | - 升级3.1.1 支持世纪互联账号
104 | - 增强命令行 `php artisan od:command` 查看全部命令行命令
105 | - 图床显示优化
106 |
107 | ## 2018.11.02 to 11.09 / v3.1
108 |
109 | - 重构部分接口逻辑,减少composer依赖
110 | - 添加离线下载(个人版)
111 | - 添加文件的基础操作(移动复制)
112 | - 添加文件的直连分享
113 | - 修改重置账户代码 查看命令行 `php artisan list od` 具体命令行操作帮助,例如: `php artisan od:upload -h`
114 | - 命令行上传文件,支持分片上传
115 | - 添加命令行操作支持
116 |
117 | ## 2018.10.28 / v3.0
118 |
119 | - 抛弃数据库,数据json格式保存
120 |
121 | ## 2018.10.20 / v2.0
122 |
123 | - 全新路径显示(原先模式的图床路径会失效,请谨慎升级)
124 |
125 | ## 2018.10.16 / v1.2
126 |
127 | - 支持dash视频流播放(理论支持大多数视频)
128 |
129 | ## 2018.10.15 / v1.1
130 |
131 | - 加入防盗链
132 |
133 |
134 | ## 2018.10.10 / v1.0
135 | - 安装流程优化;
136 |
--------------------------------------------------------------------------------
/docs/env.md:
--------------------------------------------------------------------------------
1 | **PHP 扩展要求**
2 |
3 | - PHP >= 7.1.3
4 | - PHP OpenSSL 扩展
5 | - PHP PDO 扩展
6 | - PHP Mbstring 扩展
7 | - PHP Tokenizer 扩展
8 | - PHP XML 扩展
9 | - PHP Ctype 扩展
10 | - PHP JSON 扩展
11 | - PHP BCMath 扩展
12 | - PHP Fileinfo 扩展 *
13 |
14 |
15 | **Laravel 文件系统模块要求,为保证成功安装,建议安装 `PHP Fileinfo 扩展` **
16 |
17 |
18 | 推荐使用 oneinstack 安装php环境 [https://oneinstack.com/auto](https://oneinstack.com/auto)
19 |
20 | 可以根据需要安装扩展,具体扩展安装请参考官方文档。
21 |
22 | 最低安装标准 `nginx+php`
23 |
24 | 
25 |
26 | 使用一下命令即可自动安装 `nginx+php`
27 |
28 | ```
29 | wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz && tar xzf oneinstack-full.tar.gz && ./oneinstack/install.sh --nginx_option 1 --php_option 7 --phpcache_option 1 --reboot
30 | ```
31 |
32 | **oneinstack安装fileinfo扩展**
33 |
34 | 
35 |
36 | 
37 |
38 | **注意:**
39 |
40 | OLAINDEX 基于 `Laravel` 安装需要开启禁用的两个方法,步骤如下:
41 |
42 | oneinstack php安装路径 `/usr/local/php/etc/php.ini`
43 |
44 | ```
45 | 1、进入php.ini文件,找到disable_function=,删除proc_open函数,即可。
46 | 2、进入php.ini文件,找到disable_function=,删除proc_get_status函数,即可。
47 | 3、进入php.ini文件,找到disable_function=,删除putenv函数,即可。
48 | 4、sudo service php-fpm restart # 重启 php 进程
49 | ```
50 |
51 | **3.0更新了命令行操作,另外需要开启禁用的两个方法**
52 |
53 | 分别是 `exec` 和 `shell_exec` 步骤参考上面。
54 |
55 | 另外使用composer包管理器, 需要下载 composer 并且全局处理,步骤如下:
56 |
57 | ```
58 | 1、curl -sS https://getcomposer.org/installer | php
59 | 2、mv composer.phar /usr/local/bin/composer
60 | 3、composer config -g repo.packagist composer https://packagist.laravel-china.org # 更换源为国内源,国外服务器可忽略此步骤
61 | ```
62 |
63 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 | OLAINDEX加载中
2 |
--------------------------------------------------------------------------------
/docs/install.md:
--------------------------------------------------------------------------------
1 | ## 手动安装
2 |
3 |
4 | **注意:**
5 |
6 | 这里的命令需要一步一步执行
7 |
8 | ```bash
9 | cd web目录
10 | git clone https://github.com/YukiCoco/OLAINDEX-Magic.git tmp
11 | mv tmp/.git .
12 | rm -rf tmp
13 | git reset --hard
14 | cp database/database.sample.sqlite database/database.sqlite # 数据库文件
15 | composer install -vvv # 这里确保已成功安装 composer ,如果报权限问题,建议给予用户完整权限。
16 | chmod -R 777 storage
17 | chmod -R 777 database
18 | chown -R www:www * # 此处 www 根据服务器具体用户组而定
19 | php artisan od:install # 此处绑定域名需根据实际域名谨慎填写(包含http/https)
20 |
21 | # 安装完成后,不要忘记配置 nginx ,将域名指向应用目录的 public 下,参考下面nginx配置。
22 |
23 | ```
24 |
25 | ***
26 |
27 | ## 宝塔面板安装
28 |
29 | **不会配置的请慎重,这里我也亲自写的一篇BT面板安装教程,请按照指示操作**
30 |
31 | [BT 面板安装 OLAINDEX 全方位指南](https://imwnk.cn/archives/bt-olaindex)
32 |
33 | ***
34 |
35 | ## Web服务器配置
36 |
37 | 将应用的运行目录指向的是 根目录下的 `public` 目录,如 `www/OLAINDEX/public`
38 |
39 | 
40 |
41 | **Apache**
42 |
43 | ```
44 | Options +FollowSymLinks
45 | RewriteEngine On
46 |
47 | RewriteCond %{REQUEST_FILENAME} !-d
48 | RewriteCond %{REQUEST_FILENAME} !-f
49 | RewriteRule ^ index.php [L]
50 | ```
51 |
52 | **Nginx**
53 |
54 | ```
55 | location / {
56 | try_files $uri $uri/ /index.php?$query_string;
57 | }
58 | ```
59 |
60 | **这里 `nginx` 配置仅供参考**
61 |
62 | ```
63 | server {
64 | listen 80; # 80端口 仅支持通过https://olaindex.ningkai.wang中转的域名,否则请配置ssl证书,放通443端口
65 | server_name example.com;
66 | root /example.com/public; # 这里填写你的程序目录,注意不要少了public
67 |
68 | add_header X-Frame-Options "SAMEORIGIN";
69 | add_header X-XSS-Protection "1; mode=block";
70 | add_header X-Content-Type-Options "nosniff";
71 |
72 | index index.html index.htm index.php;
73 |
74 | charset utf-8;
75 |
76 | location / {
77 | try_files $uri $uri/ /index.php?$query_string;
78 | }
79 |
80 | location = /favicon.ico { access_log off; log_not_found off; }
81 | location = /robots.txt { access_log off; log_not_found off; }
82 |
83 | error_page 404 /index.php;
84 |
85 | location ~ \.php$ {
86 | fastcgi_split_path_info ^(.+\.php)(/.+)$;
87 | fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
88 | fastcgi_index index.php;
89 | fastcgi_param SCRIPT_FILENAME you/app/path/public/index.php; # 注意这里根据目录填写
90 | include fastcgi_params;
91 | }
92 |
93 | location ~ /\.(?!well-known).* {
94 | deny all;
95 | }
96 | }
97 | ```
98 |
--------------------------------------------------------------------------------
/docs/issue.md:
--------------------------------------------------------------------------------
1 | ## 已存问题
2 |
3 |
--------------------------------------------------------------------------------
/docs/offlineDownload.md:
--------------------------------------------------------------------------------
1 | # 离线下载(已废除)
2 |
3 | ## Warning
4 |
5 | 由于 PHP 不能很好地持久化运行,测试过程中存在很多问题,此处废止。离线下载和上传方案建议采用 [OneDriveUploader](https://github.com/MoeClub/OneList/tree/master/OneDriveUploader), 支持国际版与世纪互联。
6 |
7 | ## 简介
8 |
9 | **warning:测试功能,可能会出现各式问题,欢迎发issue**
10 |
11 | OLAINDEX-Magic 与 Aria2 对接,支持下载 HTTP/FTP/SFTP/磁力链接,若下载种子文件会转换成目标文件进行下载。下载完毕后上传到 Onedrive 后将为您删除本地文件。
12 |
13 | **下载和上传:大流量消耗警告!** 这意味着你需要一个磁盘空间比较大的vps。(根据下载的文件自己决定
14 |
15 | ## 开始配置
16 |
17 | ### 0.旧版用户更新
18 | 拉取代码后请执行一次 php artisan migrate
19 |
20 | ### 1.下载安装 aria2
21 | 推荐使用[一键安装脚本](https://github.com/P3TERX/aria2.sh),下面的教程基于此安装脚本
22 |
23 | 将 url、端口和 token 填入后台配置中,注意:
24 | + URL: 应该被填写为 **127.0.0.1** ,目前还不支持非本地文件上传。
25 | + 端口: 默认为6800
26 | + token: 密钥
27 |
28 | ### 2.配置 aria2
29 |
30 | #### (1)安装 curl
31 | 请确保机器安装了 curl ,在终端输入 curl 应该会有如下提示,若无,请查阅资料并安装 curl
32 | ```
33 | curl: try 'curl --help' or 'curl --manual' for more information
34 | ```
35 |
36 | #### (2)创建 success.sh
37 | 安装后进入 root/.aria2 目录,创建 success.sh 文件,填入以下内容,并修改
38 | + token: aria2 token
39 | + url: 你的网站URL
40 | + path: aria2 下载目录, **注意权限问题:** 若填写为 root/Download ,需要确保 root 文件夹有读写权限。这意味着你应该执行命令:chmod 777 /root
41 | + time: 最长上传时间,可以保持默认,不修改
42 | ```
43 | #!/bin/sh
44 | #修改下列内容
45 | path=/root/Download
46 | token=51b2b478586eb063862b
47 | url=http://onedrive.test
48 | time=7200 #最长上传时间
49 | #修改到这里完成!
50 | gid=$1
51 | payload=${url}/admin/offlinedl/upload/${token}/$1
52 | chmod -R 777 $path
53 | curl $payload -m ${time}
54 | ```
55 |
56 | #### (3)修改 aria2.conf
57 | 修改 aria2.conf 文件 on-download-complete(若无,请添加此项),去掉注释并修改为 success.sh 文件路径,修改完后重启 aria2
58 | ```
59 | on-download-complete=/root/.aria2/success.sh
60 | ```
61 |
62 | **至此,离线下载配置完毕。**
63 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "requires": true,
3 | "lockfileVersion": 1,
4 | "dependencies": {
5 | "es6-object-assign": {
6 | "version": "1.1.0",
7 | "resolved": "https://registry.npm.taobao.org/es6-object-assign/download/es6-object-assign-1.1.0.tgz",
8 | "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw="
9 | },
10 | "promise-polyfill": {
11 | "version": "6.1.0",
12 | "resolved": "https://registry.npm.taobao.org/promise-polyfill/download/promise-polyfill-6.1.0.tgz",
13 | "integrity": "sha1-36lpQ+qcEh/KTem1hoyznTRy4Fc="
14 | },
15 | "sweetalert": {
16 | "version": "2.1.2",
17 | "resolved": "https://registry.npm.taobao.org/sweetalert/download/sweetalert-2.1.2.tgz",
18 | "integrity": "sha1-AQuqqA0Nvchvlr/KqWtJByhZS3k=",
19 | "requires": {
20 | "es6-object-assign": "^1.1.0",
21 | "promise-polyfill": "^6.0.2"
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | ./tests/Unit
14 |
15 |
16 |
17 | ./tests/Feature
18 |
19 |
20 |
21 |
22 | ./app
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/pm2.json:
--------------------------------------------------------------------------------
1 | {
2 | "apps": {
3 | "name": "olaindex",
4 | "args": "queue:work database --queue=olaindex --tries=3",
5 | "script": "artisan",
6 | "exec_interpreter": "php.exe",
7 | "exec_mode": "fork",
8 | "max_memory_restart": "100M",
9 | "watch": [
10 | "vendor"
11 | ],
12 | "error_file": "./storage/logs/pm2-err.log",
13 | "out_file": "./storage/logs/pm2-out.log"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/public/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/.DS_Store
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews -Indexes
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Handle Authorization Header
9 | RewriteCond %{HTTP:Authorization} .
10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
11 |
12 | # Redirect Trailing Slashes If Not A Folder...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_URI} (.+)/$
15 | RewriteRule ^ %1 [L,R=301]
16 |
17 | # Handle Front Controller...
18 | RewriteCond %{REQUEST_FILENAME} !-d
19 | RewriteCond %{REQUEST_FILENAME} !-f
20 | RewriteRule ^ index.php [L]
21 |
22 |
--------------------------------------------------------------------------------
/public/css/mdui.css:
--------------------------------------------------------------------------------
1 | .mdui-appbar .mdui-toolbar {
2 | height: 56px;
3 | font-size: 16px;
4 | }
5 |
6 | .mdui-toolbar > * {
7 | padding: 0 6px;
8 | margin: 0 2px;
9 | opacity: 0.5;
10 | }
11 |
12 | .mdui-toolbar > .mdui-typo-headline {
13 | padding: 0 16px 0 0;
14 | }
15 |
16 | .mdui-toolbar > i {
17 | padding: 0;
18 | }
19 |
20 | .mdui-toolbar > a:hover, a.mdui-typo-headline, a.active {
21 | opacity: 1;
22 | }
23 |
24 | .mdui-container {
25 | max-width: 1200px;
26 | }
27 |
28 | .mdui-list-item {
29 | -webkit-transition: none;
30 | transition: none;
31 | }
32 |
33 | .mdui-list > .th {
34 | background-color: initial;
35 | }
36 |
37 | .mdui-list-item > a {
38 | width: 100%;
39 | line-height: 48px
40 | }
41 |
42 | .mdui-list-item {
43 | margin: 2px 0;
44 | padding: 0;
45 | }
46 |
47 | .mdui-toolbar > a:last-child {
48 | opacity: 1;
49 | }
50 |
51 | @media screen and (max-width: 980px) {
52 | .mdui-list-item .mdui-text-right {
53 | display: none;
54 | }
55 |
56 | .mdui-container {
57 | width: 100% !important;
58 | margin: 0;
59 | }
60 |
61 | .mdui-toolbar > *:not(.mdui-switch) {
62 | display: none;
63 | }
64 |
65 | .mdui-toolbar > a:last-child, .mdui-toolbar > .mdui-typo-headline, .mdui-toolbar > i:first-child {
66 | display: block;
67 | }
68 | }
69 |
70 | a {
71 | text-decoration: none;
72 | color: rgba(0, 0, 0, .87);
73 | }
74 |
75 | .thumb-view .mdui-col {
76 | padding: 10px;
77 | }
78 |
79 | .thumb-view .col-title {
80 | white-space: nowrap;
81 | overflow: hidden;
82 | text-overflow: ellipsis;
83 | }
84 |
85 | .thumb-view .mdui-col:hover {
86 | background-color: #eaeaea;
87 | }
88 |
89 | .thumb-view .col-icon {
90 | width: 100%;
91 | height: 100px;
92 | text-align: center
93 | }
94 |
95 | .thumb-view .col-icon img {
96 | width: auto;
97 | height: auto;
98 | max-width: 100%;
99 | max-height: 100%;
100 | }
101 |
--------------------------------------------------------------------------------
/public/css/mod.css:
--------------------------------------------------------------------------------
1 | .mouse-pointer{
2 | cursor: pointer !important;
3 | }
4 |
--------------------------------------------------------------------------------
/public/img/app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/app.png
--------------------------------------------------------------------------------
/public/img/code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/code.png
--------------------------------------------------------------------------------
/public/img/doc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/doc.png
--------------------------------------------------------------------------------
/public/img/exe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/exe.png
--------------------------------------------------------------------------------
/public/img/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/file.png
--------------------------------------------------------------------------------
/public/img/folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/folder.png
--------------------------------------------------------------------------------
/public/img/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/image.png
--------------------------------------------------------------------------------
/public/img/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/loading.gif
--------------------------------------------------------------------------------
/public/img/mp4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/mp4.png
--------------------------------------------------------------------------------
/public/img/music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/music.png
--------------------------------------------------------------------------------
/public/img/pdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/pdf.png
--------------------------------------------------------------------------------
/public/img/return.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/return.png
--------------------------------------------------------------------------------
/public/img/text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/text.png
--------------------------------------------------------------------------------
/public/img/video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/video.png
--------------------------------------------------------------------------------
/public/img/zip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YukiCoco/OLAINDEX-Magic/6935884ed400e0a01df35ea3e9a9e4df91c1eacd/public/img/zip.png
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | define('LARAVEL_START', microtime(true));
11 |
12 | /*
13 | |--------------------------------------------------------------------------
14 | | Register The Auto Loader
15 | |--------------------------------------------------------------------------
16 | |
17 | | Composer provides a convenient, automatically generated class loader for
18 | | our application. We just need to utilize it! We'll simply require it
19 | | into the script here so that we don't have to worry about manual
20 | | loading any of our classes later on. It feels great to relax.
21 | |
22 | */
23 |
24 | require __DIR__.'/../vendor/autoload.php';
25 |
26 | /*
27 | |--------------------------------------------------------------------------
28 | | Turn On The Lights
29 | |--------------------------------------------------------------------------
30 | |
31 | | We need to illuminate PHP development, so let us turn on the lights.
32 | | This bootstraps the framework and gets it ready for use, then it
33 | | will load up this application so that we can run it and send
34 | | the responses back to the browser and delight our users.
35 | |
36 | */
37 |
38 | $app = require_once __DIR__.'/../bootstrap/app.php';
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Run The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once we have the application, we can handle the incoming request
46 | | through the kernel, and send the associated response back to
47 | | the client's browser allowing them to enjoy the creative
48 | | and wonderful application we have prepared for them.
49 | |
50 | */
51 |
52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
53 |
54 | $response = $kernel->handle(
55 | $request = Illuminate\Http\Request::capture()
56 | );
57 |
58 | $response->send();
59 |
60 | $kernel->terminate($request, $response);
61 |
--------------------------------------------------------------------------------
/public/js/filepond-plugin-file-validate-size.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * FilePondPluginFileValidateSize 2.1.3
3 | * Licensed under MIT, https://opensource.org/licenses/MIT/
4 | * Please visit https://pqina.nl/filepond/ for details.
5 | */
6 |
7 | /* eslint-disable */
8 |
9 | !function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(e=e||self).FilePondPluginFileValidateSize=i()}(this,function(){"use strict";var e=function(e){var i=e.addFilter,l=e.utils,E=l.Type,n=l.replaceInString,_=l.toNaturalFileSize;return i("ALLOW_HOPPER_ITEM",function(e,i){var l=i.query;if(!l("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var E=l("GET_MAX_FILE_SIZE");if(null!==E&&e.size>=E)return!1;var n=l("GET_MIN_FILE_SIZE");return!(null!==n&&e.size<=n)}),i("LOAD_FILE",function(e,i){var l=i.query;return new Promise(function(i,E){if(l("GET_ALLOW_FILE_SIZE_VALIDATION")){var t=l("GET_MAX_FILE_SIZE");if(null!==t&&e.size>=t)E({status:{main:l("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:n(l("GET_LABEL_MAX_FILE_SIZE"),{filesize:_(t)})}});else{var a=l("GET_MIN_FILE_SIZE");if(null!==a&&e.size<=a)E({status:{main:l("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"),sub:n(l("GET_LABEL_MIN_FILE_SIZE"),{filesize:_(a)})}});else{var u=l("GET_MAX_TOTAL_FILE_SIZE");if(null!==u)if(l("GET_ACTIVE_ITEMS").reduce(function(e,i){return e+i.fileSize},0)>u)return void E({status:{main:l("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:n(l("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:_(u)})}});i(e)}}}else i(e)})}),{options:{allowFileSizeValidation:[!0,E.BOOLEAN],maxFileSize:[null,E.INT],minFileSize:[null,E.INT],maxTotalFileSize:[null,E.INT],labelMinFileSizeExceeded:["File is too small",E.STRING],labelMinFileSize:["Minimum file size is {filesize}",E.STRING],labelMaxFileSizeExceeded:["File is too large",E.STRING],labelMaxFileSize:["Maximum file size is {filesize}",E.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",E.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",E.STRING]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e});
10 |
--------------------------------------------------------------------------------
/public/js/filepond-plugin-file-validate-type.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * FilePondPluginFileValidateType 1.2.4
3 | * Licensed under MIT, https://opensource.org/licenses/MIT/
4 | * Please visit https://pqina.nl/filepond/ for details.
5 | */
6 |
7 | /* eslint-disable */
8 |
9 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).FilePondPluginFileValidateType=t()}(this,function(){"use strict";var e=function(e){var t=e.addFilter,n=e.utils,i=n.Type,T=n.isString,E=n.replaceInString,l=n.guesstimateMimeType,o=n.getExtensionFromFilename,a=n.getFilenameFromURL,r=function(e,t){return e.some(function(e){return/\*$/.test(e)?(n=e,(/^[^\/]+/.exec(t)||[]).pop()===n.slice(0,-2)):e===t;var n})},u=function(e,t,n){if(0===t.length)return!0;var i=function(e){var t="";if(T(e)){var n=a(e),i=o(n);i&&(t=l(i))}else t=e.type;return t}(e);return n?new Promise(function(T,E){n(e,i).then(function(e){r(t,e)?T():E()}).catch(E)}):r(t,i)};return t("SET_ATTRIBUTE_TO_OPTION_MAP",function(e){return Object.assign(e,{accept:"acceptedFileTypes"})}),t("ALLOW_HOPPER_ITEM",function(e,t){var n=t.query;return!n("GET_ALLOW_FILE_TYPE_VALIDATION")||u(e,n("GET_ACCEPTED_FILE_TYPES"))}),t("LOAD_FILE",function(e,t){var n=t.query;return new Promise(function(t,i){if(n("GET_ALLOW_FILE_TYPE_VALIDATION")){var T=n("GET_ACCEPTED_FILE_TYPES"),l=n("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),o=u(e,T,l),a=function(){var e,t=T.map((e=n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"),function(t){return null!==e[t]&&(e[t]||t)})).filter(function(e){return!1!==e});i({status:{main:n("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:E(n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:t.join(", "),allButLastType:t.slice(0,-1).join(", "),lastType:t[t.length-1]})}})};if("boolean"==typeof o)return o?t(e):a();o.then(function(){t(e)}).catch(a)}else t(e)})}),{options:{allowFileTypeValidation:[!0,i.BOOLEAN],acceptedFileTypes:[[],i.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",i.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",i.STRING],fileValidateTypeLabelExpectedTypesMap:[{},i.OBJECT],fileValidateTypeDetectType:[null,i.FUNCTION]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e});
10 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/public/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ar/general.php:
--------------------------------------------------------------------------------
1 | 'جميع',
5 | 'date' => 'تاريخ',
6 | 'empty-logs' => 'قائمة سجلات فارغة!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ar/levels.php:
--------------------------------------------------------------------------------
1 | 'الجميع',
5 | 'emergency' => 'حالات الطوارئ',
6 | 'alert' => 'إنذار',
7 | 'critical' => 'حرج',
8 | 'error' => 'خطأ',
9 | 'warning' => 'تحذير',
10 | 'notice' => 'ملاحظة',
11 | 'info' => 'المعلومات',
12 | 'debug' => 'التصحيح',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/bg/general.php:
--------------------------------------------------------------------------------
1 | 'Всички',
5 | 'date' => 'Дата',
6 | 'empty-logs' => 'Не са намерени логове!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/bg/levels.php:
--------------------------------------------------------------------------------
1 | 'Всички',
5 | 'emergency' => 'Emergency',
6 | 'alert' => 'Alert',
7 | 'critical' => 'Critical',
8 | 'error' => 'Error',
9 | 'warning' => 'Warning',
10 | 'notice' => 'Notice',
11 | 'info' => 'Info',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/de/general.php:
--------------------------------------------------------------------------------
1 | 'Alle',
5 | 'date' => 'Datum',
6 | 'empty-logs' => 'Keine Log Dateien gefunden!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/de/levels.php:
--------------------------------------------------------------------------------
1 | 'Alle',
5 | 'emergency' => 'Notfall',
6 | 'alert' => 'Alarm',
7 | 'critical' => 'Kritisch',
8 | 'error' => 'Fehler',
9 | 'warning' => 'Warnung',
10 | 'notice' => 'Hinweis',
11 | 'info' => 'Info',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/en/general.php:
--------------------------------------------------------------------------------
1 | 'All',
5 | 'date' => 'Date',
6 | 'empty-logs' => 'The list of logs is empty!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/en/levels.php:
--------------------------------------------------------------------------------
1 | 'All',
5 | 'emergency' => 'Emergency',
6 | 'alert' => 'Alert',
7 | 'critical' => 'Critical',
8 | 'error' => 'Error',
9 | 'warning' => 'Warning',
10 | 'notice' => 'Notice',
11 | 'info' => 'Info',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/es/general.php:
--------------------------------------------------------------------------------
1 | 'Todos',
5 | 'date' => 'Fecha',
6 | 'empty-logs' => 'La lista del log está vacía!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/es/levels.php:
--------------------------------------------------------------------------------
1 | 'Todos',
5 | 'emergency' => 'Emergencia',
6 | 'alert' => 'Alerta',
7 | 'critical' => 'Criticos',
8 | 'error' => 'Errores',
9 | 'warning' => 'Advertencia',
10 | 'notice' => 'Aviso',
11 | 'info' => 'Info',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/et/general.php:
--------------------------------------------------------------------------------
1 | 'Kõik',
5 | 'date' => 'Kuupäev',
6 | 'empty-logs' => 'Logide nimekiri on tühi!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/et/levels.php:
--------------------------------------------------------------------------------
1 | 'Kõik',
5 | 'emergency' => 'Erakorraline',
6 | 'alert' => 'Häire',
7 | 'critical' => 'Kriitiline',
8 | 'error' => 'Viga',
9 | 'warning' => 'Hoiatus',
10 | 'notice' => 'Teade',
11 | 'info' => 'Info',
12 | 'debug' => 'Silumine',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/fa/general.php:
--------------------------------------------------------------------------------
1 | 'همه',
5 | 'date' => 'تاریخ',
6 | 'empty-logs' => 'چیزی برای نمایش وجود ندارد!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/fa/levels.php:
--------------------------------------------------------------------------------
1 | 'همه',
5 | 'emergency' => 'اورژانسی',
6 | 'alert' => 'اخطار',
7 | 'critical' => 'بحرانی',
8 | 'error' => 'خطا',
9 | 'warning' => 'هشدار',
10 | 'notice' => 'اعلان',
11 | 'info' => 'اطلاعات',
12 | 'debug' => 'دیباگ',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/fr/general.php:
--------------------------------------------------------------------------------
1 | 'Tous',
5 | 'date' => 'Date',
6 | 'empty-logs' => 'La liste des logs est vide!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/fr/levels.php:
--------------------------------------------------------------------------------
1 | 'Tous',
5 | 'emergency' => 'Urgence',
6 | 'alert' => 'Alerte',
7 | 'critical' => 'Critique',
8 | 'error' => 'Erreur',
9 | 'warning' => 'Avertissement',
10 | 'notice' => 'Notice',
11 | 'info' => 'Info',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/hu/general.php:
--------------------------------------------------------------------------------
1 | 'Összes',
5 | 'date' => 'Dátum',
6 | 'empty-logs' => 'The list of logs is empty!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/hu/levels.php:
--------------------------------------------------------------------------------
1 | 'Összes',
5 | 'emergency' => 'Vészhelyzet',
6 | 'alert' => 'Riasztás',
7 | 'critical' => 'Kritikus',
8 | 'error' => 'Hiba',
9 | 'warning' => 'Figyelmeztetés',
10 | 'notice' => 'Értesítés',
11 | 'info' => 'Információ',
12 | 'debug' => 'Hibakeresés',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/hy/general.php:
--------------------------------------------------------------------------------
1 | 'Բոլորը',
5 | 'date' => 'Ամսաթիվ',
6 | 'empty-logs' => 'Լոգերի ցուցակը դատարկ է։',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/hy/levels.php:
--------------------------------------------------------------------------------
1 | 'Բոլորը',
5 | 'emergency' => 'Վթարային',
6 | 'alert' => 'Նախազգուշացում',
7 | 'critical' => 'Կրիտիկական',
8 | 'error' => 'Սխալ',
9 | 'warning' => 'Նախազգուշացում',
10 | 'notice' => 'Ծանուցում',
11 | 'info' => 'Տեղեկատվություն',
12 | 'debug' => 'Կարգաբերում',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/id/general.php:
--------------------------------------------------------------------------------
1 | 'Semua',
5 | 'date' => 'Tanggal',
6 | 'empty-logs' => 'Daftar Log Kosong',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/id/levels.php:
--------------------------------------------------------------------------------
1 | 'Semua',
5 | 'emergency' => 'Darurat',
6 | 'alert' => 'Waspada',
7 | 'critical' => 'Kritis',
8 | 'error' => 'Kesalahan',
9 | 'warning' => 'Peringatan',
10 | 'notice' => 'Pemberitahuan',
11 | 'info' => 'Info',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/it/general.php:
--------------------------------------------------------------------------------
1 | 'Tutti',
5 | 'date' => 'Data',
6 | 'empty-logs' => 'L\'elenco dei log è vuoto!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/it/levels.php:
--------------------------------------------------------------------------------
1 | 'Tutti',
5 | 'emergency' => 'Emergenza',
6 | 'alert' => 'Allarme',
7 | 'critical' => 'Critico',
8 | 'error' => 'Errore',
9 | 'warning' => 'Avviso',
10 | 'notice' => 'Notifica',
11 | 'info' => 'Info',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ja/general.php:
--------------------------------------------------------------------------------
1 | 'すべて',
5 | 'date' => '日付',
6 | 'empty-logs' => 'ログリストが空です!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ja/levels.php:
--------------------------------------------------------------------------------
1 | 'すべて',
5 | 'emergency' => '緊急',
6 | 'alert' => '警戒',
7 | 'critical' => '致命的',
8 | 'error' => 'エラー',
9 | 'warning' => '警告',
10 | 'notice' => '通知',
11 | 'info' => '情報',
12 | 'debug' => 'デバッグ',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ko/general.php:
--------------------------------------------------------------------------------
1 | '전체',
5 | 'date' => '날짜',
6 | 'empty-logs' => '로그가 없습니다.',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ko/levels.php:
--------------------------------------------------------------------------------
1 | '전체',
5 | 'emergency' => '긴급',
6 | 'alert' => '경고',
7 | 'critical' => '심각',
8 | 'error' => '오류',
9 | 'warning' => '주의',
10 | 'notice' => '알림',
11 | 'info' => '정보',
12 | 'debug' => '디버그',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/nl/general.php:
--------------------------------------------------------------------------------
1 | 'Alles',
5 | 'date' => 'Datum',
6 | 'empty-logs' => 'De lijst met logs is leeg!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/nl/levels.php:
--------------------------------------------------------------------------------
1 | 'Alle',
5 | 'emergency' => 'Noodgeval',
6 | 'alert' => 'Alarm',
7 | 'critical' => 'Cruciaal',
8 | 'error' => 'Error',
9 | 'warning' => 'Waarschuwing',
10 | 'notice' => 'Opmerking',
11 | 'info' => 'Informatie',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/pl/general.php:
--------------------------------------------------------------------------------
1 | 'Wszystkie',
5 | 'date' => 'Data',
6 | 'empty-logs' => 'Lista logów jest pusta!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/pl/levels.php:
--------------------------------------------------------------------------------
1 | 'Wszystkie',
5 | 'emergency' => 'Awaryjne',
6 | 'alert' => 'Alerty',
7 | 'critical' => 'Krytyczne',
8 | 'error' => 'Błędy',
9 | 'warning' => 'Ostrzeżenia',
10 | 'notice' => 'Warte uwagi',
11 | 'info' => 'Informacje',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/pt-BR/general.php:
--------------------------------------------------------------------------------
1 | 'Todos',
5 | 'date' => 'Data',
6 | 'empty-logs' => 'A lista de logs está vazia!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/pt-BR/levels.php:
--------------------------------------------------------------------------------
1 | 'Todos',
5 | 'emergency' => 'Emergência',
6 | 'alert' => 'Alerta',
7 | 'critical' => 'Crítico',
8 | 'error' => 'Erro',
9 | 'warning' => 'Aviso',
10 | 'notice' => 'Notícia',
11 | 'info' => 'Informação',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ro/general.php:
--------------------------------------------------------------------------------
1 | 'Toate',
5 | 'date' => 'Dată',
6 | 'empty-logs' => 'Nu există niciun log!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ro/levels.php:
--------------------------------------------------------------------------------
1 | 'Toate',
5 | 'emergency' => 'Urgență',
6 | 'alert' => 'Alertă',
7 | 'critical' => 'Critic',
8 | 'error' => 'Eroare',
9 | 'warning' => 'Pericol',
10 | 'notice' => 'Avertisment',
11 | 'info' => 'Informare',
12 | 'debug' => 'Depanare',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ru/general.php:
--------------------------------------------------------------------------------
1 | 'Все',
5 | 'date' => 'Дата',
6 | 'empty-logs' => 'Список журналов пуст!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/ru/levels.php:
--------------------------------------------------------------------------------
1 | 'Все',
5 | 'emergency' => 'Аварийная',
6 | 'alert' => 'Предупреждение',
7 | 'critical' => 'Критический',
8 | 'error' => 'Ошибка',
9 | 'warning' => 'Предупреждение',
10 | 'notice' => 'Уведомление',
11 | 'info' => 'Информация',
12 | 'debug' => 'Отладка',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/sv/general.php:
--------------------------------------------------------------------------------
1 | 'Alla',
5 | 'date' => 'Datum',
6 | 'empty-logs' => 'Det finns inga loggar att visa.',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/sv/levels.php:
--------------------------------------------------------------------------------
1 | 'Alla',
5 | 'emergency' => 'Akut',
6 | 'alert' => 'Alarmerande',
7 | 'critical' => 'Kritisk',
8 | 'error' => 'Error',
9 | 'warning' => 'Varning',
10 | 'notice' => 'Notis',
11 | 'info' => 'Information',
12 | 'debug' => 'Debug',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/th/general.php:
--------------------------------------------------------------------------------
1 | 'ทั้งหมด',
5 | 'date' => 'วันที่',
6 | 'empty-logs' => 'ไม่มีรายการล็อก!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/th/levels.php:
--------------------------------------------------------------------------------
1 | 'ทั้งหมด',
5 | 'emergency' => 'ฉุกเฉิน',
6 | 'alert' => 'วิกฤติ',
7 | 'critical' => 'ร้ายแรง',
8 | 'error' => 'ข้อผิดพลาด',
9 | 'warning' => 'คำเตือน',
10 | 'notice' => 'ประกาศ',
11 | 'info' => 'ข้อมูล',
12 | 'debug' => 'ดีบัก',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/tr/general.php:
--------------------------------------------------------------------------------
1 | 'Tümü',
5 | 'date' => 'Tarih',
6 | 'empty-logs' => 'Günlük listesi boş!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/tr/levels.php:
--------------------------------------------------------------------------------
1 | 'Tümü',
5 | 'emergency' => 'Acil',
6 | 'alert' => 'Alarm',
7 | 'critical' => 'Kritik',
8 | 'error' => 'Hata',
9 | 'warning' => 'Uyarı',
10 | 'notice' => 'Bildirim',
11 | 'info' => 'Bilgi',
12 | 'debug' => 'Hata ayıklama',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/zh-TW/general.php:
--------------------------------------------------------------------------------
1 | '全部',
5 | 'date' => '日期',
6 | 'empty-logs' => '列表中沒有任何紀錄!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/zh-TW/levels.php:
--------------------------------------------------------------------------------
1 | '全部',
5 | 'emergency' => '緊急',
6 | 'alert' => '警報',
7 | 'critical' => '嚴重',
8 | 'error' => '錯誤',
9 | 'warning' => '警告',
10 | 'notice' => '注意',
11 | 'info' => '訊息',
12 | 'debug' => '除錯',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/zh/general.php:
--------------------------------------------------------------------------------
1 | '全部',
5 | 'date' => '日期',
6 | 'empty-logs' => '日志列表为空!',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/vendor/log-viewer/zh/levels.php:
--------------------------------------------------------------------------------
1 | '全部',
5 | 'emergency' => '危急',
6 | 'alert' => '紧急',
7 | 'critical' => '严重',
8 | 'error' => '错误',
9 | 'warning' => '警告',
10 | 'notice' => '注意',
11 | 'info' => '信息',
12 | 'debug' => '调试',
13 | ];
14 |
--------------------------------------------------------------------------------
/resources/views/default/about.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 关于 & 反馈
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
37 |
38 |
39 |
40 |
41 | {!! $markdown !!}
42 |
43 |
44 | @if (\Illuminate\Support\Str::contains(config('app.url'),['localhost','dev.ningkai.wang']))
45 |
52 | @endif
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/resources/views/default/admin/bind.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.admin')
2 | @section('title','绑定设置')
3 | @section('js')
4 |
9 | @stop
10 | @section('content')
11 | @foreach (getOnedriveAccounts() as $item)
12 |
27 | @endforeach
28 | 绑定新账户
29 | @stop
30 |
--------------------------------------------------------------------------------
/resources/views/default/admin/login.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.common')
2 | @section('title','登录')
3 | @section('content')
4 |
32 | @stop
33 |
--------------------------------------------------------------------------------
/resources/views/default/admin/newdrive.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.admin')
2 | @section('title','绑定新Onedrive')
3 | @section('content')
4 |
32 | @stop
33 |
--------------------------------------------------------------------------------
/resources/views/default/admin/profile.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.admin')
2 | @section('title','密码设置')
3 | @section('content')
4 |
20 | @stop
21 |
--------------------------------------------------------------------------------
/resources/views/default/admin/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.admin')
2 | @section('title','显示设置')
3 | @section('content')
4 | 文件展示类型(扩展名)以空格分开
5 |
44 | @stop
45 |
--------------------------------------------------------------------------------
/resources/views/default/admin/usage.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.admin')
2 | @section('title','使用情况')
3 | @section('content')
4 | @foreach (getOnedriveAccounts() as $item)
5 |
6 |
7 | 账号: {{ $item->account_email }}
8 | 状态: {{ one_info('state',$item->id) }}
9 | 已使用: {{ one_info('used',$item->id) }}
10 | 剩余: {{ one_info('remaining',$item->id) }}
11 | 全部: {{ one_info('total',$item->id) }}
12 |
13 |
14 | @endforeach
15 | @stop
16 |
--------------------------------------------------------------------------------
/resources/views/default/breadcrumb.blade.php:
--------------------------------------------------------------------------------
1 |
34 |
--------------------------------------------------------------------------------
/resources/views/default/install/bind.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.common')
2 | @section('title','绑定帐号')
3 | @section('content')
4 |
28 | @stop
29 |
--------------------------------------------------------------------------------
/resources/views/default/install/init.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.common')
2 | @section('title','初始化安装')
3 | @section('content')
4 |
19 |
50 | @stop
51 |
52 |
53 |
--------------------------------------------------------------------------------
/resources/views/default/layouts/common.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | @yield('title')
9 |
10 |
12 |
13 |
14 |
15 |
16 |
32 |
33 | @if (session()->has('alertMessage'))
34 |
35 |
36 |
{{ session()->pull('alertMessage') }}
37 |
38 | @endif
39 | @yield('content')
40 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/resources/views/default/message.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.main')
2 | @section('title','提醒')
3 | @section('content')
4 |
5 |
OLAINDEX
6 |
Another OneDrive Directory Index.
7 |
8 |
9 | 返回首页
10 |
11 |
12 | @stop
13 |
--------------------------------------------------------------------------------
/resources/views/default/page.blade.php:
--------------------------------------------------------------------------------
1 | @if ($paginator->hasPages())
2 |
26 | @endif
27 |
--------------------------------------------------------------------------------
/resources/views/default/password.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.main')
2 | @section('title','文件夹密码')
3 | @section('js')
4 |
5 |
12 | @stop
13 | @section('content')
14 | @if (!blank(setting('encrypt_tip')))
15 |
20 | @endif
21 |
40 | @stop
41 |
--------------------------------------------------------------------------------
/resources/views/default/show/code.blade.php:
--------------------------------------------------------------------------------
1 | @extends('default.layouts.main')
2 | @section('title',$file['name'])
3 | @section('css')
4 |
6 | @stop
7 | @section('js')
8 |
10 | @stop
11 | @section('content')
12 | @include('default.breadcrumb')
13 |
14 |
17 |
18 |
19 |
20 |
21 | {{ $file['content'] }}
23 |
24 |
25 |
26 |
27 |
29 |
30 |
31 | @stop
32 |
33 |
--------------------------------------------------------------------------------
/resources/views/mdui/about.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('content')
3 |
4 |
5 | {!! $markdown !!}
6 |
7 | @if (\Illuminate\Support\Str::contains(config('app.url'),['localhost','dev.ningkai.wang']))
8 |
15 | @endif
16 |
17 | @stop
18 |
--------------------------------------------------------------------------------
/resources/views/mdui/admin/bind.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.admin')
2 | @section('content')
3 |
4 |
5 |
6 |
绑定设置
7 |
8 |
21 |
22 | @stop
23 |
--------------------------------------------------------------------------------
/resources/views/mdui/admin/file.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.admin')
2 | @section('css')
3 |
4 |
11 | @stop
12 | @section('js')
13 |
14 |
47 | @stop
48 | @section('content')
49 |
50 |
51 |
52 |
上传文件
53 | 由于接口限制,此上传方式仅支持小于4MB文件的上传
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
64 |
65 |
66 | @stop
67 |
--------------------------------------------------------------------------------
/resources/views/mdui/admin/login.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('content')
3 |
34 | @stop
35 |
--------------------------------------------------------------------------------
/resources/views/mdui/admin/profile.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.admin')
2 | @section('content')
3 |
4 |
5 |
6 |
密码设置
7 |
8 |
32 |
33 | @stop
34 |
--------------------------------------------------------------------------------
/resources/views/mdui/breadcrumb.blade.php:
--------------------------------------------------------------------------------
1 | @if(!blank($pathArray))
2 | @foreach ($pathArray as $key => $value)
3 | @if(end($pathArray) === $value && $key === (count($pathArray) - 1))
4 | chevron_right
5 | {{ \Illuminate\Support\Str::limit($value,20) }}
6 | @else
7 | @if (!blank($value))
8 | chevron_right
9 | {{ str_limit($value,20) }}
11 | @endif
12 | @endif
13 | @endforeach
14 | @endif
15 |
--------------------------------------------------------------------------------
/resources/views/mdui/install/bind.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('content')
3 |
4 |
5 |
6 |
应用安装
7 | 应用ID和密钥
8 |
9 |
10 |
11 |
12 |
13 | 请确认client_id
和client_secret
14 |
15 |
16 |
17 | https
18 |
19 |
21 |
22 |
23 |
24 | apps
25 |
26 |
28 |
29 |
30 |
31 |
32 | link
33 |
34 |
36 |
37 |
38 | info
39 |
40 |
42 |
43 |
47 |
48 |
返回更改
50 |
绑定账号
52 |
53 |
54 | @stop
55 |
--------------------------------------------------------------------------------
/resources/views/mdui/layouts/main.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{ setting('name','OLAINDEX') }}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | @yield('css')
17 |
25 |
26 |
27 |
28 |
41 |
42 | @yield('content')
43 |
44 |
45 |
46 |
47 | @if (session()->has('alertMessage'))
48 |
56 | @endif
57 | @yield('js')
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/resources/views/mdui/message.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('content')
3 |
25 | @stop
26 |
--------------------------------------------------------------------------------
/resources/views/mdui/page.blade.php:
--------------------------------------------------------------------------------
1 | @if ($paginator->hasPages())
2 |
3 | @if ($paginator->onFirstPage())
4 |
chevron_left
5 | @else
6 |
chevron_left
7 | @endif
8 |
9 | @foreach ($elements as $element)
10 | @if (is_string($element))
11 |
{{ $element }}
12 | @endif
13 | @if (is_array($element))
14 | @foreach ($element as $page => $url)
15 | @if ($page == $paginator->currentPage())
16 |
{{ $page }}
17 | @else
18 |
{{ $page }}
19 | @endif
20 | @endforeach
21 | @endif
22 | @endforeach
23 | @if ($paginator->hasMorePages())
24 |
chevron_right
26 | @else
27 |
chevron_right
28 | @endif
29 |
30 | @endif
31 |
--------------------------------------------------------------------------------
/resources/views/mdui/password.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('js')
3 |
4 |
11 | @stop
12 | @section('content')
13 |
14 | @if (!blank(setting('encrypt_tip')))
15 |
16 |
17 | face
18 | Info
19 |
20 |
21 |
22 | @endif
23 |
43 |
44 |
45 | @stop
46 |
--------------------------------------------------------------------------------
/resources/views/mdui/show/audio.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('title',$file['name'])
3 | @section('css')
4 |
5 | @stop
6 | @section('js')
7 |
8 |
41 | @stop
42 | @section('content')
43 |
44 |
45 |
46 |
47 |
{{ $file['name'] }}
48 |
49 |
50 |
51 |
52 |
53 |
55 |
56 |
57 | file_download
59 | @stop
60 |
--------------------------------------------------------------------------------
/resources/views/mdui/show/code.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('css')
3 |
5 | @stop
6 | @section('js')
7 |
9 | @stop
10 | @section('content')
11 |
12 |
13 |
14 |
{{ $file['name'] }}
15 |
16 |
17 |
{{ $file['content'] }}
18 |
19 |
20 |
21 |
22 |
24 |
25 |
26 | file_download
28 | @stop
29 |
--------------------------------------------------------------------------------
/resources/views/mdui/show/dash.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('title',$file['name'])
3 | @section('css')
4 |
5 | @stop
6 | @section('js')
7 |
8 |
9 |
40 | @stop
41 | @section('content')
42 |
43 |
44 |
45 |
{{ $file['name'] }}
46 |
47 |
48 |
49 |
如无法播放或格式不受支持,推荐使用 potplayer
50 | 播放器在线播放
51 |
52 |
53 |
55 |
56 |
57 | file_download
59 | @stop
60 |
--------------------------------------------------------------------------------
/resources/views/mdui/show/image.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('css')
3 |
4 | @stop
5 | @section('js')
6 |
7 | @stop
8 | @section('content')
9 |
10 |
11 |
12 |
{{ $file['name'] }}
13 |
14 |
![{{ $file['name'] }}]({{ $file['thumb'] }})
16 |
17 |
18 |
19 |
21 |
22 |
23 |
24 |
26 |
27 |
28 |
29 |
31 |
32 |
33 | file_download
35 | @stop
36 |
--------------------------------------------------------------------------------
/resources/views/mdui/show/video.blade.php:
--------------------------------------------------------------------------------
1 | @extends('mdui.layouts.main')
2 | @section('title',$file['name'])
3 | @section('css')
4 |
5 | @stop
6 | @section('js')
7 |
8 |
43 |
44 | @stop
45 | @section('content')
46 |
47 |
48 |
49 |
{{ $file['name'] }}
50 |
51 |
52 |
53 |
如无法播放或格式不受支持,推荐下载使用 potplayer 播放器在线播放
55 |
56 |
57 |
59 |
60 |
61 | file_download
63 | @stop
64 |
--------------------------------------------------------------------------------
/resources/views/vendor/log-viewer/bootstrap-3/dashboard.blade.php:
--------------------------------------------------------------------------------
1 | @extends('log-viewer::bootstrap-3._master')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | @foreach($percents as $level => $item)
14 |
15 |
17 |
18 | {!! log_styler()->icon($level) !!}
19 |
20 |
21 |
22 |
{{ $item['name'] }}
23 |
24 | {{ $item['count'] }} entries - {!! $item['percent'] !!} %
25 |
26 |
29 |
30 |
31 |
32 | @endforeach
33 |
34 |
35 |
36 |
37 | @endsection
38 |
39 | @section('scripts')
40 |
53 | @endsection
54 |
--------------------------------------------------------------------------------
/resources/views/vendor/log-viewer/bootstrap-4/dashboard.blade.php:
--------------------------------------------------------------------------------
1 | @extends('log-viewer::bootstrap-4._master')
2 |
3 | @section('content')
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | @foreach($percents as $level => $item)
16 |
17 |
18 |
19 | {!! log_styler()->icon($level) !!}
20 |
21 |
22 |
23 |
{{ $item['name'] }}
24 |
25 | {{ $item['count'] }} entries - {!! $item['percent'] !!} %
26 |
27 |
30 |
31 |
32 |
33 | @endforeach
34 |
35 |
36 |
37 | @endsection
38 |
39 | @section('scripts')
40 |
53 | @endsection
54 |
--------------------------------------------------------------------------------
/routes/api.php:
--------------------------------------------------------------------------------
1 | get('/user', function (Request $request) {
17 | return $request->user();
18 | });*/
19 |
20 | Route::post('/image', 'ApiController@imageUpload')->name('image.upload.third');
21 |
--------------------------------------------------------------------------------
/routes/channels.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
16 | });
17 |
--------------------------------------------------------------------------------
/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
18 | //})->describe('Display an inspiring quote');
19 |
--------------------------------------------------------------------------------
/server.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | $uri = urldecode(
11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
12 | );
13 |
14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the
15 | // built-in PHP web server. This provides a convenient way to test a Laravel
16 | // application without having installed a "real" web server software here.
17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
18 | return false;
19 | }
20 |
21 | require_once __DIR__.'/public/index.php';
22 |
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 | !example.config.json
5 |
6 |
--------------------------------------------------------------------------------
/storage/app/example.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "app_version": "v3.2.1",
3 | "account_type": "com",
4 | "client_id": "",
5 | "client_secret": "",
6 | "redirect_uri": "",
7 | "access_token": "",
8 | "access_token_expires": "",
9 | "refresh_token": "",
10 | "root": "\/",
11 | "name": "OLAINDEX",
12 | "theme": "flatly",
13 | "expires": "10",
14 | "image_view": 0,
15 | "image_home": 0,
16 | "image_hosting": 0,
17 | "image_hosting_path": "Hosting",
18 | "image": "bmp jpg jpeg png gif",
19 | "video": "mkv mp4 webm",
20 | "dash": "avi mpg mpeg rm rmvb mov wmv asf ts flv",
21 | "audio": "mp3 ogg wav",
22 | "doc": "csv doc docx odp ods odt pot potm potx pps ppsx ppsxm ppt pptm pptx rtf xls xlsx",
23 | "code": "html htm css go java js json ts sh md php",
24 | "stream": "txt log",
25 | "hotlink_protection": "",
26 | "copyright": "",
27 | "statistics": "",
28 | "password": "25d55ad283aa400af464c76d713c07ad",
29 | "encrypt_path": "",
30 | "encrypt_option": [
31 | "list",
32 | "show",
33 | "download",
34 | "view"
35 | ]
36 | }
37 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | config.php
2 | routes.php
3 | schedule-*
4 | compiled.php
5 | services.json
6 | events.scanned.php
7 | routes.scanned.php
8 | down
9 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/tmp/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
19 |
20 | return $app;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tests/Feature/ExampleTest.php:
--------------------------------------------------------------------------------
1 | get('/');
19 |
20 | $response->assertStatus(200);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | assertTrue(true);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------