mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
Merge branch 'develop'
This commit is contained in:
commit
f9ecefb709
@ -138,3 +138,6 @@ drive:
|
||||
|
||||
# Clustering
|
||||
# clusterLimit: 1
|
||||
|
||||
# Summaly proxy
|
||||
# summalyProxy: "http://example.com"
|
||||
|
@ -732,6 +732,7 @@ desktop/views/components/settings.vue:
|
||||
gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-clock-on-header: "右上に時計を表示する"
|
||||
show-reply-target: "リプライ先を表示する"
|
||||
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"version": "8.13.0",
|
||||
"clientVersion": "1.0.9001",
|
||||
"version": "8.14.0",
|
||||
"clientVersion": "1.0.9022",
|
||||
"codename": "nighthike",
|
||||
"main": "./built/index.js",
|
||||
"private": true,
|
||||
|
@ -26,8 +26,8 @@ export default Vue.extend({
|
||||
},
|
||||
created() {
|
||||
(this as any).os.getMeta().then(meta => {
|
||||
if (meta.repositoryUrl) this.repositoryUrl = meta.repositoryUrl;
|
||||
if (meta.feedbackUrl) this.feedbackUrl = meta.feedbackUrl;
|
||||
if (meta.maintainer.repository_url) this.repositoryUrl = meta.maintainer.repository_url;
|
||||
if (meta.maintainer.feedback_url) this.feedbackUrl = meta.maintainer.feedback_url;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -49,6 +49,7 @@
|
||||
</div>
|
||||
<mk-switch v-model="$store.state.settings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="%i18n:@post-form-on-timeline%"/>
|
||||
<mk-switch v-model="$store.state.settings.suggestRecentHashtags" @change="onChangeSuggestRecentHashtags" text="%i18n:@suggest-recent-hashtags%"/>
|
||||
<mk-switch v-model="$store.state.settings.showClockOnHeader" @change="onChangeShowClockOnHeader" text="%i18n:@show-clock-on-header%"/>
|
||||
<mk-switch v-model="$store.state.settings.showReplyTarget" @change="onChangeShowReplyTarget" text="%i18n:@show-reply-target%"/>
|
||||
<mk-switch v-model="$store.state.settings.showMyRenotes" @change="onChangeShowMyRenotes" text="%i18n:@show-my-renotes%"/>
|
||||
<mk-switch v-model="$store.state.settings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes" text="%i18n:@show-renoted-my-notes%"/>
|
||||
@ -333,6 +334,12 @@ export default Vue.extend({
|
||||
value: v
|
||||
});
|
||||
},
|
||||
onChangeShowClockOnHeader(v) {
|
||||
this.$store.dispatch('settings/set', {
|
||||
key: 'showClockOnHeader',
|
||||
value: v
|
||||
});
|
||||
},
|
||||
onChangeShowReplyTarget(v) {
|
||||
this.$store.dispatch('settings/set', {
|
||||
key: 'showReplyTarget',
|
||||
|
@ -17,7 +17,7 @@
|
||||
<x-account v-if="$store.getters.isSignedIn"/>
|
||||
<x-notifications v-if="$store.getters.isSignedIn"/>
|
||||
<x-post v-if="$store.getters.isSignedIn"/>
|
||||
<x-clock/>
|
||||
<x-clock v-if="$store.state.settings.showClockOnHeader"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -48,7 +48,7 @@ export default Vue.extend({
|
||||
this.open();
|
||||
});
|
||||
} else {
|
||||
const query = this.user[0] == '@' ?
|
||||
const query = this.user.startsWith('@') ?
|
||||
parseAcct(this.user.substr(1)) :
|
||||
{ userId: this.user };
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
<div v-if="stats" class="stats">
|
||||
<div><b>%fa:user% {{ stats.originalUsersCount | number }}</b><span>%i18n:@original-users%</span></div>
|
||||
<div><span>%fa:user% {{ stats.usersCount | number }}</span><span>%i18n:@all-users%</span></div>
|
||||
<div><b>%fa:pen% {{ stats.originalNotesCount | number }}</b><span>%i18n:@original-notes%</span></div>
|
||||
<div><span>%fa:pen% {{ stats.notesCount | number }}</span><span>%i18n:@all-notes%</span></div>
|
||||
<div><b>%fa:pencil-alt% {{ stats.originalNotesCount | number }}</b><span>%i18n:@original-notes%</span></div>
|
||||
<div><span>%fa:pencil-alt% {{ stats.notesCount | number }}</span><span>%i18n:@all-notes%</span></div>
|
||||
</div>
|
||||
<div class="cpu-memory">
|
||||
<x-cpu-memory :connection="connection"/>
|
||||
|
@ -16,7 +16,7 @@ import Vue from 'vue';
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
name: (this as any).os.instanceName,
|
||||
name: null,
|
||||
posted: false,
|
||||
text: new URLSearchParams(location.search).get('text')
|
||||
};
|
||||
@ -25,6 +25,11 @@ export default Vue.extend({
|
||||
close() {
|
||||
window.close();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
(this as any).os.getMeta().then(meta => {
|
||||
this.name = meta.name;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -3,8 +3,8 @@
|
||||
<div v-if="stats" class="stats">
|
||||
<div><b>%fa:user% {{ stats.originalUsersCount | number }}</b><span>%i18n:@original-users%</span></div>
|
||||
<div><span>%fa:user% {{ stats.usersCount | number }}</span><span>%i18n:@all-users%</span></div>
|
||||
<div><b>%fa:pen% {{ stats.originalNotesCount | number }}</b><span>%i18n:@original-notes%</span></div>
|
||||
<div><span>%fa:pen% {{ stats.notesCount | number }}</span><span>%i18n:@all-notes%</span></div>
|
||||
<div><b>%fa:pencil-alt% {{ stats.originalNotesCount | number }}</b><span>%i18n:@original-notes%</span></div>
|
||||
<div><span>%fa:pencil-alt% {{ stats.notesCount | number }}</span><span>%i18n:@all-notes%</span></div>
|
||||
</div>
|
||||
<div>
|
||||
<x-charts/>
|
||||
|
@ -16,7 +16,7 @@ import Vue from 'vue';
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
name: (this as any).os.instanceName,
|
||||
name: null,
|
||||
posted: false,
|
||||
text: new URLSearchParams(location.search).get('text')
|
||||
};
|
||||
@ -25,6 +25,11 @@ export default Vue.extend({
|
||||
close() {
|
||||
window.close();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
(this as any).os.getMeta().then(meta => {
|
||||
this.name = meta.name;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -13,6 +13,7 @@ const defaultSettings = {
|
||||
showMaps: true,
|
||||
showPostFormOnTopOfTl: false,
|
||||
suggestRecentHashtags: true,
|
||||
showClockOnHeader: false,
|
||||
circleIcons: true,
|
||||
gradientWindowHeader: false,
|
||||
showReplyTarget: true,
|
||||
|
@ -62,6 +62,8 @@ export type Source = {
|
||||
*/
|
||||
ghost?: string;
|
||||
|
||||
summalyProxy?: string;
|
||||
|
||||
accesslog?: string;
|
||||
twitter?: {
|
||||
consumer_key: string;
|
||||
|
@ -197,7 +197,7 @@ const elements: Element[] = [
|
||||
|
||||
if (thisIsNotARegexp) return null;
|
||||
if (regexp == '') return null;
|
||||
if (regexp[0] == ' ' && regexp[regexp.length - 1] == ' ') return null;
|
||||
if (regexp.startsWith(' ') && regexp.endsWith(' ')) return null;
|
||||
|
||||
return {
|
||||
html: `<span class="regexp">/${escape(regexp)}/</span>`,
|
||||
|
@ -10,7 +10,7 @@ export type TextElementHashtag = {
|
||||
|
||||
export default function(text: string, i: number) {
|
||||
if (!(/^\s#[^\s]+/.test(text) || (i == 0 && /^#[^\s]+/.test(text)))) return null;
|
||||
const isHead = text[0] == '#';
|
||||
const isHead = text.startsWith('#');
|
||||
const hashtag = text.match(/^\s?#[^\s]+/)[0];
|
||||
const res: any[] = !isHead ? [{
|
||||
type: 'text',
|
||||
|
@ -13,7 +13,7 @@ export type TextElementLink = {
|
||||
export default function(text: string) {
|
||||
const match = text.match(/^\??\[([^\[\]]+?)\]\((https?:\/\/[\w\/:%#@\$&\?!\(\)\[\]~\.=\+\-]+?)\)/);
|
||||
if (!match) return null;
|
||||
const silent = text[0] == '?';
|
||||
const silent = text.startsWith('?');
|
||||
const link = match[0];
|
||||
const title = match[1];
|
||||
const url = match[2];
|
||||
|
@ -25,9 +25,9 @@ export const replacement = (match: string, key: string) => {
|
||||
arg == 'S' ? 'fas' :
|
||||
arg == 'B' ? 'fab' :
|
||||
'';
|
||||
} else if (arg[0] == '.') {
|
||||
} else if (arg.startsWith('.')) {
|
||||
classes.push('fa-' + arg.substr(1));
|
||||
} else if (arg[0] == '-') {
|
||||
} else if (arg.startsWith('-')) {
|
||||
transform = arg.substr(1).split('|').join(' ');
|
||||
} else {
|
||||
name = arg;
|
||||
|
@ -46,7 +46,7 @@ export default async (job: bq.Job, done: any): Promise<void> => {
|
||||
|
||||
// アクティビティを送信してきたユーザーがまだMisskeyサーバーに登録されていなかったら登録する
|
||||
if (user === null) {
|
||||
user = await resolvePerson(signature.keyId) as IRemoteUser;
|
||||
user = await resolvePerson(activity.actor) as IRemoteUser;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
export default (token: string) => token[0] == '!';
|
||||
export default (token: string) => token.startsWith('!');
|
||||
|
@ -1,11 +1,20 @@
|
||||
import * as Koa from 'koa';
|
||||
import * as request from 'request-promise-native';
|
||||
import summaly from 'summaly';
|
||||
import config from '../../config';
|
||||
|
||||
module.exports = async (ctx: Koa.Context) => {
|
||||
try {
|
||||
const summary = await summaly(ctx.query.url, {
|
||||
const summary = config.summalyProxy ? await request.get({
|
||||
url: config.summalyProxy,
|
||||
qs: {
|
||||
url: ctx.query.url
|
||||
},
|
||||
json: true
|
||||
}) : await summaly(ctx.query.url, {
|
||||
followRedirects: false
|
||||
});
|
||||
|
||||
summary.icon = wrap(summary.icon);
|
||||
summary.thumbnail = wrap(summary.thumbnail);
|
||||
|
||||
|
@ -8,7 +8,7 @@ export const replacement = (ctx: any, _: any, key: string) => {
|
||||
const client = '/src/client/app/';
|
||||
let name = null;
|
||||
|
||||
if (key[0] == '@') {
|
||||
if (key.startsWith('@')) {
|
||||
name = ctx.src.substr(ctx.src.indexOf(client) + client.length);
|
||||
key = key.substr(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user