Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb241552

Browse files
committed
update dependencies, vue 3
1 parent7c55811 commitb241552

File tree

123 files changed

+14762
-19004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+14762
-19004
lines changed

‎.browserslistrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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

‎.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VUE_APP_LFM_AXIOS_BASE_URL=http://lfm.loc/file-manager/
2+
VUE_APP_LFM_CSRF_TOKEN=OFF

‎.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎.eslintrc.js

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,23 @@
11
module.exports={
2-
root:true,
3-
env:{
4-
node:true,
5-
},
6-
extends:[
7-
'plugin:vue/essential',
8-
'@vue/airbnb',
9-
],
10-
rules:{
11-
'no-console':process.env.NODE_ENV==='production' ?'error' :'off',
12-
'no-debugger':process.env.NODE_ENV==='production' ?'error' :'off',
13-
'no-param-reassign':[
14-
'error',
15-
{
16-
'props':true,
17-
'ignorePropertyModificationsFor':[
18-
'state',
19-
'acc',
20-
'e',
21-
'ctx',
22-
'req',
23-
'request',
24-
'res',
25-
'response',
26-
'$scope',
2+
env:{
3+
browser:true,
4+
es2021:true,
5+
},
6+
extends:['plugin:vue/essential','airbnb-base','prettier'],
7+
parserOptions:{
8+
ecmaVersion:'latest',
9+
sourceType:'module',
10+
},
11+
plugins:['vue','prettier'],
12+
rules:{
13+
'prettier/prettier':'error',
14+
'import/no-extraneous-dependencies':['error',{devDependencies:true}],
15+
'no-param-reassign':[
16+
'error',
17+
{
18+
props:true,
19+
ignorePropertyModificationsFor:['state'],
20+
},
2721
],
28-
},
29-
],
30-
'max-len':'off',
31-
'vue/no-use-v-if-with-v-for':[
32-
'error',{
33-
'allowUsingIterationVar':true,
34-
}],
35-
},
36-
parserOptions:{
37-
parser:'babel-eslint',
38-
},
22+
},
3923
};

‎.gitignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
/node_modules/
2-
/dist/
3-
4-
# Editor directories and files
5-
/.idea/
6-
/.env.development
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
.idea/
6+
*.local
7+
.env.development

‎.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth":120,
3+
"tabWidth":4,
4+
"singleQuote":true
5+
}

‎CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
#Contributing
22

33
>Contributions are welcome, and are accepted via pull requests.
4-
5-
##Pull requests
6-
7-
Please ensure all pull requests are made against the`develop` branch on GitHub.
8-

‎README.md

Lines changed: 54 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
#laravel-file-manager (Frontend)
1+
#Laravelfilemanager (Frontend)
22

3-
>File manager for Laravel - Frontend - Vue.js
4-
5-
>Backend - Laravel 5 package -[alexusmai/laravel-file-manager](https://github.com/alexusmai/laravel-file-manager)
3+
>Backend - Laravel package -[alexusmai/laravel-file-manager](https://github.com/alexusmai/laravel-file-manager)
64
75
![Laravel File Manager](https://raw.github.com/alexusmai/vue-laravel-file-manager/master/src/assets/laravel-file-manager.gif?raw=true)
86

9-
#v 2.4.0
10-
11-
Now you can overwrite default settings using props
7+
#New in version 3
128

9+
- Vue.js 3
10+
- Bootstrap 5
11+
- Bootstrap icons
1312

1413
##Installation
1514

@@ -23,90 +22,74 @@ $ npm install laravel-file-manager --save
2322
**IF** your App using Vuex store
2423

2524
```
25+
import { createApp } from 'vue';
26+
import { createStore } from 'vuex';
27+
28+
// Source main component
29+
import Main from './components/Main.vue';
2630
import FileManager from 'laravel-file-manager'
27-
import store from './path-to-your-store/store' // your Vuex store
31+
// your Vuex store
32+
import store from './path-to-your-store/store'
2833
29-
Vue.use(FileManager, {store})
34+
createApp(Main).use(store).use(FileManager, {store}).mount('#id');
3035
```
3136

3237
**ELSE** you need to create a new vuex instance
3338

3439
```
35-
import Vue from 'vue';
36-
import Vuex from 'vuex';
37-
import FileManager from 'laravel-file-manager'
40+
import { createApp } from 'vue';
41+
import { createStore } from 'vuex';
3842
39-
Vue.use(Vuex);
43+
// Source main component
44+
import Main from './components/Main.vue';
45+
import FileManager from 'laravel-file-manager'
4046
41-
//create Vuexstore, if you don't have it
42-
const store =new Vuex.Store();
47+
//Create a newstore instance.
48+
const store =createStore();
4349
44-
Vue.use(FileManager, {store});
50+
createApp(Main).use(store).use(FileManager, {store}).mount('#id');
4551
```
4652

4753
`The application store module will be registered under the name 'fm'`
4854

49-
You can overwrite some default settings
55+
Now vue component is registered and you can use it in your app
56+
```
57+
<file-manager></file-manager>
58+
```
59+
60+
###You can overwrite some default settings
5061

5162
```
5263
// In the new version 2.4.0 and higher
5364
<file-manager v-bind:settings="settings"></file-manager>
5465
5566
...
5667
// settings object structure
57-
settings: {
58-
// axios headers
59-
headers: {
60-
'X-Requested-With': 'XMLHttpRequest',
61-
Authorization: `Bearer ${window.localStorage.getItem('user-token')}`,
62-
},
63-
baseUrl: 'http://test.loc/file-manager/', // overwrite base url Axios
64-
windowsConfig: 2, // overwrite config
65-
lang: 'de', // set language
66-
translation: { // add new translation
67-
name: de,
68-
content: {
69-
about: 'Über',
70-
back: 'Zurück',
71-
... see lang file structure
68+
computed: {
69+
settings() {
70+
return {
71+
// axios headers
72+
headers: {
73+
'X-Requested-With': 'XMLHttpRequest',
74+
Authorization: `Bearer ${window.localStorage.getItem('user-token')}`,
75+
},
76+
baseUrl: 'http://test.loc/file-manager/', // overwrite base url Axios
77+
windowsConfig: 2, // overwrite config
78+
lang: 'de', // set language
79+
translation: { // add new translation
80+
name: de,
81+
content: {
82+
about: 'Über',
83+
back: 'Zurück',
84+
... see lang file structure
85+
},
86+
},
87+
};
7288
},
73-
},
74-
},
89+
}
7590
...
7691
77-
// Old versions
78-
Vue.use(FileManager, {
79-
store, // required
80-
81-
// not required params
82-
83-
headers: {
84-
'X-Requested-With': 'XMLHttpRequest',
85-
'Authorization': 'Bearer ...'
86-
},
87-
// default headers example
88-
headers: {
89-
'X-Requested-With': 'XMLHttpRequest',
90-
'X-CSRF-TOKEN': 'set laravel csrf token here...'
91-
},
92-
93-
baseUrl: 'http://my_url:80/file-manager/', // overwrite base url Axios
94-
windowsConfig: 2,
95-
lang: 'de', // set language
96-
translation: { // add new translation
97-
name: de,
98-
content: {
99-
about: 'Über',
100-
back: 'Zurück',
101-
... see lang file structure
102-
},
103-
},
104-
}
105-
```
10692
107-
Now vue component is registered and you can use it in your app
108-
```
109-
<file-manager></file-manager>
11093
```
11194

11295
##Available Props
@@ -121,25 +104,22 @@ Now vue component is registered and you can use it in your app
121104
| lang| String| 'de'| No| Set language|
122105
| translation| Object| { ... see lang file structure },| No| Add new translation|
123106

124-
##CSRF, Bootstrap,FontAwesome
107+
##CSRF, Bootstrap,Bootstrap icons
125108

126-
Don't forget add a csrf token to head block in your Laravel view and add bootstrap4 andfontawesome 5 styles
109+
Don't forgettoadd a csrf token to head block in your Laravel view and add bootstrap5 andbootstrap icons 5 styles
127110
```
128111
<!-- CSRF Token -->
129112
<meta name="csrf-token" content="{{ csrf_token() }}">
130113
<!-- Example -->
131-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css">
132-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
114+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css">
115+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
133116
```
134117

135-
You can use[environment variables](https://laravel.com/docs/mix#environment-variables)
136-
118+
[Laravel mix environment variables](https://laravel.com/docs/mix#environment-variables)
137119
```
138120
// set baseUrl
139121
MIX_LFM_BASE_URL=http://my-url.loc/file-manager/
140122
141123
// if you don't want to use csrf-token - you can off it
142124
MIX_LFM_CSRF_TOKEN=OFF
143125
```
144-
145-
Warning! Package use axios (Promise) - use babel-polyfill for ie11

‎babel.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<htmllang="en">
3+
<head>
4+
<metacharset="utf-8">
5+
<metaname="viewport"content="width=device-width, initial-scale=1">
6+
<linkrel="icon"href="/favicon.ico"/>
7+
<title>Laravel file manager</title>
8+
<!-- Bootstrap CSS -->
9+
<linkrel="stylesheet"href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css">
10+
<linkrel="stylesheet"href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
11+
</head>
12+
<body>
13+
<noscript>
14+
<strong>
15+
We're sorry but file-manager doesn't work properly without JavaScript enabled. Please enable it to continue.
16+
</strong>
17+
</noscript>
18+
19+
<divclass="container">
20+
<divid="fm"style="height: 700px"></div>
21+
</div>
22+
<scripttype="module"src="/src/main.js"></script>
23+
</body>
24+
</html>

‎jest.config.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp