Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7687569
importer.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
importer.js
View Options
import
{
library
}
from
'@fortawesome/fontawesome-svg-core'
import
{
faCircleNotch
,
faTimes
}
from
'@fortawesome/free-solid-svg-icons'
library
.
add
(
faCircleNotch
,
faTimes
)
const
Importer
=
{
props
:
{
submitHandler
:
{
type
:
Function
,
required
:
true
},
submitButtonLabel
:
{
type
:
String
,
default
()
{
return
this
.
$t
(
'importer.submit'
)
}
},
successMessage
:
{
type
:
String
,
default
()
{
return
this
.
$t
(
'importer.success'
)
}
},
errorMessage
:
{
type
:
String
,
default
()
{
return
this
.
$t
(
'importer.error'
)
}
}
},
data
()
{
return
{
file
:
null
,
error
:
false
,
success
:
false
,
submitting
:
false
}
},
methods
:
{
change
()
{
this
.
file
=
this
.
$refs
.
input
.
files
[
0
]
},
submit
()
{
this
.
dismiss
()
this
.
submitting
=
true
this
.
submitHandler
(
this
.
file
)
.
then
(()
=>
{
this
.
success
=
true
})
.
catch
(()
=>
{
this
.
error
=
true
})
.
finally
(()
=>
{
this
.
submitting
=
false
})
},
dismiss
()
{
this
.
success
=
false
this
.
error
=
false
}
}
}
export
default
Importer
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 3, 10:11 PM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
439313
Default Alt Text
importer.js (1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment