@@ -48,7 +48,7 @@ import MkInput from '@/components/MkInput.vue';
48
48
import MkSelect from '@/components/MkSelect.vue';
49
49
import { useRouter } from '@/router/supplier.js';
50
50
51
- const PRESET_DEFAULT = `/// @ 0.16 .0
51
+ const PRESET_DEFAULT = `/// @ 0.18 .0
52
52
53
53
var name = ""
54
54
@@ -60,13 +60,13 @@ Ui:render([
60
60
Ui:C:button({
61
61
text: "Hello"
62
62
onClick: @() {
63
- Mk:dialog(null \`Hello, {name}!\`)
63
+ Mk:dialog(null, \`Hello, {name}!\`)
64
64
}
65
65
})
66
66
])
67
67
`;
68
68
69
- const PRESET_OMIKUJI = `/// @ 0.16 .0
69
+ const PRESET_OMIKUJI = `/// @ 0.18 .0
70
70
// ユーザーごとに日替わりのおみくじのプリセット
71
71
72
72
// 選択肢
@@ -81,11 +81,11 @@ let choices = [
81
81
"大凶"
82
82
]
83
83
84
- // シードが「ユーザーID+今日の日付」である乱数生成器を用意
85
- let random = Math:gen_rng(\`{USER_ID}{Date:year()}{Date:month()}{Date:day()}\`)
84
+ // シードが「PlayID+ ユーザーID+今日の日付」である乱数生成器を用意
85
+ let random = Math:gen_rng(\`{THIS_ID}{ USER_ID}{Date:year()}{Date:month()}{Date:day()}\`)
86
86
87
87
// ランダムに選択肢を選ぶ
88
- let chosen = choices[random(0 (choices.len - 1))]
88
+ let chosen = choices[random(0, (choices.len - 1))]
89
89
90
90
// 結果のテキスト
91
91
let result = \`今日のあなたの運勢は **{chosen}** です。\`
@@ -109,7 +109,7 @@ Ui:render([
109
109
])
110
110
`;
111
111
112
- const PRESET_SHUFFLE = `/// @ 0.16 .0
112
+ const PRESET_SHUFFLE = `/// @ 0.18 .0
113
113
// 巻き戻し可能な文字シャッフルのプリセット
114
114
115
115
let string = "ペペロンチーノ"
@@ -123,13 +123,13 @@ var cursor = 0
123
123
124
124
@do() {
125
125
if (cursor != 0) {
126
- results = results.slice(0 (cursor + 1))
126
+ results = results.slice(0, (cursor + 1))
127
127
cursor = 0
128
128
}
129
129
130
130
let chars = []
131
131
for (let i, length) {
132
- let r = Math:rnd(0 (length - 1))
132
+ let r = Math:rnd(0, (length - 1))
133
133
chars.push(string.pick(r))
134
134
}
135
135
let result = chars.join("")
@@ -188,27 +188,27 @@ var cursor = 0
188
188
do()
189
189
`;
190
190
191
- const PRESET_QUIZ = `/// @ 0.16 .0
191
+ const PRESET_QUIZ = `/// @ 0.18 .0
192
192
let title = '地理クイズ'
193
193
194
194
let qas = [{
195
195
q: 'オーストラリアの首都は?'
196
- choices: ['シドニー' 'キャンベラ' 'メルボルン']
196
+ choices: ['シドニー', 'キャンベラ', 'メルボルン']
197
197
a: 'キャンベラ'
198
198
aDescription: '最大の都市はシドニーですが首都はキャンベラです。'
199
199
} {
200
200
q: '国土面積2番目の国は?'
201
- choices: ['カナダ' 'アメリカ' '中国']
201
+ choices: ['カナダ', 'アメリカ', '中国']
202
202
a: 'カナダ'
203
203
aDescription: '大きい順にロシア、カナダ、アメリカ、中国です。'
204
204
} {
205
205
q: '二重内陸国ではないのは?'
206
- choices: ['リヒテンシュタイン' 'ウズベキスタン' 'レソト']
206
+ choices: ['リヒテンシュタイン', 'ウズベキスタン', 'レソト']
207
207
a: 'レソト'
208
208
aDescription: 'レソトは(一重)内陸国です。'
209
209
} {
210
210
q: '閘門がない運河は?'
211
- choices: ['キール運河' 'スエズ運河' 'パナマ運河']
211
+ choices: ['キール運河', 'スエズ運河', 'パナマ運河']
212
212
a: 'スエズ運河'
213
213
aDescription: 'スエズ運河は高低差がないので閘門はありません。'
214
214
}]
@@ -296,12 +296,12 @@ qaEls.push(Ui:C:container({
296
296
onClick: finish
297
297
})
298
298
]
299
- } 'footer'))
299
+ }, 'footer'))
300
300
301
301
Ui:render(qaEls)
302
302
`;
303
303
304
- const PRESET_TIMELINE = `/// @ 0.16 .0
304
+ const PRESET_TIMELINE = `/// @ 0.18 .0
305
305
// APIリクエストを行いローカルタイムラインを表示するプリセット
306
306
307
307
@fetch() {
@@ -315,7 +315,7 @@ const PRESET_TIMELINE = `/// @ 0.16.0
315
315
])
316
316
317
317
// タイムライン取得
318
- let notes = Mk:api("notes/local-timeline" {})
318
+ let notes = Mk:api("notes/local-timeline", {})
319
319
320
320
// それぞれのノートごとにUI要素作成
321
321
let noteEls = []
0 commit comments