forked from AkkomaGang/akkoma-fe
Fxing conflicts
This commit is contained in:
commit
92874b6902
24 changed files with 1103 additions and 14 deletions
14
src/App.scss
14
src/App.scss
|
@ -719,3 +719,17 @@ nav {
|
||||||
margin-right: 0.8em;
|
margin-right: 0.8em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-hint {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
@media all and (min-width: 801px) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 1em 0px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -37,6 +37,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<div v-if="!currentUser" class="login-hint panel panel-default">
|
||||||
|
<router-link :to="{ name: 'login' }" class="panel-body">
|
||||||
|
{{ $t("login.hint") }}
|
||||||
|
</router-link>
|
||||||
|
</div>
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
|
@ -84,6 +84,7 @@ const afterStoreSetup = ({ store, i18n }) => {
|
||||||
copyInstanceOption('loginMethod')
|
copyInstanceOption('loginMethod')
|
||||||
copyInstanceOption('scopeCopy')
|
copyInstanceOption('scopeCopy')
|
||||||
copyInstanceOption('subjectLineBehavior')
|
copyInstanceOption('subjectLineBehavior')
|
||||||
|
copyInstanceOption('postContentType')
|
||||||
copyInstanceOption('alwaysShowSubjectInput')
|
copyInstanceOption('alwaysShowSubjectInput')
|
||||||
copyInstanceOption('noAttachmentLinks')
|
copyInstanceOption('noAttachmentLinks')
|
||||||
copyInstanceOption('showFeaturesPanel')
|
copyInstanceOption('showFeaturesPanel')
|
||||||
|
|
|
@ -65,7 +65,6 @@ const PostStatusForm = {
|
||||||
newStatus: {
|
newStatus: {
|
||||||
spoilerText: this.subject || '',
|
spoilerText: this.subject || '',
|
||||||
status: statusText,
|
status: statusText,
|
||||||
contentType: 'text/plain',
|
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
files: [],
|
files: [],
|
||||||
visibility: scope
|
visibility: scope
|
||||||
|
@ -167,6 +166,11 @@ const PostStatusForm = {
|
||||||
},
|
},
|
||||||
formattingOptionsEnabled () {
|
formattingOptionsEnabled () {
|
||||||
return this.$store.state.instance.formattingOptionsEnabled
|
return this.$store.state.instance.formattingOptionsEnabled
|
||||||
|
},
|
||||||
|
defaultPostContentType () {
|
||||||
|
return typeof this.$store.state.config.postContentType === 'undefined'
|
||||||
|
? this.$store.state.instance.postContentType
|
||||||
|
: this.$store.state.config.postContentType
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<div class="visibility-tray">
|
<div class="visibility-tray">
|
||||||
<span class="text-format" v-if="formattingOptionsEnabled">
|
<span class="text-format" v-if="formattingOptionsEnabled">
|
||||||
<label for="post-content-type" class="select">
|
<label for="post-content-type" class="select">
|
||||||
<select id="post-content-type" v-model="newStatus.contentType" class="form-control">
|
<select id="post-content-type" v-model="defaultPostContentType" class="form-control">
|
||||||
<option value="text/plain">{{$t('post_status.content_type.plain_text')}}</option>
|
<option value="text/plain">{{$t('post_status.content_type.plain_text')}}</option>
|
||||||
<option value="text/html">HTML</option>
|
<option value="text/html">HTML</option>
|
||||||
<option value="text/markdown">Markdown</option>
|
<option value="text/markdown">Markdown</option>
|
||||||
|
|
|
@ -46,6 +46,11 @@ const settings = {
|
||||||
: user.subjectLineBehavior,
|
: user.subjectLineBehavior,
|
||||||
subjectLineBehaviorDefault: instance.subjectLineBehavior,
|
subjectLineBehaviorDefault: instance.subjectLineBehavior,
|
||||||
|
|
||||||
|
postContentTypeLocal: typeof user.postContentType === 'undefined'
|
||||||
|
? instance.postContentType
|
||||||
|
: user.postContentType,
|
||||||
|
postContentTypeDefault: instance.postContentType,
|
||||||
|
|
||||||
alwaysShowSubjectInputLocal: typeof user.alwaysShowSubjectInput === 'undefined'
|
alwaysShowSubjectInputLocal: typeof user.alwaysShowSubjectInput === 'undefined'
|
||||||
? instance.alwaysShowSubjectInput
|
? instance.alwaysShowSubjectInput
|
||||||
: user.alwaysShowSubjectInput,
|
: user.alwaysShowSubjectInput,
|
||||||
|
@ -157,6 +162,9 @@ const settings = {
|
||||||
subjectLineBehaviorLocal (value) {
|
subjectLineBehaviorLocal (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'subjectLineBehavior', value })
|
this.$store.dispatch('setOption', { name: 'subjectLineBehavior', value })
|
||||||
},
|
},
|
||||||
|
postContentTypeLocal (value) {
|
||||||
|
this.$store.dispatch('setOption', { name: 'postContentType', value })
|
||||||
|
},
|
||||||
stopGifs (value) {
|
stopGifs (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'stopGifs', value })
|
this.$store.dispatch('setOption', { name: 'stopGifs', value })
|
||||||
},
|
},
|
||||||
|
|
|
@ -100,6 +100,28 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<div>
|
||||||
|
{{$t('settings.post_status_content_type')}}
|
||||||
|
<label for="postContentType" class="select">
|
||||||
|
<select id="postContentType" v-model="postContentTypeLocal">
|
||||||
|
<option value="text/plain">
|
||||||
|
{{$t('settings.status_content_type_plain')}}
|
||||||
|
{{postContentTypeDefault == 'text/plain' ? $t('settings.instance_default_simple') : ''}}
|
||||||
|
</option>
|
||||||
|
<option value="text/html">
|
||||||
|
HTML
|
||||||
|
{{postContentTypeDefault == 'text/html' ? $t('settings.instance_default_simple') : ''}}
|
||||||
|
</option>
|
||||||
|
<option value="text/markdown">
|
||||||
|
Markdown
|
||||||
|
{{postContentTypeDefault == 'text/markdown' ? $t('settings.instance_default_simple') : ''}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
<i class="icon-down-open"/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,8 @@
|
||||||
<UserAvatar v-if="retweet" :betterShadow="betterShadow" :src="statusoid.user.profile_image_url_original"/>
|
<UserAvatar v-if="retweet" :betterShadow="betterShadow" :src="statusoid.user.profile_image_url_original"/>
|
||||||
<div class="media-body faint">
|
<div class="media-body faint">
|
||||||
<span class="user-name">
|
<span class="user-name">
|
||||||
<router-link :to="retweeterProfileLink">
|
<router-link v-if="retweeterHtml" :to="retweeterProfileLink" v-html="retweeterHtml"/>
|
||||||
{{retweeterHtml || retweeter}}
|
<router-link v-else :to="retweeterProfileLink">{{retweeter}}</router-link>
|
||||||
</router-link>
|
|
||||||
</span>
|
</span>
|
||||||
<i class='fa icon-retweet retweeted' :title="$t('tool_tip.repeat')"></i>
|
<i class='fa icon-retweet retweeted' :title="$t('tool_tip.repeat')"></i>
|
||||||
{{$t('timeline.repeated')}}
|
{{$t('timeline.repeated')}}
|
||||||
|
|
|
@ -37,7 +37,7 @@ export default Vue.component('tab-switcher', {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={ classesWrapper.join(' ')}>
|
<div class={ classesWrapper.join(' ')}>
|
||||||
<button onClick={this.activateTab(index)} class={ classesTab.join(' ') }>{slot.data.attrs.label}</button>
|
<button disabled={slot.data.attrs.disabled} onClick={this.activateTab(index)} class={ classesTab.join(' ') }>{slot.data.attrs.label}</button>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
@ -79,6 +79,12 @@ export default {
|
||||||
set (color) {
|
set (color) {
|
||||||
this.$store.dispatch('setHighlight', { user: this.user.screen_name, color })
|
this.$store.dispatch('setHighlight', { user: this.user.screen_name, color })
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
visibleRole () {
|
||||||
|
const validRole = (this.user.role === 'admin' || this.user.role === 'moderator')
|
||||||
|
const showRole = this.isOtherUser || this.user.show_role
|
||||||
|
|
||||||
|
return validRole && showRole && this.user.role
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<router-link class='user-screen-name' :to="userProfileLink(user)">
|
<router-link class='user-screen-name' :to="userProfileLink(user)">
|
||||||
<span class="handle">@{{user.screen_name}}</span><span v-if="user.locked"><i class="icon icon-lock"></i></span>
|
<span class="handle">@{{user.screen_name}}
|
||||||
|
<span class="alert staff" v-if="!hideBio && !!visibleRole">{{visibleRole}}</span>
|
||||||
|
</span><span v-if="user.locked"><i class="icon icon-lock"></i></span>
|
||||||
<span v-if="!hideUserStatsLocal && !hideBio" class="dailyAvg">{{dailyAvg}} {{ $t('user_card.per_day') }}</span>
|
<span v-if="!hideUserStatsLocal && !hideBio" class="dailyAvg">{{dailyAvg}} {{ $t('user_card.per_day') }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
@ -247,6 +249,15 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO use proper colors
|
||||||
|
.staff {
|
||||||
|
text-transform: capitalize;
|
||||||
|
color: $fallback--text;
|
||||||
|
color: var(--btnText, $fallback--text);
|
||||||
|
background-color: $fallback--fg;
|
||||||
|
background-color: var(--btn, $fallback--fg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-meta {
|
.user-meta {
|
||||||
|
|
|
@ -58,6 +58,12 @@ const UserProfile = {
|
||||||
},
|
},
|
||||||
isExternal () {
|
isExternal () {
|
||||||
return this.$route.name === 'external-user-profile'
|
return this.$route.name === 'external-user-profile'
|
||||||
|
},
|
||||||
|
followsTabVisible () {
|
||||||
|
return this.isUs || !this.user.hide_follows
|
||||||
|
},
|
||||||
|
followersTabVisible () {
|
||||||
|
return this.isUs || !this.user.hide_followers
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -9,19 +9,20 @@
|
||||||
<tab-switcher :renderOnlyFocused="true">
|
<tab-switcher :renderOnlyFocused="true">
|
||||||
<Timeline
|
<Timeline
|
||||||
:label="$t('user_card.statuses')"
|
:label="$t('user_card.statuses')"
|
||||||
|
:disabled="!user.statuses_count"
|
||||||
:embedded="true"
|
:embedded="true"
|
||||||
:title="$t('user_profile.timeline_title')"
|
:title="$t('user_profile.timeline_title')"
|
||||||
:timeline="timeline"
|
:timeline="timeline"
|
||||||
:timeline-name="'user'"
|
:timeline-name="'user'"
|
||||||
:user-id="fetchBy"
|
:user-id="fetchBy"
|
||||||
/>
|
/>
|
||||||
<div :label="$t('user_card.followees')">
|
<div :label="$t('user_card.followees')" v-if="followsTabVisible" :disabled="!user.friends_count">
|
||||||
<FollowList v-if="user.friends_count > 0" :userId="userId" :showFollowers="false" />
|
<FollowList v-if="user.friends_count > 0" :userId="userId" :showFollowers="false" />
|
||||||
<div class="userlist-placeholder" v-else>
|
<div class="userlist-placeholder" v-else>
|
||||||
<i class="icon-spin3 animate-spin"></i>
|
<i class="icon-spin3 animate-spin"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :label="$t('user_card.followers')">
|
<div :label="$t('user_card.followers')" v-if="followersTabVisible" :disabled="!user.followers_count">
|
||||||
<FollowList v-if="user.followers_count > 0" :userId="userId" :showFollowers="true" />
|
<FollowList v-if="user.followers_count > 0" :userId="userId" :showFollowers="true" />
|
||||||
<div class="userlist-placeholder" v-else>
|
<div class="userlist-placeholder" v-else>
|
||||||
<i class="icon-spin3 animate-spin"></i>
|
<i class="icon-spin3 animate-spin"></i>
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
</div>
|
</div>
|
||||||
<Timeline
|
<Timeline
|
||||||
:label="$t('user_card.media')"
|
:label="$t('user_card.media')"
|
||||||
|
:disabled="!media.visibleStatuses.length"
|
||||||
:embedded="true" :title="$t('user_card.media')"
|
:embedded="true" :title="$t('user_card.media')"
|
||||||
timeline-name="media"
|
timeline-name="media"
|
||||||
:timeline="media"
|
:timeline="media"
|
||||||
|
@ -37,6 +39,7 @@
|
||||||
<Timeline
|
<Timeline
|
||||||
v-if="isUs"
|
v-if="isUs"
|
||||||
:label="$t('user_card.favorites')"
|
:label="$t('user_card.favorites')"
|
||||||
|
:disabled="!favorites.visibleStatuses.length"
|
||||||
:embedded="true"
|
:embedded="true"
|
||||||
:title="$t('user_card.favorites')"
|
:title="$t('user_card.favorites')"
|
||||||
timeline-name="favorites"
|
timeline-name="favorites"
|
||||||
|
|
|
@ -14,6 +14,8 @@ const UserSettings = {
|
||||||
newDefaultScope: this.$store.state.users.currentUser.default_scope,
|
newDefaultScope: this.$store.state.users.currentUser.default_scope,
|
||||||
hideFollows: this.$store.state.users.currentUser.hide_follows,
|
hideFollows: this.$store.state.users.currentUser.hide_follows,
|
||||||
hideFollowers: this.$store.state.users.currentUser.hide_followers,
|
hideFollowers: this.$store.state.users.currentUser.hide_followers,
|
||||||
|
showRole: this.$store.state.users.currentUser.show_role,
|
||||||
|
role: this.$store.state.users.currentUser.role,
|
||||||
followList: null,
|
followList: null,
|
||||||
followImportError: false,
|
followImportError: false,
|
||||||
followsImported: false,
|
followsImported: false,
|
||||||
|
@ -71,6 +73,8 @@ const UserSettings = {
|
||||||
const no_rich_text = this.newNoRichText
|
const no_rich_text = this.newNoRichText
|
||||||
const hide_follows = this.hideFollows
|
const hide_follows = this.hideFollows
|
||||||
const hide_followers = this.hideFollowers
|
const hide_followers = this.hideFollowers
|
||||||
|
const show_role = this.showRole
|
||||||
|
|
||||||
/* eslint-enable camelcase */
|
/* eslint-enable camelcase */
|
||||||
this.$store.state.api.backendInteractor
|
this.$store.state.api.backendInteractor
|
||||||
.updateProfile({
|
.updateProfile({
|
||||||
|
@ -83,7 +87,8 @@ const UserSettings = {
|
||||||
default_scope,
|
default_scope,
|
||||||
no_rich_text,
|
no_rich_text,
|
||||||
hide_follows,
|
hide_follows,
|
||||||
hide_followers
|
hide_followers,
|
||||||
|
show_role
|
||||||
/* eslint-enable camelcase */
|
/* eslint-enable camelcase */
|
||||||
}}).then((user) => {
|
}}).then((user) => {
|
||||||
if (!user.error) {
|
if (!user.error) {
|
||||||
|
@ -238,7 +243,9 @@ const UserSettings = {
|
||||||
exportFollows () {
|
exportFollows () {
|
||||||
this.enableFollowsExport = false
|
this.enableFollowsExport = false
|
||||||
this.$store.state.api.backendInteractor
|
this.$store.state.api.backendInteractor
|
||||||
.fetchFriends({id: this.$store.state.users.currentUser.id})
|
.exportFriends({
|
||||||
|
id: this.$store.state.users.currentUser.id
|
||||||
|
})
|
||||||
.then((friendList) => {
|
.then((friendList) => {
|
||||||
this.exportPeople(friendList, 'friends.csv')
|
this.exportPeople(friendList, 'friends.csv')
|
||||||
setTimeout(() => { this.enableFollowsExport = true }, 2000)
|
setTimeout(() => { this.enableFollowsExport = true }, 2000)
|
||||||
|
|
|
@ -37,6 +37,11 @@
|
||||||
<input type="checkbox" v-model="hideFollowers" id="account-hide-followers">
|
<input type="checkbox" v-model="hideFollowers" id="account-hide-followers">
|
||||||
<label for="account-hide-followers">{{$t('settings.hide_followers_description')}}</label>
|
<label for="account-hide-followers">{{$t('settings.hide_followers_description')}}</label>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<input type="checkbox" v-model="showRole" id="account-show-role">
|
||||||
|
<label for="account-show-role" v-if="role === 'admin'">{{$t('settings.show_admin_badge')}}</label>
|
||||||
|
<label for="account-show-role" v-if="role === 'moderator'">{{$t('settings.show_moderator_badge')}}</label>
|
||||||
|
</p>
|
||||||
<button :disabled='newName && newName.length === 0' class="btn btn-default" @click="updateProfile">{{$t('general.submit')}}</button>
|
<button :disabled='newName && newName.length === 0' class="btn btn-default" @click="updateProfile">{{$t('general.submit')}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
"placeholder": "e.g. lain",
|
"placeholder": "e.g. lain",
|
||||||
"register": "Register",
|
"register": "Register",
|
||||||
"username": "Username"
|
"username": "Username",
|
||||||
|
"hint": "Log in to join the discussion"
|
||||||
},
|
},
|
||||||
"nav": {
|
"nav": {
|
||||||
"about": "About",
|
"about": "About",
|
||||||
|
@ -166,6 +167,8 @@
|
||||||
"no_rich_text_description": "Strip rich text formatting from all posts",
|
"no_rich_text_description": "Strip rich text formatting from all posts",
|
||||||
"hide_follows_description": "Don't show who I'm following",
|
"hide_follows_description": "Don't show who I'm following",
|
||||||
"hide_followers_description": "Don't show who's following me",
|
"hide_followers_description": "Don't show who's following me",
|
||||||
|
"show_admin_badge": "Show Admin badge in my profile",
|
||||||
|
"show_moderator_badge": "Show Moderator badge in my profile",
|
||||||
"nsfw_clickthrough": "Enable clickthrough NSFW attachment hiding",
|
"nsfw_clickthrough": "Enable clickthrough NSFW attachment hiding",
|
||||||
"panelRadius": "Panels",
|
"panelRadius": "Panels",
|
||||||
"pause_on_unfocused": "Pause streaming when tab is not focused",
|
"pause_on_unfocused": "Pause streaming when tab is not focused",
|
||||||
|
@ -192,6 +195,8 @@
|
||||||
"subject_line_email": "Like email: \"re: subject\"",
|
"subject_line_email": "Like email: \"re: subject\"",
|
||||||
"subject_line_mastodon": "Like mastodon: copy as is",
|
"subject_line_mastodon": "Like mastodon: copy as is",
|
||||||
"subject_line_noop": "Do not copy",
|
"subject_line_noop": "Do not copy",
|
||||||
|
"post_status_content_type": "Post status content type",
|
||||||
|
"status_content_type_plain": "Plain text",
|
||||||
"stop_gifs": "Play-on-hover GIFs",
|
"stop_gifs": "Play-on-hover GIFs",
|
||||||
"streaming": "Enable automatic streaming of new posts when scrolled to the top",
|
"streaming": "Enable automatic streaming of new posts when scrolled to the top",
|
||||||
"text": "Text",
|
"text": "Text",
|
||||||
|
|
|
@ -129,6 +129,8 @@
|
||||||
"no_rich_text_description": "Убрать форматирование из всех постов",
|
"no_rich_text_description": "Убрать форматирование из всех постов",
|
||||||
"hide_follows_description": "Не показывать кого я читаю",
|
"hide_follows_description": "Не показывать кого я читаю",
|
||||||
"hide_followers_description": "Не показывать кто читает меня",
|
"hide_followers_description": "Не показывать кто читает меня",
|
||||||
|
"show_admin_badge": "Показывать значок администратора в моем профиле",
|
||||||
|
"show_moderator_badge": "Показывать значок модератора в моем профиле",
|
||||||
"nsfw_clickthrough": "Включить скрытие NSFW вложений",
|
"nsfw_clickthrough": "Включить скрытие NSFW вложений",
|
||||||
"panelRadius": "Панели",
|
"panelRadius": "Панели",
|
||||||
"pause_on_unfocused": "Приостановить загрузку когда вкладка не в фокусе",
|
"pause_on_unfocused": "Приостановить загрузку когда вкладка не в фокусе",
|
||||||
|
|
|
@ -30,7 +30,13 @@ const defaultState = {
|
||||||
interfaceLanguage: browserLocale,
|
interfaceLanguage: browserLocale,
|
||||||
scopeCopy: undefined, // instance default
|
scopeCopy: undefined, // instance default
|
||||||
subjectLineBehavior: undefined, // instance default
|
subjectLineBehavior: undefined, // instance default
|
||||||
|
<<<<<<< HEAD
|
||||||
alwaysShowSubjectInput: undefined // instance default
|
alwaysShowSubjectInput: undefined // instance default
|
||||||
|
=======
|
||||||
|
alwaysShowSubjectInput: undefined, // instance default
|
||||||
|
showFeaturesPanel: true,
|
||||||
|
postContentType: undefined // instance default
|
||||||
|
>>>>>>> da0a5535eb09f6637df921a8a5f951c295bedeac
|
||||||
}
|
}
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
|
|
@ -24,6 +24,7 @@ const defaultState = {
|
||||||
disableChat: false,
|
disableChat: false,
|
||||||
scopeCopy: true,
|
scopeCopy: true,
|
||||||
subjectLineBehavior: 'email',
|
subjectLineBehavior: 'email',
|
||||||
|
postContentType: 'text/plain',
|
||||||
loginMethod: 'password',
|
loginMethod: 'password',
|
||||||
nsfwCensorImage: undefined,
|
nsfwCensorImage: undefined,
|
||||||
vapidPublicKey: undefined,
|
vapidPublicKey: undefined,
|
||||||
|
|
|
@ -130,7 +130,7 @@ const updateBanner = ({credentials, params}) => {
|
||||||
// description
|
// description
|
||||||
const updateProfile = ({credentials, params}) => {
|
const updateProfile = ({credentials, params}) => {
|
||||||
// Always include these fields, because they might be empty or false
|
// Always include these fields, because they might be empty or false
|
||||||
const fields = ['description', 'locked', 'no_rich_text', 'hide_follows', 'hide_followers']
|
const fields = ['description', 'locked', 'no_rich_text', 'hide_follows', 'hide_followers', 'show_role']
|
||||||
let url = PROFILE_UPDATE_URL
|
let url = PROFILE_UPDATE_URL
|
||||||
|
|
||||||
const form = new FormData()
|
const form = new FormData()
|
||||||
|
@ -257,6 +257,13 @@ const fetchFriends = ({id, page, credentials}) => {
|
||||||
.then((data) => data.map(parseUser))
|
.then((data) => data.map(parseUser))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const exportFriends = ({id, credentials}) => {
|
||||||
|
let url = `${FRIENDS_URL}?user_id=${id}&export=true`
|
||||||
|
return fetch(url, { headers: authHeaders(credentials) })
|
||||||
|
.then((data) => data.json())
|
||||||
|
.then((data) => data.map(parseUser))
|
||||||
|
}
|
||||||
|
|
||||||
const fetchFollowers = ({id, page, credentials}) => {
|
const fetchFollowers = ({id, page, credentials}) => {
|
||||||
let url = `${FOLLOWERS_URL}?user_id=${id}`
|
let url = `${FOLLOWERS_URL}?user_id=${id}`
|
||||||
if (page) {
|
if (page) {
|
||||||
|
@ -536,6 +543,7 @@ const apiService = {
|
||||||
fetchConversation,
|
fetchConversation,
|
||||||
fetchStatus,
|
fetchStatus,
|
||||||
fetchFriends,
|
fetchFriends,
|
||||||
|
exportFriends,
|
||||||
fetchFollowers,
|
fetchFollowers,
|
||||||
followUser,
|
followUser,
|
||||||
unfollowUser,
|
unfollowUser,
|
||||||
|
|
|
@ -14,6 +14,10 @@ const backendInteractorService = (credentials) => {
|
||||||
return apiService.fetchFriends({id, page, credentials})
|
return apiService.fetchFriends({id, page, credentials})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const exportFriends = ({id}) => {
|
||||||
|
return apiService.exportFriends({id, credentials})
|
||||||
|
}
|
||||||
|
|
||||||
const fetchFollowers = ({id, page}) => {
|
const fetchFollowers = ({id, page}) => {
|
||||||
return apiService.fetchFollowers({id, page, credentials})
|
return apiService.fetchFollowers({id, page, credentials})
|
||||||
}
|
}
|
||||||
|
@ -78,6 +82,7 @@ const backendInteractorService = (credentials) => {
|
||||||
fetchStatus,
|
fetchStatus,
|
||||||
fetchConversation,
|
fetchConversation,
|
||||||
fetchFriends,
|
fetchFriends,
|
||||||
|
exportFriends,
|
||||||
fetchFollowers,
|
fetchFollowers,
|
||||||
followUser,
|
followUser,
|
||||||
unfollowUser,
|
unfollowUser,
|
||||||
|
|
|
@ -90,6 +90,8 @@ export const parseUser = (data) => {
|
||||||
output.statusnet_blocking = data.statusnet_blocking
|
output.statusnet_blocking = data.statusnet_blocking
|
||||||
|
|
||||||
output.is_local = data.is_local
|
output.is_local = data.is_local
|
||||||
|
output.role = data.role
|
||||||
|
output.show_role = data.show_role
|
||||||
|
|
||||||
output.follows_you = data.follows_you
|
output.follows_you = data.follows_you
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
"collapseMessageWithSubject": false,
|
"collapseMessageWithSubject": false,
|
||||||
"scopeCopy": true,
|
"scopeCopy": true,
|
||||||
"subjectLineBehavior": "email",
|
"subjectLineBehavior": "email",
|
||||||
|
"postContentType": "text/plain",
|
||||||
"alwaysShowSubjectInput": true,
|
"alwaysShowSubjectInput": true,
|
||||||
"hidePostStats": false,
|
"hidePostStats": false,
|
||||||
"hideUserStats": false,
|
"hideUserStats": false,
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue