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"
|
"stylelint-config-prettier"
|
||||||
],
|
],
|
||||||
"rules": {
|
"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": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,13 @@
|
||||||
<el-input></el-input>
|
<el-input></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="submit">
|
<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') }}
|
{{ $t('authorize.submit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -125,7 +131,7 @@ export default defineComponent({
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
#authorize {
|
#authorize {
|
||||||
background-color: #292f3f;
|
background-color: #292f3f;
|
||||||
color: #ffffff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
|
||||||
|
@ -150,6 +156,10 @@ export default defineComponent({
|
||||||
.authorize-form {
|
.authorize-form {
|
||||||
width: 500px;
|
width: 500px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
|
.authorize {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.authorize-form :deep() {
|
.authorize-form :deep() {
|
||||||
|
@ -159,9 +169,13 @@ export default defineComponent({
|
||||||
|
|
||||||
.el-input__inner {
|
.el-input__inner {
|
||||||
background-color: #373d48;
|
background-color: #373d48;
|
||||||
color: #ffffff;
|
color: #fff;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-input__wrapper {
|
||||||
|
background-color: #373d48;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
|
|
|
@ -196,5 +196,9 @@ export default defineComponent({
|
||||||
color: #fff;
|
color: #fff;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-input__wrapper {
|
||||||
|
background-color: #373d48;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -241,7 +241,12 @@ const actions: ActionTree<TimelineSpaceState, RootState> = {
|
||||||
[ACTION_TYPES.FETCH_INSTANCE]: async ({ commit, state }, account: LocalAccount) => {
|
[ACTION_TYPES.FETCH_INSTANCE]: async ({ commit, state }, account: LocalAccount) => {
|
||||||
const client = generator(state.sns, account.baseURL, null, 'Whalebird')
|
const client = generator(state.sns, account.baseURL, null, 'Whalebird')
|
||||||
const res = await client.getInstance()
|
const res = await client.getInstance()
|
||||||
|
if (res.data.max_toot_chars) {
|
||||||
commit(MUTATION_TYPES.UPDATE_TOOT_MAX, 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
|
return true
|
||||||
},
|
},
|
||||||
[ACTION_TYPES.LOAD_TIMELINE_SETTING]: async ({ commit }, accountID: string) => {
|
[ACTION_TYPES.LOAD_TIMELINE_SETTING]: async ({ commit }, accountID: string) => {
|
||||||
|
|
Loading…
Reference in New Issue