mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
✌️
This commit is contained in:
parent
3df4daee91
commit
77d5720dc5
@ -26,7 +26,7 @@ module.exports = (me) ~>
|
|||||||
]
|
]
|
||||||
|
|
||||||
riot.mixin \input-dialog do
|
riot.mixin \input-dialog do
|
||||||
input-dialog: require './scripts/input-dialog.ls'
|
input-dialog: require './scripts/input-dialog'
|
||||||
|
|
||||||
riot.mixin \update-avatar do
|
riot.mixin \update-avatar do
|
||||||
update-avatar: require './scripts/update-avatar.ls'
|
update-avatar: require './scripts/update-avatar.ls'
|
||||||
|
12
src/web/app/desktop/scripts/input-dialog.js
Normal file
12
src/web/app/desktop/scripts/input-dialog.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
const riot = require('riot');
|
||||||
|
|
||||||
|
module.exports = (title, placeholder, defaultValue, onOk, onCancel) => {
|
||||||
|
const dialog = document.body.appendChild(document.createElement('mk-input-dialog'));
|
||||||
|
return riot.mount(dialog, {
|
||||||
|
title: title,
|
||||||
|
placeholder: placeholder,
|
||||||
|
'default': defaultValue,
|
||||||
|
onOk: onOk,
|
||||||
|
onCancel: onCancel
|
||||||
|
});
|
||||||
|
};
|
@ -1,13 +0,0 @@
|
|||||||
# Input Dialog
|
|
||||||
#================================
|
|
||||||
|
|
||||||
riot = require 'riot'
|
|
||||||
|
|
||||||
module.exports = (title, placeholder, default-value, on-ok, on-cancel) ~>
|
|
||||||
dialog = document.body.append-child document.create-element \mk-input-dialog
|
|
||||||
riot.mount dialog, do
|
|
||||||
title: title
|
|
||||||
placeholder: placeholder
|
|
||||||
default: default-value
|
|
||||||
on-ok: on-ok
|
|
||||||
on-cancel: on-cancel
|
|
Loading…
Reference in New Issue
Block a user