mirror of
https://github.com/NicolasConstant/sengi
synced 2024-12-22 21:58:59 +01:00
commit
33a61f7347
47
.travis.yml
47
.travis.yml
@ -1,47 +0,0 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
language: c
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ npm_config_clang=1
|
||||
compiler: clang
|
||||
|
||||
node_js:
|
||||
- 10.9.0
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
- icnsutils
|
||||
- graphicsmagick
|
||||
- libgnome-keyring-dev
|
||||
- xz-utils
|
||||
- xorriso
|
||||
- xvfb
|
||||
|
||||
install:
|
||||
- nvm install 10.9.0
|
||||
- npm install electron-builder@22.10.5
|
||||
- npm install
|
||||
- npm rebuild node-sass
|
||||
- export DISPLAY=':99.0'
|
||||
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
||||
|
||||
before_script:
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start &
|
||||
- sleep 3
|
||||
|
||||
script:
|
||||
- npm run travis
|
@ -1,6 +1,6 @@
|
||||
os: unstable
|
||||
cache:
|
||||
- node_modules
|
||||
#- node_modules
|
||||
environment:
|
||||
GH_TOKEN:
|
||||
secure: wRRBU0GXTmTBgZBs2PGSaEJWOflynAyvp3Nc/7e9xmciPfkUCQAXcpOn0jIYmzpb
|
||||
@ -9,7 +9,7 @@ environment:
|
||||
install:
|
||||
- ps: Install-Product node $env:nodejs_version
|
||||
- set CI=true
|
||||
- npm install -g npm@latest
|
||||
- npm install -g npm@6.9.0
|
||||
- set PATH=%APPDATA%\npm;%PATH%
|
||||
- npm install
|
||||
matrix:
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sengi",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"main": "main-electron.js",
|
||||
"description": "A multi-account desktop client for Mastodon and Pleroma",
|
||||
|
@ -88,7 +88,8 @@ export class StatusComponent implements OnInit {
|
||||
|
||||
// const instanceUrl = 'https://' + this.status.uri.split('https://')[1].split('/')[0];
|
||||
// this.statusAccountName = this.emojiConverter.applyEmojis(this.displayedStatus.account.emojis, this.displayedStatus.account.display_name, EmojiTypeEnum.small);
|
||||
this.statusContent = this.emojiConverter.applyEmojis(this.displayedStatus.emojis, this.displayedStatus.content, EmojiTypeEnum.medium);
|
||||
let statusContent = this.emojiConverter.applyEmojis(this.displayedStatus.emojis, this.displayedStatus.content, EmojiTypeEnum.medium);
|
||||
this.statusContent = this.ensureMentionAreDisplayed(statusContent);
|
||||
}
|
||||
get statusWrapper(): StatusWrapper {
|
||||
return this._statusWrapper;
|
||||
@ -101,6 +102,22 @@ export class StatusComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
private ensureMentionAreDisplayed(data: string): string {
|
||||
const mentions = this.displayedStatus.mentions;
|
||||
if(!mentions || mentions.length === 0) return data;
|
||||
|
||||
let textMentions = '';
|
||||
for (const m of mentions) {
|
||||
if(!data.includes(m.url)){
|
||||
textMentions += `<span class="h-card"><a class="u-url mention" data-user="${m.id}" href="${m.url}" rel="ugc">@<span>${m.username}</span></a></span> `
|
||||
}
|
||||
}
|
||||
if(textMentions !== ''){
|
||||
data = textMentions + data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
private setContentWarning(status: StatusWrapper) {
|
||||
this.hideStatus = status.hide;
|
||||
this.isContentWarned = status.applyCw;
|
||||
|
Loading…
Reference in New Issue
Block a user