Compare commits

..

12 Commits

Author SHA1 Message Date
syuilo
1d70b33894 12.34.0 2020-04-17 22:31:21 +09:00
syuilo
44ea1be930 chore(client): 🎨 2020-04-17 20:36:51 +09:00
syuilo
a1bf54fe16 chore(client): 🎨 2020-04-17 20:30:12 +09:00
syuilo
88c57359b3 New Crowdin translations (#6268)
* New translations ja-JP.yml (German)

* New translations ja-JP.yml (German)
2020-04-17 20:26:16 +09:00
syuilo
050564f717 chore: Update dep 2020-04-17 20:25:26 +09:00
syuilo
75d59a9c9b feat(pages): Add rect method 2020-04-17 15:51:36 +09:00
syuilo
9139c863bf feat(pages): Disable AiScript step limitation to improve usability 2020-04-17 15:51:25 +09:00
syuilo
84a1ec01bc 12.33.0 2020-04-16 23:23:07 +09:00
syuilo
36e59c5b5f chore: update deps 2020-04-16 23:20:34 +09:00
syuilo
5389b16c59 chore(client): 🎨 2020-04-16 23:13:33 +09:00
syuilo
da3008af1c fix(pages): AiScript変数があると型チェックができない問題を修正 2020-04-16 23:04:49 +09:00
syuilo
6637766554 feat(pages): Add arc method 2020-04-16 18:11:13 +09:00
13 changed files with 66 additions and 20 deletions

View File

@@ -1,6 +1,21 @@
ChangeLog ChangeLog
========= =========
12.34.0 (2020/4/17)
-------------------
### ✨Improvements
* Pagesでrectメソッドを追加
* AiScriptのバージョンアップ
12.33.0 (2020/4/16)
-------------------
### ✨Improvements
* Pagesで円を書くメソッドを追加
* AiScriptのバージョンアップ
### 🐛Fixes
* PagesでAiScript変数があると編集が機能しなくなる問題を修正
12.32.0 (2020/4/16) 12.32.0 (2020/4/16)
------------------- -------------------
### ✨Improvements ### ✨Improvements

View File

@@ -343,7 +343,7 @@ administrator: "Administrator"
token: "Token" token: "Token"
twoStepAuthentication: "Zwei-Faktor-Authentifizierung" twoStepAuthentication: "Zwei-Faktor-Authentifizierung"
moderator: "Moderator" moderator: "Moderator"
nUsersMentioned: "{n} Benutzer erwähnt" nUsersMentioned: "{n} Benutzer reden darüber"
securityKey: "Sicherheitsschlüssel" securityKey: "Sicherheitsschlüssel"
securityKeyName: "Schlüsselname" securityKeyName: "Schlüsselname"
registerSecurityKey: "Sicherheitsschlüssel registrieren" registerSecurityKey: "Sicherheitsschlüssel registrieren"
@@ -770,6 +770,11 @@ _pages:
name: "Variablenname" name: "Variablenname"
text: "Titel" text: "Titel"
default: "Standardwert" default: "Standardwert"
canvas: "Leinwand"
_canvas:
id: "Leinwand-ID"
width: "Breite"
height: "Höhe"
switch: "Fallunterscheidung" switch: "Fallunterscheidung"
_switch: _switch:
name: "Variablenname" name: "Variablenname"

View File

@@ -1,7 +1,7 @@
{ {
"name": "misskey", "name": "misskey",
"author": "syuilo <syuilotan@yahoo.co.jp>", "author": "syuilo <syuilotan@yahoo.co.jp>",
"version": "12.32.0", "version": "12.34.0",
"codename": "indigo", "codename": "indigo",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -42,7 +42,7 @@
"@koa/cors": "3.0.0", "@koa/cors": "3.0.0",
"@koa/multer": "2.0.2", "@koa/multer": "2.0.2",
"@koa/router": "8.0.8", "@koa/router": "8.0.8",
"@syuilo/aiscript": "0.3.0", "@syuilo/aiscript": "0.3.2",
"@types/bcryptjs": "2.4.2", "@types/bcryptjs": "2.4.2",
"@types/bull": "3.12.1", "@types/bull": "3.12.1",
"@types/cbor": "5.0.0", "@types/cbor": "5.0.0",

View File

@@ -157,6 +157,10 @@ export default Vue.extend({
&.reacted { &.reacted {
background: var(--accent); background: var(--accent);
&:hover {
background: var(--accent);
}
> span { > span {
color: #fff; color: #fff;
} }

View File

@@ -2,7 +2,7 @@
<x-container @remove="() => $emit('remove')" :draggable="true"> <x-container @remove="() => $emit('remove')" :draggable="true">
<template #header><fa :icon="faQuestion"/> {{ $t('_pages.blocks.if') }}</template> <template #header><fa :icon="faQuestion"/> {{ $t('_pages.blocks.if') }}</template>
<template #func> <template #func>
<button @click="add()"> <button @click="add()" class="_button">
<fa :icon="faPlus"/> <fa :icon="faPlus"/>
</button> </button>
</template> </template>

View File

@@ -2,10 +2,10 @@
<x-container @remove="() => $emit('remove')" :draggable="true"> <x-container @remove="() => $emit('remove')" :draggable="true">
<template #header><fa :icon="faStickyNote"/> {{ value.title }}</template> <template #header><fa :icon="faStickyNote"/> {{ value.title }}</template>
<template #func> <template #func>
<button @click="rename()"> <button @click="rename()" class="_button">
<fa :icon="faPencilAlt"/> <fa :icon="faPencilAlt"/>
</button> </button>
<button @click="add()"> <button @click="add()" class="_button">
<fa :icon="faPlus"/> <fa :icon="faPlus"/>
</button> </button>
</template> </template>

View File

@@ -18,7 +18,7 @@
</header> </header>
<p v-show="showBody" class="error" v-if="error != null">{{ $t('_pages.script.typeError', { slot: error.arg + 1, expect: $t(`script.types.${error.expect}`), actual: $t(`script.types.${error.actual}`) }) }}</p> <p v-show="showBody" class="error" v-if="error != null">{{ $t('_pages.script.typeError', { slot: error.arg + 1, expect: $t(`script.types.${error.expect}`), actual: $t(`script.types.${error.actual}`) }) }}</p>
<p v-show="showBody" class="warn" v-if="warn != null">{{ $t('_pages.script.thereIsEmptySlot', { slot: warn.slot + 1 }) }}</p> <p v-show="showBody" class="warn" v-if="warn != null">{{ $t('_pages.script.thereIsEmptySlot', { slot: warn.slot + 1 }) }}</p>
<div v-show="showBody"> <div v-show="showBody" class="body">
<slot></slot> <slot></slot>
</div> </div>
</div> </div>
@@ -148,5 +148,17 @@ export default Vue.extend({
padding: 16px 16px 0 16px; padding: 16px 16px 0 16px;
font-size: 14px; font-size: 14px;
} }
> .body {
::v-deep .juejbjww, ::v-deep .eiipwacr {
&:not(.inline):first-child {
margin-top: 28px;
}
&:not(.inline):last-child {
margin-bottom: 20px;
}
}
}
} }
</style> </style>

View File

@@ -86,7 +86,7 @@
import Vue from 'vue'; import Vue from 'vue';
import * as XDraggable from 'vuedraggable'; import * as XDraggable from 'vuedraggable';
import "prismjs"; import "prismjs";
import "prismjs/themes/prism.css"; import 'prismjs/themes/prism-okaidia.css';
import PrismEditor from 'vue-prism-editor'; import PrismEditor from 'vue-prism-editor';
import { faICursor, faPlus, faMagic, faCog, faCode, faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons'; import { faICursor, faPlus, faMagic, faCog, faCode, faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
import { faSave, faStickyNote, faTrashAlt } from '@fortawesome/free-regular-svg-icons'; import { faSave, faStickyNote, faTrashAlt } from '@fortawesome/free-regular-svg-icons';

View File

@@ -118,12 +118,20 @@ export default Vue.extend({
<style lang="scss" scoped> <style lang="scss" scoped>
.xcukqgmh { .xcukqgmh {
> ._card > .banner { > ._card {
> img { > .banner {
display: block; > img {
width: 100%; display: block;
height: 120px; width: 100%;
object-fit: cover; height: 120px;
object-fit: cover;
}
}
> ._footer {
> * {
margin: 0 0.5em;
}
} }
} }
} }

View File

@@ -25,7 +25,7 @@
import Vue from 'vue'; import Vue from 'vue';
import { faTerminal, faPlay } from '@fortawesome/free-solid-svg-icons'; import { faTerminal, faPlay } from '@fortawesome/free-solid-svg-icons';
import "prismjs"; import "prismjs";
import "prismjs/themes/prism.css"; import 'prismjs/themes/prism-okaidia.css';
import PrismEditor from 'vue-prism-editor'; import PrismEditor from 'vue-prism-editor';
import { AiScript, parse, utils, values } from '@syuilo/aiscript'; import { AiScript, parse, utils, values } from '@syuilo/aiscript';
import i18n from '../i18n'; import i18n from '../i18n';

View File

@@ -56,6 +56,8 @@ export class ASEvaluator {
['close_path', values.FN_NATIVE(() => { ctx.closePath() })], ['close_path', values.FN_NATIVE(() => { ctx.closePath() })],
['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value) })], ['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value) })],
['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value) })], ['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value) })],
['arc', values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { ctx.arc(x.value, y.value, radius.value, startAngle.value, endAngle.value) })],
['rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.rect(x.value, y.value, width.value, height.value) })],
['fill', values.FN_NATIVE(() => { ctx.fill() })], ['fill', values.FN_NATIVE(() => { ctx.fill() })],
['stroke', values.FN_NATIVE(() => { ctx.stroke() })], ['stroke', values.FN_NATIVE(() => { ctx.stroke() })],
])); ]));
@@ -76,7 +78,6 @@ export class ASEvaluator {
}, },
log: (type, params) => { log: (type, params) => {
}, },
maxStep: 16384
}); });
} }

