Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
EbiseLutica committed Aug 22, 2020
2 parents c14fe10 + 53be465 commit a16e3b2
Show file tree
Hide file tree
Showing 17 changed files with 255 additions and 196 deletions.
16 changes: 16 additions & 0 deletions migration/1597893996136-ChannelNoteIdDescIndex.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {MigrationInterface, QueryRunner} from "typeorm";

export class ChannelNoteIdDescIndex1597893996136 implements MigrationInterface {
name = 'ChannelNoteIdDescIndex1597893996136'

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP INDEX "IDX_f22169eb10657bded6d875ac8f"`);
await queryRunner.query(`CREATE INDEX "IDX_note_on_channelId_and_id_desc" ON "note" ("channelId", "id" desc)`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP INDEX "IDX_note_on_channelId_and_id_desc"`);
await queryRunner.query(`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId") `);
}

}
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"contributors": [
"syuilo <syuilotan@yahoo.co.jp>"
],
"version": "12.47.0-gp-3.16.0",
"version": "12.47.1-gp-3.16.1",
"codename": "reunion",
"repository": {
"type": "git",
Expand Down Expand Up @@ -120,7 +120,7 @@
"aws-sdk": "2.724.0",
"bcryptjs": "2.4.3",
"blurhash": "1.1.3",
"bull": "3.16.0",
"bull": "3.18.0",
"cafy": "15.2.1",
"cbor": "5.1.0",
"chalk": "4.1.0",
Expand Down Expand Up @@ -165,7 +165,7 @@
"is-root": "2.1.0",
"is-svg": "4.2.1",
"js-yaml": "3.14.0",
"jsdom": "16.3.0",
"jsdom": "16.4.0",
"json5": "2.1.3",
"json5-loader": "4.0.0",
"jsonld": "3.1.1",
Expand Down Expand Up @@ -196,7 +196,7 @@
"os-utils": "0.0.14",
"parse5": "6.0.1",
"parsimmon": "1.15.0",
"pg": "8.3.0",
"pg": "8.3.2",
"portal-vue": "2.1.7",
"portscanner": "2.2.0",
"postcss-loader": "3.0.0",
Expand All @@ -206,7 +206,7 @@
"promise-sequential": "1.1.1",
"pug": "2.0.4",
"punycode": "2.1.1",
"pureimage": "0.2.4",
"pureimage": "0.2.5",
"qrcode": "1.4.4",
"random-seed": "0.3.0",
"ratelimiter": "3.4.1",
Expand All @@ -232,44 +232,44 @@
"style-loader": "1.2.1",
"summaly": "2.4.0",
"syslog-pro": "1.0.0",
"systeminformation": "4.26.10",
"systeminformation": "4.26.12",
"syuilo-password-strength": "0.0.1",
"textarea-caret": "3.1.0",
"three": "0.117.1",
"tinycolor2": "1.4.1",
"tmp": "0.2.1",
"ts-loader": "8.0.2",
"ts-node": "8.10.2",
"ts-node": "9.0.0",
"tslint": "6.1.3",
"tslint-sonarts": "1.9.0",
"typeorm": "0.2.25",
"typescript": "3.9.7",
"typescript": "4.0.2",
"ulid": "2.3.0",
"url-loader": "4.1.0",
"uuid": "8.3.0",
"v-animate-css": "0.0.3",
"v-debounce": "0.1.2",
"vue": "2.6.11",
"vue": "2.6.12",
"vue-color": "2.7.1",
"vue-content-loading": "1.6.0",
"vue-cropperjs": "4.1.0",
"vue-i18n": "8.20.0",
"vue-i18n": "8.21.0",
"vue-json-pretty": "1.6.7",
"vue-loader": "15.9.3",
"vue-marquee-text-component": "1.1.1",
"vue-meta": "2.4.0",
"vue-prism-component": "1.2.0",
"vue-prism-editor": "0.6.1",
"vue-router": "3.4.2",
"vue-prism-editor": "1.2.2",
"vue-router": "3.4.3",
"vue-style-loader": "4.1.2",
"vue-svg-inline-loader-corejs3": "1.5.0",
"vue-template-compiler": "2.6.11",
"vue-template-compiler": "2.6.12",
"vue-video-player": "5.0.2",
"vuedraggable": "2.24.0",
"vuedraggable": "2.24.1",
"vuex": "3.5.1",
"vuex-persistedstate": "3.0.1",
"vuex-persistedstate": "3.1.0",
"web-push": "3.4.4",
"webpack": "git+https://github.com/webpack/webpack.git#c1237eae912817c7546e8c54489f7adb60bfbe38",
"webpack": "5.0.0-beta.28",
"webpack-cli": "3.3.12",
"websocket": "1.0.31",
"ws": "7.3.1",
Expand Down
1 change: 1 addition & 0 deletions src/client/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ export default Vue.extend({
&.dense {
left: 16px - 1px;
padding: 0;
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions src/client/components/deck/notifications-column.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ export default Vue.extend({
},
created() {
if (this.column.notificationType == null) {
this.column.notificationType = 'all';
this.$store.commit('deviceUser/updateDeckColumn', this.column);
}
this.menu = [{
icon: faCog,
text: this.$t('notificationSetting'),
Expand Down
4 changes: 2 additions & 2 deletions src/client/components/note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -918,8 +918,8 @@ export default Vue.extend({
<style lang="scss" scoped>
@mixin ticker($bg, $fg) {
// background: linear-gradient(90deg, $bg, transparent);
background: $bg;
background: linear-gradient(90deg, $bg, transparent);
// background: $bg;
color: $fg;
}
Expand Down
12 changes: 7 additions & 5 deletions src/client/components/notification-setting-window.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
<x-window ref="window" :width="400" :height="450" :no-padding="true" @closed="() => { $emit('closed'); destroyDom(); }" :with-ok-button="true" :ok-button-disabled="false" @ok="ok()">
<template #header>{{ $t('notificationSetting') }}</template>
<div class="vv94n3oa">
<mk-switch v-if="showGlobalToggle" v-model="useGlobalSetting">
{{ $t('useGlobalSetting') }}
<template #desc>{{ $t('useGlobalSettingDesc') }}</template>
</mk-switch>
<div v-if="showGlobalToggle">
<mk-switch v-model="useGlobalSetting">
{{ $t('useGlobalSetting') }}
<template #desc>{{ $t('useGlobalSettingDesc') }}</template>
</mk-switch>
</div>
<div v-if="!useGlobalSetting">
<mk-info>{{ $t('notificationSettingDesc') }}</mk-info>
<mk-button inline @click="disableAll">{{ $t('disableAll') }}</mk-button>
Expand Down Expand Up @@ -34,7 +36,7 @@ export default Vue.extend({
props: {
includingTypes: {
// todo これで型に合わないものを弾いてくれるのかどうか要調査
// TODO: これで型に合わないものを弾いてくれるのかどうか要調査
type: Array as PropType<typeof notificationTypes[number][]>,
required: false,
default: null,
Expand Down
7 changes: 3 additions & 4 deletions src/client/pages/index.home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,15 @@ export default Vue.extend({
indicate: antenna.hasUnreadNote,
action: () => {
this.antenna = antenna;
this.src = 'antenna';
this.saveSrc();
this.setSrc('antenna');
}
}));
const listItems = lists.map(list => ({
text: list.name,
icon: faListUl,
action: () => {
this.list = list;
this.src = 'list';
this.saveSrc();
this.setSrc('list');
}
}));
const channelItems = channels.map(channel => ({
Expand Down Expand Up @@ -291,6 +289,7 @@ export default Vue.extend({
setSrc(src: string) {
this.src = src;
this.saveSrc();
},
saveSrc() {
Expand Down
3 changes: 2 additions & 1 deletion src/client/pages/my-settings/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
</div>
<div class="_content">
<mk-button @click="configure">{{ $t('notificationSetting') }}</mk-button>
</div>
<div class="_content">
<div>{{ $t('stealingRule') }}</div>
<mk-select v-model="stealRule">
<option :value="0">{{ $t('_steal.textOnly') }}</option>
Expand All @@ -37,7 +39,6 @@
<mfm :text="$store.state.settings.stealReaction" :plain="true" />&nbsp;
{{ $t('chooseReaction') }}
</mk-button>
<mk-button @click="configure">{{ $t('notificationSetting') }}</mk-button>
</div>
</section>

Expand Down
16 changes: 12 additions & 4 deletions src/client/pages/page-editor/page-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<mk-container :body-togglable="true" :expanded="true">
<template #header><fa :icon="faCode"/> {{ $t('script') }}</template>
<div>
<prism-editor v-model="script" :line-numbers="false" language="js"/>
<prism-editor class="_code" v-model="script" :highlight="highlighter" :line-numbers="false"/>
</div>
</mk-container>
</div>
Expand All @@ -85,9 +85,13 @@
<script lang="ts">
import Vue from 'vue';
import * as XDraggable from 'vuedraggable';
import "prismjs";
import 'prismjs';
import { highlight, languages } from 'prismjs/components/prism-core';
import 'prismjs/components/prism-clike';
import 'prismjs/components/prism-javascript';
import 'prismjs/themes/prism-okaidia.css';
import PrismEditor from 'vue-prism-editor';
import { PrismEditor } from 'vue-prism-editor';
import 'vue-prism-editor/dist/prismeditor.min.css';
import { faICursor, faPlus, faMagic, faCog, faCode, faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
import { faSave, faStickyNote, faTrashAlt } from '@fortawesome/free-regular-svg-icons';
import { v4 as uuid } from 'uuid';
Expand Down Expand Up @@ -416,7 +420,11 @@ export default Vue.extend({
removeEyeCatchingImage() {
this.eyeCatchingImageId = null;
}
},
highlighter(code) {
return highlight(code, languages.js, 'javascript');
},
}
});
</script>
Expand Down
16 changes: 12 additions & 4 deletions src/client/pages/scratchpad.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<portal to="title">{{ $t('scratchpad') }}</portal>

<div class="_panel">
<prism-editor v-model="code" :line-numbers="false" language="js"/>
<prism-editor class="_code" v-model="code" :highlight="highlighter" :line-numbers="false"/>
<mk-button style="position: absolute; top: 8px; right: 8px;" @click="run()" primary><fa :icon="faPlay"/></mk-button>
</div>

Expand All @@ -24,9 +24,13 @@
<script lang="ts">
import Vue from 'vue';
import { faTerminal, faPlay } from '@fortawesome/free-solid-svg-icons';
import "prismjs";
import 'prismjs';
import { highlight, languages } from 'prismjs/components/prism-core';
import 'prismjs/components/prism-clike';
import 'prismjs/components/prism-javascript';
import 'prismjs/themes/prism-okaidia.css';
import PrismEditor from 'vue-prism-editor';
import { PrismEditor } from 'vue-prism-editor';
import 'vue-prism-editor/dist/prismeditor.min.css';
import { AiScript, parse, utils, values } from '@syuilo/aiscript';
import MkContainer from '../components/ui/container.vue';
import MkButton from '../components/ui/button.vue';
Expand Down Expand Up @@ -119,7 +123,11 @@ export default Vue.extend({
text: e
});
}
}
},
highlighter(code) {
return highlight(code, languages.js, 'javascript');
},
}
});
</script>
Expand Down
5 changes: 5 additions & 0 deletions src/client/scripts/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export type FormItem = {
default: string | null;
hidden?: boolean;
enum: string[];
} | {
label?: string;
type: 'array';
default: unknown[] | null;
hidden?: boolean;
};

export type Form = Record<string, FormItem>;
1 change: 0 additions & 1 deletion src/client/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { AiScript, utils, values } from '@syuilo/aiscript';
import { apiUrl, deckmode } from './config';
import defaultFaces from './scripts/default-faces';
import { erase } from '../prelude/array';
import { notificationTypes } from '../types';

export const defaultSettings = {
tutorial: 0,
Expand Down
13 changes: 13 additions & 0 deletions src/client/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,19 @@ hr {
opacity: 0.7;
}

._code {
background: #2d2d2d;
color: #ccc;
font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace;
font-size: 14px;
line-height: 1.5;
padding: 5px;
}

.prism-editor__textarea:focus {
outline: none;
}

.zoom-enter-active, .zoom-leave-active {
transition: opacity 0.5s, transform 0.5s !important;
}
Expand Down
13 changes: 5 additions & 8 deletions src/client/widgets/notifications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ export default define({
type: 'number',
default: 300,
},
includingTypes: {
type: 'array',
hidden: true,
default: null,
},
})
}).extend({
components: {
Expand All @@ -39,14 +44,6 @@ export default define({
};
},
created() {
// しないと初期設定から変更したときに限りリロードされない
if (this.props.includingTypes === undefined) {
this.$set(this.props, 'includingTypes', null);
this.save();
}
},
methods: {
async configure() {
this.$root.new(await import('../components/notification-setting-window.vue').then(m => m.default), {
Expand Down
2 changes: 2 additions & 0 deletions src/server/api/openapi/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { packedHashtagSchema } from '../../../models/repositories/hashtag';
import { packedPageSchema } from '../../../models/repositories/page';
import { packedUserGroupSchema } from '../../../models/repositories/user-group';
import { packedNoteFavoriteSchema } from '../../../models/repositories/note-favorite';
import { packedChannelSchema } from '../../../models/repositories/channel';

export function convertSchemaToOpenApiSchema(schema: Schema) {
const res: any = schema;
Expand Down Expand Up @@ -82,4 +83,5 @@ export const schemas = {
Blocking: convertSchemaToOpenApiSchema(packedBlockingSchema),
Hashtag: convertSchemaToOpenApiSchema(packedHashtagSchema),
Page: convertSchemaToOpenApiSchema(packedPageSchema),
Channel: convertSchemaToOpenApiSchema(packedChannelSchema),
};
Loading

0 comments on commit a16e3b2

Please sign in to comment.