refs #3182 Read max_characters from mastodon new API regarding status configuration
This commit is contained in:
parent
0b84fb70d0
commit
ea47ebc50f
|
@ -5,6 +5,13 @@
|
|||
"stylelint-config-prettier"
|
||||
],
|
||||
"rules": {
|
||||
"selector-pseudo-class-no-unknown": [
|
||||
true,
|
||||
{
|
||||
"ignorePseudoClasses": ["deep"]
|
||||
}
|
||||
],
|
||||
"selector-class-pattern": "^(([a-z][a-zA-Z0-9_]+)|([a-z][a-z0-9]*)(-[a-zA-Z0-9_]+)*)$"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
|
|
@ -33,7 +33,13 @@
|
|||
<el-input></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="submit">
|
||||
<el-button type="primary" @click="authorizeSubmit" v-loading="submitting" element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||
<el-button
|
||||
v-loading="submitting"
|
||||
type="primary"
|
||||
class="authorize"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)"
|
||||
@click="authorizeSubmit"
|
||||
>
|
||||
{{ $t('authorize.submit') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
@ -125,7 +131,7 @@ export default defineComponent({
|
|||
<style lang="scss" scoped>
|
||||
#authorize {
|
||||
background-color: #292f3f;
|
||||
color: #ffffff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
min-height: 100%;
|
||||
|
||||
|
@ -150,6 +156,10 @@ export default defineComponent({
|
|||
.authorize-form {
|
||||
width: 500px;
|
||||
margin: 0 auto;
|
||||
|
||||
.authorize {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.authorize-form :deep() {
|
||||
|
@ -159,9 +169,13 @@ export default defineComponent({
|
|||
|
||||
.el-input__inner {
|
||||
background-color: #373d48;
|
||||
color: #ffffff;
|
||||
color: #fff;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.el-input__wrapper {
|
||||
background-color: #373d48;
|
||||
}
|
||||
}
|
||||
|
||||
.hidden {
|
||||
|
|
|
@ -196,5 +196,9 @@ export default defineComponent({
|
|||
color: #fff;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.el-input__wrapper {
|
||||
background-color: #373d48;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -241,7 +241,12 @@ const actions: ActionTree<TimelineSpaceState, RootState> = {
|
|||
[ACTION_TYPES.FETCH_INSTANCE]: async ({ commit, state }, account: LocalAccount) => {
|
||||
const client = generator(state.sns, account.baseURL, null, 'Whalebird')
|
||||
const res = await client.getInstance()
|
||||
commit(MUTATION_TYPES.UPDATE_TOOT_MAX, res.data.max_toot_chars)
|
||||
if (res.data.max_toot_chars) {
|
||||
commit(MUTATION_TYPES.UPDATE_TOOT_MAX, res.data.max_toot_chars)
|
||||
}
|
||||
if (res.data.configuration) {
|
||||
commit(MUTATION_TYPES.UPDATE_TOOT_MAX, res.data.configuration.statuses.max_characters)
|
||||
}
|
||||
return true
|
||||
},
|
||||
[ACTION_TYPES.LOAD_TIMELINE_SETTING]: async ({ commit }, accountID: string) => {
|
||||
|
|
Loading…
Reference in New Issue