Compare commits
	
		
			8 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					845be966a0 | ||
| 
						 | 
					80818d79eb | ||
| 
						 | 
					cb9b3c00dd | ||
| 
						 | 
					dbb7c756cd | ||
| 
						 | 
					13f381710c | ||
| 
						 | 
					70897c0e9a | ||
| 
						 | 
					f51d1c5264 | ||
| 
						 | 
					70d0937aab | 
@@ -124,6 +124,10 @@ common:
 | 
			
		||||
 | 
			
		||||
  do-not-use-in-production: 'これは開発ビルドです。本番環境で使用しないでください。'
 | 
			
		||||
 | 
			
		||||
  error:
 | 
			
		||||
    title: '問題が発生しました'
 | 
			
		||||
    retry: 'やり直す'
 | 
			
		||||
 | 
			
		||||
  reversi:
 | 
			
		||||
    drawn: "引き分け"
 | 
			
		||||
    my-turn: "あなたのターンです"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
{
 | 
			
		||||
	"name": "misskey",
 | 
			
		||||
	"author": "syuilo <i@syuilo.com>",
 | 
			
		||||
	"version": "10.27.0",
 | 
			
		||||
	"clientVersion": "1.0.10768",
 | 
			
		||||
	"version": "10.28.0",
 | 
			
		||||
	"clientVersion": "1.0.10776",
 | 
			
		||||
	"codename": "nighthike",
 | 
			
		||||
	"main": "./built/index.js",
 | 
			
		||||
	"private": true,
 | 
			
		||||
 
 | 
			
		||||
@@ -114,10 +114,9 @@ export default Vue.component('misskey-flavored-markdown', {
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				case 'mention': {
 | 
			
		||||
					return (createElement as any)('a', {
 | 
			
		||||
					return (createElement as any)('router-link', {
 | 
			
		||||
						attrs: {
 | 
			
		||||
							href: `${url}/${token.canonical}`,
 | 
			
		||||
							target: '_blank',
 | 
			
		||||
							to: `/${token.canonical}`,
 | 
			
		||||
							dataIsMe: (this as any).i && getAcct((this as any).i) == getAcct(token),
 | 
			
		||||
							style: 'color:var(--mfmMention);'
 | 
			
		||||
						},
 | 
			
		||||
@@ -129,10 +128,9 @@ export default Vue.component('misskey-flavored-markdown', {
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				case 'hashtag': {
 | 
			
		||||
					return [createElement('a', {
 | 
			
		||||
					return [createElement('router-link', {
 | 
			
		||||
						attrs: {
 | 
			
		||||
							href: `${url}/tags/${encodeURIComponent(token.hashtag)}`,
 | 
			
		||||
							target: '_blank',
 | 
			
		||||
							to: `/tags/${encodeURIComponent(token.hashtag)}`,
 | 
			
		||||
							style: 'color:var(--mfmHashtag);'
 | 
			
		||||
						}
 | 
			
		||||
					}, token.content)];
 | 
			
		||||
 
 | 
			
		||||
@@ -4,9 +4,9 @@
 | 
			
		||||
 | 
			
		||||
	<slot name="empty" v-if="notes.length == 0 && !fetching && requestInitPromise == null"></slot>
 | 
			
		||||
 | 
			
		||||
	<div v-if="!fetching && requestInitPromise != null">
 | 
			
		||||
		<p>%i18n:@error%</p>
 | 
			
		||||
		<button @click="resolveInitPromise">%i18n:@retry%</button>
 | 
			
		||||
	<div v-if="!fetching && requestInitPromise != null" class="error">
 | 
			
		||||
		<p>%fa:exclamation-triangle% %i18n:common.error.title%</p>
 | 
			
		||||
		<ui-button @click="resolveInitPromise">%i18n:common.error.retry%</ui-button>
 | 
			
		||||
	</div>
 | 
			
		||||
 | 
			
		||||
	<div class="placeholder" v-if="fetching">
 | 
			
		||||
@@ -215,6 +215,13 @@ export default Vue.extend({
 | 
			
		||||
		> *
 | 
			
		||||
			transition transform .3s ease, opacity .3s ease
 | 
			
		||||
 | 
			
		||||
	> .error
 | 
			
		||||
		max-width 300px
 | 
			
		||||
		margin 0 auto
 | 
			
		||||
		padding 16px
 | 
			
		||||
		text-align center
 | 
			
		||||
		color var(--text)
 | 
			
		||||
 | 
			
		||||
	> .placeholder
 | 
			
		||||
		padding 32px
 | 
			
		||||
		opacity 0.3
 | 
			
		||||
 
 | 
			
		||||
@@ -47,14 +47,16 @@ export default Vue.extend({
 | 
			
		||||
 | 
			
		||||
	mounted() {
 | 
			
		||||
		if (this.connection) this.connection.close();
 | 
			
		||||
		this.connection = (this as any).os.stream.connectToChannel('hashtag', this.tagTl.query);
 | 
			
		||||
		this.connection = (this as any).os.stream.connectToChannel('hashtag', {
 | 
			
		||||
			q: this.tagTl.query
 | 
			
		||||
		});
 | 
			
		||||
		this.connection.on('note', this.onNote);
 | 
			
		||||
 | 
			
		||||
		this.fetch();
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	beforeDestroy() {
 | 
			
		||||
		this.connection.close();
 | 
			
		||||
		this.connection.dispose();
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	methods: {
 | 
			
		||||
 
 | 
			
		||||
@@ -8,9 +8,9 @@
 | 
			
		||||
		</template>
 | 
			
		||||
	</div>
 | 
			
		||||
 | 
			
		||||
	<div v-if="!fetching && requestInitPromise != null">
 | 
			
		||||
		<p>%i18n:@error%</p>
 | 
			
		||||
		<button @click="resolveInitPromise">%i18n:@retry%</button>
 | 
			
		||||
	<div v-if="!fetching && requestInitPromise != null" class="error">
 | 
			
		||||
		<p>%fa:exclamation-triangle% %i18n:common.error.title%</p>
 | 
			
		||||
		<ui-button @click="resolveInitPromise">%i18n:common.error.retry%</ui-button>
 | 
			
		||||
	</div>
 | 
			
		||||
 | 
			
		||||
	<!-- トランジションを有効にするとなぜかメモリリークする -->
 | 
			
		||||
@@ -226,6 +226,13 @@ export default Vue.extend({
 | 
			
		||||
		> *
 | 
			
		||||
			transition transform .3s ease, opacity .3s ease
 | 
			
		||||
 | 
			
		||||
	> .error
 | 
			
		||||
		max-width 300px
 | 
			
		||||
		margin 0 auto
 | 
			
		||||
		padding 16px
 | 
			
		||||
		text-align center
 | 
			
		||||
		color var(--text)
 | 
			
		||||
 | 
			
		||||
	> .placeholder
 | 
			
		||||
		padding 16px
 | 
			
		||||
		opacity 0.3
 | 
			
		||||
 
 | 
			
		||||
@@ -9,9 +9,9 @@ export type TextElementHashtag = {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default function(text: string, i: number) {
 | 
			
		||||
	if (!(/^\s#[^\s\.,]+/.test(text) || (i == 0 && /^#[^\s\.,]+/.test(text)))) return null;
 | 
			
		||||
	if (!(/^\s#[^\s\.,!\?]+/.test(text) || (i == 0 && /^#[^\s\.,!\?]+/.test(text)))) return null;
 | 
			
		||||
	const isHead = text.startsWith('#');
 | 
			
		||||
	const hashtag = text.match(/^\s?#[^\s\.,]+/)[0];
 | 
			
		||||
	const hashtag = text.match(/^\s?#[^\s\.,!\?]+/)[0];
 | 
			
		||||
	const res: any[] = !isHead ? [{
 | 
			
		||||
		type: 'text',
 | 
			
		||||
		content: text[0]
 | 
			
		||||
 
 | 
			
		||||
@@ -15,6 +15,8 @@ export default class extends Channel {
 | 
			
		||||
 | 
			
		||||
		const q: Array<string[]> = params.q;
 | 
			
		||||
 | 
			
		||||
		if (q == null) return;
 | 
			
		||||
 | 
			
		||||
		// Subscribe stream
 | 
			
		||||
		this.subscriber.on('hashtag', async note => {
 | 
			
		||||
			const matched = q.some(tags => tags.every(tag => note.tags.map((t: string) => t.toLowerCase()).includes(tag.toLowerCase())));
 | 
			
		||||
 
 | 
			
		||||
@@ -122,6 +122,12 @@ describe('Text', () => {
 | 
			
		||||
				{ type: 'hashtag', content: '#piyo', hashtag: 'piyo' },
 | 
			
		||||
				{ type: 'text', content: '.' }
 | 
			
		||||
			], tokens2);
 | 
			
		||||
 | 
			
		||||
			const tokens3 = analyze('#Foo!');
 | 
			
		||||
			assert.deepEqual([
 | 
			
		||||
				{ type: 'hashtag', content: '#Foo', hashtag: 'Foo' },
 | 
			
		||||
				{ type: 'text', content: '!' },
 | 
			
		||||
			], tokens3);
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		it('quote', () => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user