View File

@@ -110,6 +110,7 @@ export class ASTypeChecker {
return null; return null;
} }
if (v.type === 'aiScriptVar') return null;
if (v.type === 'fn') return null; // todo if (v.type === 'fn') return null; // todo
if (v.type.startsWith('fn:')) return null; // todo if (v.type.startsWith('fn:')) return null; // todo

View File

@@ -144,10 +144,10 @@
dependencies: dependencies:
type-detect "4.0.8" type-detect "4.0.8"
"@syuilo/aiscript@0.3.0": "@syuilo/aiscript@0.3.2":
version "0.3.0" version "0.3.2"
resolved "https://registry.yarnpkg.com/@syuilo/aiscript/-/aiscript-0.3.0.tgz#cb0645df40ae97a54eb7e318abef2ccb8045aa14" resolved "https://registry.yarnpkg.com/@syuilo/aiscript/-/aiscript-0.3.2.tgz#c22f745ded968f24279fbce2d717a20db1e70359"
integrity sha512-jjtcFqnp5ryzAU3mxP25YJEJH/FmIrMycnFwSer/q1BVsAIqHOIhnRTWjxjVI3n1YHIO5DSD4yG/Em6I3bxJow== integrity sha512-fKA0dq7yKq2HpbDTjn61sbqMuD+ArD7J/HZXtL/0BHVWL6WnzXDbWOW/jxyABvEksmOsJbMf2LHmsikDwE612w==
dependencies: dependencies:
"@types/seedrandom" "2.4.28" "@types/seedrandom" "2.4.28"
autobind-decorator "2.4.0" autobind-decorator "2.4.0"