Merge branch 'develop'

This commit is contained in:
syuilo
2019-04-15 12:23:20 +09:00
35 changed files with 295 additions and 99 deletions

View File

@@ -118,7 +118,6 @@ export default Vue.extend({
fileType: image,
excludeNsfw: !this.$store.state.device.alwaysShowNsfw,
limit: 9,
untilDate: new Date().getTime() + 1000 * 86400 * 365
}).then(notes => {
for (const note of notes) {
for (const file of note.files) {

View File

@@ -46,7 +46,6 @@ export default Vue.extend({
fileType: image,
excludeNsfw: !this.$store.state.device.alwaysShowNsfw,
limit: 9,
untilDate: new Date().getTime() + 1000 * 86400 * 365
}).then(notes => {
for (const note of notes) {
for (const file of note.files) {

View File

@@ -1,6 +1,6 @@
<template>
<mk-ui>
<b-card :header="$t('header')">
<b-card :header="$t('manage-apps')">
<b-button to="/app/new" variant="primary">{{ $t('create-app') }}</b-button>
<hr>
<div class="apps">

View File

@@ -1,35 +1,22 @@
<template>
<mk-ui>
<b-card :header="$t('header')">
<b-card :header="$t('new-app')">
<b-alert show variant="info"><fa icon="info-circle"/> {{ $t('new-app-info') }}</b-alert>
<b-form @submit.prevent="onSubmit" autocomplete="off">
<b-form-group :label="$t('app-name')" :description="$t('description')">
<b-form-input v-model="name" type="text" :placeholder="$t('placeholder')" autocomplete="off" required/>
<b-form-group :label="$t('app-name')" :description="$t('app-name-desc')">
<b-form-input v-model="name" type="text" :placeholder="$t('app-name-placeholder')" autocomplete="off" required/>
</b-form-group>
<b-form-group :label="$t('app-overview')" :description="$t('description')">
<b-textarea v-model="description" :placeholder="$t('placeholder')" autocomplete="off" required></b-textarea>
<b-form-group :label="$t('app-overview')" :description="$t('app-overview-desc')">
<b-textarea v-model="description" :placeholder="$t('app-overview-placeholder')" autocomplete="off" required></b-textarea>
</b-form-group>
<b-form-group :label="$t('callback-url')" :description="$t('description')">
<b-input v-model="cb" type="url" placeholder="ex) https://your.app.example.com/callback.php" autocomplete="off"/>
<b-form-group :label="$t('callback-url')" :description="$t('callback-url-desc')">
<b-input v-model="cb" type="url" :placeholder="$t('callback-url-placeholder')" autocomplete="off"/>
</b-form-group>
<b-card :header="$t('header')">
<b-form-group :description="$t('description')">
<b-card :header="$t('authority')">
<b-form-group :description="$t('authority-desc')">
<b-alert show variant="warning"><fa icon="exclamation-triangle"/> {{ $t('authority-warning') }}</b-alert>
<b-form-checkbox-group v-model="permission" stacked>
<b-form-checkbox value="read:account">{{ $t('read:account') }}</b-form-checkbox>
<b-form-checkbox value="write:account">{{ $t('write:account') }}</b-form-checkbox>
<b-form-checkbox value="write:notes">{{ $t('write:notes') }}</b-form-checkbox>
<b-form-checkbox value="read:reactions">{{ $t('read:reactions') }}</b-form-checkbox>
<b-form-checkbox value="write:reactions">{{ $t('write:reactions') }}</b-form-checkbox>
<b-form-checkbox value="read:following">{{ $t('read:following') }}</b-form-checkbox>
<b-form-checkbox value="write:following">{{ $t('write:following') }}</b-form-checkbox>
<b-form-checkbox value="read:mutes">{{ $t('read:mutes') }}</b-form-checkbox>
<b-form-checkbox value="write:mutes">{{ $t('write:mutes') }}</b-form-checkbox>
<b-form-checkbox value="read:blocks">{{ $t('read:blocks') }}</b-form-checkbox>
<b-form-checkbox value="write:blocks">{{ $t('write:blocks') }}</b-form-checkbox>
<b-form-checkbox value="read:drive">{{ $t('read:drive') }}</b-form-checkbox>
<b-form-checkbox value="write:drive">{{ $t('write:drive') }}</b-form-checkbox>
<b-form-checkbox value="read:notifications">{{ $t('read:notifications') }}</b-form-checkbox>
<b-form-checkbox value="write:notifications">{{ $t('write:notifications') }}</b-form-checkbox>
<b-form-checkbox v-for="v in permissionsList" :value="v" :key="v">{{ $t(`@.permissions.${v}`) }} ({{ v }})</b-form-checkbox>
</b-form-checkbox-group>
</b-form-group>
</b-card>
@@ -43,6 +30,8 @@
<script lang="ts">
import Vue from 'vue';
import i18n from '../../i18n';
import { kinds } from '../../../../server/api/kinds';
export default Vue.extend({
i18n: i18n('dev/views/new-app.vue'),
data() {
@@ -51,7 +40,8 @@ export default Vue.extend({
description: '',
cb: '',
nidState: null,
permission: []
permission: [],
permissionsList: kinds
};
},
methods: {

View File

@@ -39,7 +39,7 @@
<span :data-active="src == 'messages'" @click="src = 'messages'"><fa :icon="['far', 'envelope']"/> {{ $t('messages') }}<i class="badge" v-if="$store.state.i.hasUnreadSpecifiedNotes"><fa icon="circle"/></i></span>
<template v-if="lists">
<div class="hr" v-if="lists.length > 0"></div>
<span v-for="l in lists" :data-active="src == 'list' && list == l" @click="src = 'list'; list = l" :key="l.id"><fa icon="list"/> {{ l.title }}</span>
<span v-for="l in lists" :data-active="src == 'list' && list == l" @click="src = 'list'; list = l" :key="l.id"><fa icon="list"/> {{ l.name }}</span>
</template>
<div class="hr" v-if="$store.state.settings.tagTimelines && $store.state.settings.tagTimelines.length > 0"></div>
<span v-for="tl in $store.state.settings.tagTimelines" :data-active="src == 'tag' && tagTl == tl" @click="src = 'tag'; tagTl = tl" :key="tl.id"><fa icon="hashtag"/> {{ tl.title }}</span>

View File

@@ -23,7 +23,6 @@ export default Vue.extend({
mounted() {
this.$root.api('users/notes', {
userId: this.user.id,
untilDate: new Date().getTime() + 1000 * 86400 * 365
}).then(notes => {
this.notes = notes;
this.fetching = false;

View File

@@ -37,7 +37,6 @@ export default Vue.extend({
fileType: image,
excludeNsfw: !this.$store.state.device.alwaysShowNsfw,
limit: 9,
untilDate: new Date().getTime() + 1000 * 86400 * 365
}).then(notes => {
for (const note of notes) {
for (const file of note.files) {