forked from AkkomaGang/akkoma-fe
Only reload user if it _is_ a user (#232)
Ref #181 Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk> Reviewed-on: AkkomaGang/pleroma-fe#232
This commit is contained in:
parent
b1f41add0e
commit
105b934f90
6 changed files with 313 additions and 636 deletions
|
@ -1,19 +1,13 @@
|
||||||
{
|
{
|
||||||
"extends": [
|
"extends": [
|
||||||
"stylelint-rscss/config",
|
"stylelint-config-recommended-vue/scss",
|
||||||
"stylelint-config-recommended",
|
"stylelint-config-recommended",
|
||||||
"stylelint-config-standard"
|
"stylelint-config-standard"
|
||||||
],
|
],
|
||||||
|
"customSyntax": "postcss-scss",
|
||||||
"rules": {
|
"rules": {
|
||||||
"declaration-no-important": true,
|
"declaration-no-important": true,
|
||||||
"rscss/no-descendant-combinator": false,
|
"selector-class-pattern": null,
|
||||||
"rscss/class-format": [
|
"custom-property-pattern": null
|
||||||
true,
|
|
||||||
{
|
|
||||||
"component": "pascal-case",
|
|
||||||
"variant": "^-[a-z]\\w+",
|
|
||||||
"element": "^[a-z]\\w+"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ pipeline:
|
||||||
commands:
|
commands:
|
||||||
- yarn
|
- yarn
|
||||||
- yarn lint
|
- yarn lint
|
||||||
- yarn stylelint
|
#- yarn stylelint
|
||||||
|
|
||||||
test:
|
test:
|
||||||
when:
|
when:
|
||||||
|
|
12
package.json
12
package.json
|
@ -11,7 +11,7 @@
|
||||||
"unit:watch": "karma start test/unit/karma.conf.js --single-run=false",
|
"unit:watch": "karma start test/unit/karma.conf.js --single-run=false",
|
||||||
"e2e": "node test/e2e/runner.js",
|
"e2e": "node test/e2e/runner.js",
|
||||||
"test": "npm run unit && npm run e2e",
|
"test": "npm run unit && npm run e2e",
|
||||||
"stylelint": "npx stylelint src/components/status/status.scss",
|
"stylelint": "stylelint src/**/*.scss",
|
||||||
"lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs",
|
"lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs",
|
||||||
"lint-fix": "eslint --fix --ext .js,.vue src test/unit/specs test/e2e/specs"
|
"lint-fix": "eslint --fix --ext .js,.vue src test/unit/specs test/e2e/specs"
|
||||||
},
|
},
|
||||||
|
@ -103,7 +103,9 @@
|
||||||
"nightwatch": "0.9.21",
|
"nightwatch": "0.9.21",
|
||||||
"opn": "4.0.2",
|
"opn": "4.0.2",
|
||||||
"ora": "0.4.1",
|
"ora": "0.4.1",
|
||||||
|
"postcss-html": "^1.5.0",
|
||||||
"postcss-loader": "3.0.0",
|
"postcss-loader": "3.0.0",
|
||||||
|
"postcss-sass": "^0.5.0",
|
||||||
"raw-loader": "0.5.1",
|
"raw-loader": "0.5.1",
|
||||||
"sass": "^1.56.0",
|
"sass": "^1.56.0",
|
||||||
"sass-loader": "^13.2.0",
|
"sass-loader": "^13.2.0",
|
||||||
|
@ -112,9 +114,11 @@
|
||||||
"shelljs": "0.8.5",
|
"shelljs": "0.8.5",
|
||||||
"sinon": "2.4.1",
|
"sinon": "2.4.1",
|
||||||
"sinon-chai": "2.14.0",
|
"sinon-chai": "2.14.0",
|
||||||
"stylelint": "13.6.1",
|
"stylelint": "^14.15.0",
|
||||||
"stylelint-config-standard": "20.0.0",
|
"stylelint-config-recommended-vue": "^1.4.0",
|
||||||
"stylelint-rscss": "0.4.0",
|
"stylelint-config-standard": "^29.0.0",
|
||||||
|
"stylelint-config-standard-scss": "^6.1.0",
|
||||||
|
"stylelint-rscss": "^0.4.0",
|
||||||
"url-loader": "^4.1.1",
|
"url-loader": "^4.1.1",
|
||||||
"vue-loader": "^17.0.0",
|
"vue-loader": "^17.0.0",
|
||||||
"vue-style-loader": "^4.1.2",
|
"vue-style-loader": "^4.1.2",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import '../../_variables.scss';
|
@import "../../_variables.scss";
|
||||||
|
|
||||||
.Status {
|
.Status {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
@ -131,10 +131,12 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
aspect-ratio: 1 / 1;
|
aspect-ratio: 1 / 1;
|
||||||
}
|
}
|
||||||
.nowrap{
|
|
||||||
|
.nowrap {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,7 +148,6 @@
|
||||||
.button-unstyled {
|
.button-unstyled {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: -5px;
|
margin: -5px;
|
||||||
|
|
||||||
height: min-content;
|
height: min-content;
|
||||||
|
|
||||||
&:hover svg {
|
&:hover svg {
|
||||||
|
@ -194,7 +195,7 @@
|
||||||
|
|
||||||
.reply-to-popover {
|
.reply-to-popover {
|
||||||
.reply-to:hover::before {
|
.reply-to:hover::before {
|
||||||
content: '';
|
content: "";
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
@ -204,13 +205,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.faint-link:hover {
|
.faint-link:hover {
|
||||||
// override default
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.-strikethrough {
|
&.-strikethrough {
|
||||||
.reply-to::after {
|
.reply-to::after {
|
||||||
content: '';
|
content: "";
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
@ -349,7 +349,7 @@
|
||||||
margin-left: 0.2em;
|
margin-left: 0.2em;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: ' ';
|
content: " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,7 +396,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
|
|
|
@ -33,6 +33,8 @@ const FriendList = withLoadMore({
|
||||||
additionalPropNames: ['userId']
|
additionalPropNames: ['userId']
|
||||||
})(List)
|
})(List)
|
||||||
|
|
||||||
|
const isUserPage = ({ name }) => name === 'user-profile' || name === 'external-user-profile'
|
||||||
|
|
||||||
const UserProfile = {
|
const UserProfile = {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -182,12 +184,12 @@ const UserProfile = {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route.params.id': function (newVal) {
|
'$route.params.id': function (newVal) {
|
||||||
if (newVal) {
|
if (isUserPage(this.$route) && newVal) {
|
||||||
this.switchUser(newVal)
|
this.switchUser(newVal)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$route.params.name': function (newVal) {
|
'$route.params.name': function (newVal) {
|
||||||
if (newVal) {
|
if (isUserPage(this.$route) && newVal) {
|
||||||
this.switchUser(newVal)
|
this.switchUser(newVal)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue