Refine user profile and navbar

This commit is contained in:
Marco Realacci 2022-12-10 01:02:48 +01:00
parent a2d7eb8d13
commit 740aaef0ea
39 changed files with 2084 additions and 1999 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

View file

@ -83,7 +83,7 @@ func (db *appdbimpl) GetUserPhotos(uid string, requesting_uid string, start_inde
)
FROM "photos" AS "p"
WHERE "p"."user" = ?
ORDER BY "p"."date" DESC
LIMIT ?
OFFSET ?`, requesting_uid, uid, limit, start_index)
if err != nil {

502
webui/node_modules/.package-lock.json generated vendored
View file

@ -1,5 +1,505 @@
{
"name": "teapot",
"version": "0.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {}
"packages": {
"node_modules/@babel/parser": {
"version": "7.18.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz",
"integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==",
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@vitejs/plugin-vue": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-3.0.3.tgz",
"integrity": "sha512-U4zNBlz9mg+TA+i+5QPc3N5lQvdUXENZLO2h0Wdzp56gI1MWhqJOv+6R+d4kOzoaSSq6TnGPBdZAXKOe4lXy6g==",
"dev": true,
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"peerDependencies": {
"vite": "^3.0.0",
"vue": "^3.2.25"
}
},
"node_modules/@vue/compiler-core": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.37.tgz",
"integrity": "sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==",
"dependencies": {
"@babel/parser": "^7.16.4",
"@vue/shared": "3.2.37",
"estree-walker": "^2.0.2",
"source-map": "^0.6.1"
}
},
"node_modules/@vue/compiler-dom": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.37.tgz",
"integrity": "sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==",
"dependencies": {
"@vue/compiler-core": "3.2.37",
"@vue/shared": "3.2.37"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.37.tgz",
"integrity": "sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==",
"dependencies": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.37",
"@vue/compiler-dom": "3.2.37",
"@vue/compiler-ssr": "3.2.37",
"@vue/reactivity-transform": "3.2.37",
"@vue/shared": "3.2.37",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7",
"postcss": "^8.1.10",
"source-map": "^0.6.1"
}
},
"node_modules/@vue/compiler-ssr": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.37.tgz",
"integrity": "sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw==",
"dependencies": {
"@vue/compiler-dom": "3.2.37",
"@vue/shared": "3.2.37"
}
},
"node_modules/@vue/devtools-api": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.2.1.tgz",
"integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ=="
},
"node_modules/@vue/reactivity": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.37.tgz",
"integrity": "sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A==",
"dependencies": {
"@vue/shared": "3.2.37"
}
},
"node_modules/@vue/reactivity-transform": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.37.tgz",
"integrity": "sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==",
"dependencies": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.37",
"@vue/shared": "3.2.37",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7"
}
},
"node_modules/@vue/runtime-core": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.37.tgz",
"integrity": "sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ==",
"dependencies": {
"@vue/reactivity": "3.2.37",
"@vue/shared": "3.2.37"
}
},
"node_modules/@vue/runtime-dom": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.37.tgz",
"integrity": "sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw==",
"dependencies": {
"@vue/runtime-core": "3.2.37",
"@vue/shared": "3.2.37",
"csstype": "^2.6.8"
}
},
"node_modules/@vue/server-renderer": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.37.tgz",
"integrity": "sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA==",
"dependencies": {
"@vue/compiler-ssr": "3.2.37",
"@vue/shared": "3.2.37"
},
"peerDependencies": {
"vue": "3.2.37"
}
},
"node_modules/@vue/shared": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.37.tgz",
"integrity": "sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw=="
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/axios": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
"integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
"dependencies": {
"follow-redirects": "^1.14.9",
"form-data": "^4.0.0"
}
},
"node_modules/bootstrap-icons": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.2.tgz",
"integrity": "sha512-PTPYadRn1AMGr+QTSxe4ZCc+Wzv9DGZxbi3lNse/dajqV31n2/wl/7NX78ZpkvFgRNmH4ogdIQPQmxAfhEV6nA=="
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/csstype": {
"version": "2.6.20",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.20.tgz",
"integrity": "sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA=="
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/esbuild": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
"integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
"node": ">=12"
},
"optionalDependencies": {
"@esbuild/linux-loong64": "0.14.54",
"esbuild-android-64": "0.14.54",
"esbuild-android-arm64": "0.14.54",
"esbuild-darwin-64": "0.14.54",
"esbuild-darwin-arm64": "0.14.54",
"esbuild-freebsd-64": "0.14.54",
"esbuild-freebsd-arm64": "0.14.54",
"esbuild-linux-32": "0.14.54",
"esbuild-linux-64": "0.14.54",
"esbuild-linux-arm": "0.14.54",
"esbuild-linux-arm64": "0.14.54",
"esbuild-linux-mips64le": "0.14.54",
"esbuild-linux-ppc64le": "0.14.54",
"esbuild-linux-riscv64": "0.14.54",
"esbuild-linux-s390x": "0.14.54",
"esbuild-netbsd-64": "0.14.54",
"esbuild-openbsd-64": "0.14.54",
"esbuild-sunos-64": "0.14.54",
"esbuild-windows-32": "0.14.54",
"esbuild-windows-64": "0.14.54",
"esbuild-windows-arm64": "0.14.54"
}
},
"node_modules/esbuild-linux-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
"integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
},
"node_modules/follow-redirects": {
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"dependencies": {
"function-bind": "^1.1.1"
},
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/is-core-module": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz",
"integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==",
"dev": true,
"dependencies": {
"has": "^1.0.3"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/magic-string": {
"version": "0.25.9",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
"integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
"dependencies": {
"sourcemap-codec": "^1.4.8"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
"node_modules/postcss": {
"version": "8.4.16",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz",
"integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
}
],
"dependencies": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
"engines": {
"node": "^10 || ^12 || >=14"
}
},
"node_modules/resolve": {
"version": "1.22.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
"dev": true,
"dependencies": {
"is-core-module": "^2.9.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
"bin": {
"resolve": "bin/resolve"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/rollup": {
"version": "2.77.3",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz",
"integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
},
"engines": {
"node": ">=10.0.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/sourcemap-codec": {
"version": "1.4.8",
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA=="
},
"node_modules/supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
"dev": true,
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/vite": {
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.0.9.tgz",
"integrity": "sha512-waYABTM+G6DBTCpYAxvevpG50UOlZuynR0ckTK5PawNVt7ebX6X7wNXHaGIO6wYYFXSM7/WcuFuO2QzhBB6aMw==",
"dev": true,
"dependencies": {
"esbuild": "^0.14.47",
"postcss": "^8.4.16",
"resolve": "^1.22.1",
"rollup": ">=2.75.6 <2.77.0 || ~2.77.0"
},
"bin": {
"vite": "bin/vite.js"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
},
"peerDependencies": {
"less": "*",
"sass": "*",
"stylus": "*",
"terser": "^5.4.0"
},
"peerDependenciesMeta": {
"less": {
"optional": true
},
"sass": {
"optional": true
},
"stylus": {
"optional": true
},
"terser": {
"optional": true
}
}
},
"node_modules/vue": {
"version": "3.2.37",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.2.37.tgz",
"integrity": "sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ==",
"dependencies": {
"@vue/compiler-dom": "3.2.37",
"@vue/compiler-sfc": "3.2.37",
"@vue/runtime-dom": "3.2.37",
"@vue/server-renderer": "3.2.37",
"@vue/shared": "3.2.37"
}
},
"node_modules/vue-router": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.1.4.tgz",
"integrity": "sha512-UgYen33gOtwT3cOG1+yRen+Brk9py8CSlC9LEa3UjvKZ4EAoSo8NjZPDeDnmNerfazorHIJG1NC7qdi1SuQJnQ==",
"dependencies": {
"@vue/devtools-api": "^6.1.4"
},
"funding": {
"url": "https://github.com/sponsors/posva"
},
"peerDependencies": {
"vue": "^3.2.0"
}
}
}
}

View file

@ -1,41 +1,32 @@
{
"hash": "8e389b41",
"browserHash": "f083642e",
"hash": "0c3e4771",
"browserHash": "01248067",
"optimized": {
"axios": {
"src": "../../axios/index.js",
"file": "axios.js",
"fileHash": "1fb4cdd6",
"fileHash": "d8d02cf0",
"needsInterop": true
},
"vue": {
"src": "../../vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "1977567e",
"fileHash": "f8034b26",
"needsInterop": false
},
"vue-auth-image": {
"src": "../../vue-auth-image/vue-auth-image.js",
"file": "vue-auth-image.js",
"fileHash": "288ef0af",
"needsInterop": true
},
"vue-router": {
"src": "../../vue-router/dist/vue-router.mjs",
"file": "vue-router.js",
"fileHash": "822db929",
"fileHash": "b4ca170f",
"needsInterop": false
}
},
"chunks": {
"chunk-JDUKLXPO": {
"file": "chunk-JDUKLXPO.js"
},
"chunk-4GEKM2TG": {
"file": "chunk-4GEKM2TG.js"
},
"chunk-7FP5O474": {
"file": "chunk-7FP5O474.js"
"chunk-RSJERJUL": {
"file": "chunk-RSJERJUL.js"
}
}
}

1487
webui/node_modules/.vite/deps/axios.js generated vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,17 +0,0 @@
var __getOwnPropNames = Object.getOwnPropertyNames;
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
if (typeof require !== "undefined")
return require.apply(this, arguments);
throw new Error('Dynamic require of "' + x + '" is not supported');
});
var __commonJS = (cb, mod) => function __require2() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
export {
__require,
__commonJS
};
//# sourceMappingURL=chunk-7FP5O474.js.map

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

9
webui/node_modules/.vite/deps/chunk-RSJERJUL.js generated vendored Normal file
View file

@ -0,0 +1,9 @@
var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
export {
__commonJS
};
//# sourceMappingURL=chunk-RSJERJUL.js.map

View file

@ -1,63 +0,0 @@
import {
require_axios
} from "./chunk-JDUKLXPO.js";
import {
__commonJS,
__require
} from "./chunk-7FP5O474.js";
// node_modules/vue-auth-image/vue-auth-image.js
var require_vue_auth_image = __commonJS({
"node_modules/vue-auth-image/vue-auth-image.js"(exports, module) {
(function() {
var vueAuthImage = {};
var axios = typeof __require === "function" ? require_axios() : window.Axios;
if (!axios) {
throw new Error("[vue-auth-image] cannot locate Axios");
}
function setImgSrc(el, binding) {
if (binding.oldValue === void 0 || binding.value !== binding.oldValue) {
var imageUrl = binding.value;
axios({
method: "get",
url: imageUrl,
responseType: "arraybuffer"
}).then(function(resp) {
var mimeType = resp.headers["content-type"].toLowerCase();
var imgBase64 = new Buffer(resp.data, "binary").toString("base64");
el.src = "data:" + mimeType + ";base64," + imgBase64;
}).catch(function() {
el.src = imageUrl;
});
}
}
vueAuthImage.install = function(Vue2) {
Vue2.directive("auth-image", {
bind: function(el, binding) {
setImgSrc(el, binding);
},
componentUpdated: function(el, binding) {
setImgSrc(el, binding);
}
});
};
if (typeof exports == "object") {
module.exports = vueAuthImage;
} else if (typeof define == "function" && define.amd) {
define([], function() {
return vueAuthImage;
});
} else if (window.Vue) {
window.VueAuthImage = vueAuthImage;
Vue.use(vueAuthImage);
}
})();
}
});
// dep:vue-auth-image
var vue_auth_image_default = require_vue_auth_image();
export {
vue_auth_image_default as default
};
//# sourceMappingURL=vue-auth-image.js.map

View file

@ -1,7 +0,0 @@
{
"version": 3,
"sources": ["../../vue-auth-image/vue-auth-image.js", "dep:vue-auth-image"],
"sourcesContent": [";(function () {\n var vueAuthImage = {};\n var axios = typeof require === 'function'\n ? require('axios')\n : window.Axios;\n\n if (!axios) {\n throw new Error('[vue-auth-image] cannot locate Axios');\n }\n\n function setImgSrc(el, binding) {\n if (binding.oldValue === undefined || binding.value !== binding.oldValue) {\n var imageUrl = binding.value;\n axios({\n method: 'get',\n url: imageUrl,\n responseType: 'arraybuffer'\n })\n .then(function(resp) {\n var mimeType = resp.headers['content-type'].toLowerCase();\n var imgBase64 = new Buffer(resp.data, 'binary').toString('base64');\n el.src = 'data:' + mimeType + ';base64,' + imgBase64;\n }).catch((function() {\n el.src = imageUrl;\n }));\n }\n }\n\n vueAuthImage.install = function(Vue) {\n Vue.directive('auth-image', {\n bind: function(el, binding) {\n setImgSrc(el, binding);\n },\n componentUpdated: function(el, binding) {\n setImgSrc(el, binding);\n }\n });\n };\n\n if (typeof exports == 'object') {\n module.exports = vueAuthImage;\n } else if (typeof define == 'function' && define.amd) {\n define([], function() {\n return vueAuthImage;\n });\n } else if (window.Vue) {\n window.VueAuthImage = vueAuthImage;\n Vue.use(vueAuthImage);\n }\n})();\n", "export default require(\"./node_modules/vue-auth-image/vue-auth-image.js\");"],
"mappings": ";;;;;;;;;AAAA;AAAA;AAAC,KAAC,WAAY;AACZ,UAAI,eAAe,CAAC;AACpB,UAAI,QAAQ,OAAO,cAAY,aAC7B,kBACA,OAAO;AAET,UAAI,CAAC,OAAO;AACV,cAAM,IAAI,MAAM,sCAAsC;AAAA,MACxD;AAEA,eAAS,UAAU,IAAI,SAAS;AAC9B,YAAI,QAAQ,aAAa,UAAa,QAAQ,UAAU,QAAQ,UAAU;AACxE,cAAI,WAAW,QAAQ;AACvB,gBAAM;AAAA,YACJ,QAAQ;AAAA,YACR,KAAK;AAAA,YACL,cAAc;AAAA,UAChB,CAAC,EACA,KAAK,SAAS,MAAM;AACnB,gBAAI,WAAW,KAAK,QAAQ,gBAAgB,YAAY;AACxD,gBAAI,YAAY,IAAI,OAAO,KAAK,MAAM,QAAQ,EAAE,SAAS,QAAQ;AACjE,eAAG,MAAM,UAAU,WAAW,aAAa;AAAA,UAC7C,CAAC,EAAE,MAAO,WAAW;AACnB,eAAG,MAAM;AAAA,UACX,CAAE;AAAA,QACJ;AAAA,MACF;AAEA,mBAAa,UAAU,SAASA,MAAK;AACnC,QAAAA,KAAI,UAAU,cAAc;AAAA,UAC1B,MAAM,SAAS,IAAI,SAAS;AAC1B,sBAAU,IAAI,OAAO;AAAA,UACvB;AAAA,UACA,kBAAkB,SAAS,IAAI,SAAS;AACtC,sBAAU,IAAI,OAAO;AAAA,UACvB;AAAA,QACF,CAAC;AAAA,MACH;AAEA,UAAI,OAAO,WAAW,UAAU;AAC9B,eAAO,UAAU;AAAA,MACnB,WAAW,OAAO,UAAU,cAAc,OAAO,KAAK;AACpD,eAAO,CAAC,GAAG,WAAW;AACpB,iBAAO;AAAA,QACT,CAAC;AAAA,MACH,WAAW,OAAO,KAAK;AACrB,eAAO,eAAe;AACtB,YAAI,IAAI,YAAY;AAAA,MACtB;AAAA,IACF,GAAG;AAAA;AAAA;;;ACjDH,IAAO,yBAAQ;",
"names": ["Vue"]
}

View file

@ -16,7 +16,7 @@ import {
watch,
watchEffect
} from "./chunk-4GEKM2TG.js";
import "./chunk-7FP5O474.js";
import "./chunk-RSJERJUL.js";
// node_modules/@vue/devtools-api/lib/esm/env.js
function getDevtoolsGlobalHook() {

View file

@ -145,7 +145,7 @@ import {
withModifiers,
withScopeId
} from "./chunk-4GEKM2TG.js";
import "./chunk-7FP5O474.js";
import "./chunk-RSJERJUL.js";
export {
BaseTransition,
Comment,

View file

@ -1,29 +0,0 @@
{
"env": {
"node": true
},
"rules": {
"array-bracket-spacing": [2, "never"],
"block-scoped-var": 2,
"brace-style": [2, "1tbs"],
"camelcase": 1,
"computed-property-spacing": [2, "never"],
"curly": 2,
"eol-last": 2,
"eqeqeq": [2, "smart"],
"max-depth": [1, 3],
"max-len": [1, 80],
"max-statements": [1, 15],
"new-cap": 1,
"no-extend-native": 2,
"no-mixed-spaces-and-tabs": 2,
"no-trailing-spaces": 2,
"no-unused-vars": 1,
"no-use-before-define": [2, "nofunc"],
"object-curly-spacing": [2, "never"],
"quotes": [2, "single", "avoid-escape"],
"semi": [2, "always"],
"keyword-spacing": [2, {"before": true, "after": true}],
"space-unary-ops": 2
}
}

View file

@ -1,27 +0,0 @@
image: node:10
cache:
untracked: true
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
stages:
- setup
- test
- build
setup:
stage: setup
script:
- npm install
test:
stage: test
script:
- npm run lint
build:
stage: build
script:
- npm run build

View file

@ -1,15 +0,0 @@
# Change log
## 0.0.3 - 2019-11-10
- Fix typo in README regarding directive name to use
- Update README with instructions on how to use directive with Nuxt.js
## 0.0.2 - 2017-08-17
Add src tag update in the directive's componentUpdated method
## 0.0.1 - 2017-06-25
Initial release

View file

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2017 Jean Lalande
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,94 +0,0 @@
# vue-auth-image
> A reusable directive for [Vue.js](https://github.com/vuejs/vue) that loads
> an image requiring authentication and includes it as data in-line in your web
> pages.
[![npm version](https://img.shields.io/npm/v/vue-auth-image.svg)](https://www.npmjs.com/package/vue-auth-image)
## Overview
Contrary to other HTTP requests, browsers don't send common headers such as
`Authorization` when retrieving an image specified in a `<img>` tag.
This Vue.js directive overcomes this limitation by providing a way to load your
images as any other resources and then embedding them into your web pages using
the `data:image/FILETYPE;base64` URI scheme.
## Requirements
- vue: \^2.0.0
- axios: >= 0.5.0
## Install
### npm
``` sh
$ npm install vue-auth-image --save
```
### Using a CDN
``` html
<script src="https://cdn.jsdelivr.net/npm/vue-auth-image/vue-auth-image.js"></script>
<!-- OR -->
<script src="https://cdn.jsdelivr.net/npm/vue-auth-image/vue-auth-image.min.js"></script>
```
### Using Nuxt.js
To use `vue-auth-image` with [Nuxt.js](https://nuxtjs.org/), start by creating
a new plugin file name `vue-auth-image.js` in your `plugins/` directory. Add
the following content to it:
```javascript
import Vue from 'vue';
import VueAuthImage from 'vue-auth-image';
Vue.use(VueAuthImage);
```
Then, add the plugin to your `nuxt.config.js` at the root of your project:
```javascript
plugins: [
'@/plugins/vue-auth-image.js'
]
```
## API
### auth-image
A directive that requests an image URI asynchronously and embed it into your
`<img>` tag using the [data URI scheme](https://en.wikipedia.org/wiki/Data_URI_scheme).
``` js
import axios from 'axios';
import Vue from 'vue';
import VueAuthImage from 'vue-auth-image';
// register vue-auth-image directive
Vue.use(VueAuthImage);
// set Authorization header used by axios
var authHeader = 'Bearer ' + localStorage.getItem('id_token');
axios.defaults.headers.common['Authorization'] = authHeader;
```
Once the directive is registered, you can use it in your Vue templates.
``` html
<template>
<div>
<img v-auth-image="https://api.app.com/images/authenticatedImg.png">
</div>
</template>
```
See `/example` for a demo. To build it, run `npm install && npm run build`.
## License
[MIT](https://opensource.org/licenses/MIT)

View file

@ -1,12 +0,0 @@
var Vue = require('vue/dist/vue.common.js');
var VueAuthImage = require('../vue-auth-image');
var axios = require('axios');
Vue.use(VueAuthImage);
var authHeader = 'Bearer ' + 'id_token';
axios.defaults.headers.common['Authorization'] = authHeader;
new Vue({
el: 'div'
});

View file

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>vue-auth-image example</title>
<style>
img {
width: 300px;
}
</style>
</head>
<body>
<div>
<img v-auth-image="'https://raw.githubusercontent.com/vuejs/art/master/vue-badge.png'">
</div>
<script src="example.build.js"></script>
</body>
</html>

View file

@ -1,47 +0,0 @@
{
"name": "vue-auth-image",
"version": "0.0.3",
"description": "Vue directive to load and display secured images",
"author": "Jean Lalande <jeanlalande@gmail.com>",
"license": "MIT",
"main": "vue-auth-image.js",
"scripts": {
"build": "webpack example/example.js example/example.build.js && uglifyjs vue-auth-image.js -c -m > vue-auth-image.min.js",
"dev": "webpack --watch example/example.js example/example.build.js",
"lint": "eslint vue-auth-image.js example/example.js"
},
"repository": {
"type": "git",
"url": "https://gitlab.com/jlalande/vue-auth-image.git"
},
"homepage": "https://gitlab.com/jlalande/vue-auth-image",
"bugs": {
"url": "https://gitlab.com/jlalande/vue-auth-image/issues"
},
"peerDependencies": {
"vue": "^2.0.0",
"axios": ">= 0.5.0 < 1"
},
"devDependencies": {
"axios": "^0.19.0",
"babel-eslint": "^7.2.3",
"eslint": "^4.1.1",
"uglify-js": "^3.6.0",
"vue": "^2.6.10",
"webpack": "^3.12.0"
},
"keywords": [
"vue",
"vue-auth-image",
"directive",
"authentication",
"authorization",
"token",
"headers",
"image",
"src",
"data-uri",
"data",
"uri"
]
}

View file

@ -1,50 +0,0 @@
;(function () {
var vueAuthImage = {};
var axios = typeof require === 'function'
? require('axios')
: window.Axios;
if (!axios) {
throw new Error('[vue-auth-image] cannot locate Axios');
}
function setImgSrc(el, binding) {
if (binding.oldValue === undefined || binding.value !== binding.oldValue) {
var imageUrl = binding.value;
axios({
method: 'get',
url: imageUrl,
responseType: 'arraybuffer'
})
.then(function(resp) {
var mimeType = resp.headers['content-type'].toLowerCase();
var imgBase64 = new Buffer(resp.data, 'binary').toString('base64');
el.src = 'data:' + mimeType + ';base64,' + imgBase64;
}).catch((function() {
el.src = imageUrl;
}));
}
}
vueAuthImage.install = function(Vue) {
Vue.directive('auth-image', {
bind: function(el, binding) {
setImgSrc(el, binding);
},
componentUpdated: function(el, binding) {
setImgSrc(el, binding);
}
});
};
if (typeof exports == 'object') {
module.exports = vueAuthImage;
} else if (typeof define == 'function' && define.amd) {
define([], function() {
return vueAuthImage;
});
} else if (window.Vue) {
window.VueAuthImage = vueAuthImage;
Vue.use(vueAuthImage);
}
})();

View file

@ -1 +0,0 @@
!function(){var e={},t="function"==typeof require?require("axios"):window.Axios;if(!t)throw new Error("[vue-auth-image] cannot locate Axios");function o(o,e){if(void 0===e.oldValue||e.value!==e.oldValue){var n=e.value;t({method:"get",url:n,responseType:"arraybuffer"}).then(function(e){var n=e.headers["content-type"].toLowerCase(),t=new Buffer(e.data,"binary").toString("base64");o.src="data:"+n+";base64,"+t}).catch(function(){o.src=n})}}e.install=function(e){e.directive("auth-image",{bind:function(e,n){o(e,n)},componentUpdated:function(e,n){o(e,n)}})},"object"==typeof exports?module.exports=e:"function"==typeof define&&define.amd?define([],function(){return e}):window.Vue&&(window.VueAuthImage=e,Vue.use(e))}();

View file

@ -11,7 +11,6 @@
"axios": "^0.27.2",
"bootstrap-icons": "^1.10.2",
"vue": "^3.2.37",
"vue-auth-image": "^0.0.3",
"vue-router": "^4.1.3"
},
"devDependencies": {
@ -836,15 +835,6 @@
"@vue/shared": "3.2.37"
}
},
"node_modules/vue-auth-image": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/vue-auth-image/-/vue-auth-image-0.0.3.tgz",
"integrity": "sha512-/x3+3crzDpJO3Wl8QjNj53QLLkUdQviDzQCrgpg/390R/1Ptp8UcilaDSYQknNQxNrUj/xQegWttodiTSfPRLA==",
"peerDependencies": {
"axios": ">= 0.5.0 < 1",
"vue": "^2.0.0"
}
},
"node_modules/vue-router": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.1.4.tgz",
@ -1354,12 +1344,6 @@
"@vue/shared": "3.2.37"
}
},
"vue-auth-image": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/vue-auth-image/-/vue-auth-image-0.0.3.tgz",
"integrity": "sha512-/x3+3crzDpJO3Wl8QjNj53QLLkUdQviDzQCrgpg/390R/1Ptp8UcilaDSYQknNQxNrUj/xQegWttodiTSfPRLA==",
"requires": {}
},
"vue-router": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.1.4.tgz",

View file

@ -12,7 +12,6 @@
"axios": "^0.27.2",
"bootstrap-icons": "^1.10.2",
"vue": "^3.2.37",
"vue-auth-image": "^0.0.3",
"vue-router": "^4.1.3"
},
"devDependencies": {

View file

@ -2,66 +2,83 @@
import { RouterLink, RouterView } from 'vue-router'
</script>
<script>
export default {}
export default {
data() {
return {
my_id: sessionStorage.getItem("token"),
}
},
}
</script>
<template>
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
<!--<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3 fs-6" href="#/">WASAPhoto</a>
<button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</header>
</header>-->
<div class="container-fluid">
<div class="row">
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<!--<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<div class="position-sticky pt-3 sidebar-sticky">
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted text-uppercase">
<span>General</span>
<span>WASAPhoto</span>
</h6>
<ul class="nav flex-column">
<li class="nav-item">
<RouterLink to="/" class="nav-link">
<svg class="feather"><use href="/feather-sprite-v4.29.0.svg#home"/></svg>
Home
Stream
</RouterLink>
</li>
<li class="nav-item">
<RouterLink to="/link1" class="nav-link">
<svg class="feather"><use href="/feather-sprite-v4.29.0.svg#layout"/></svg>
Menu item 1
</RouterLink>
</li>
<li class="nav-item">
<RouterLink to="/link2" class="nav-link">
<svg class="feather"><use href="/feather-sprite-v4.29.0.svg#key"/></svg>
Menu item 2
Search
</RouterLink>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted text-uppercase">
<span>Secondary menu</span>
<span>Account</span>
</h6>
<ul class="nav flex-column">
<li class="nav-item">
<RouterLink :to="'/some/' + 'variable_here' + '/path'" class="nav-link">
<svg class="feather"><use href="/feather-sprite-v4.29.0.svg#file-text"/></svg>
Item 1
Your profile
</RouterLink>
</li>
</ul>
</div>
</nav>
</nav>-->
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
<!---<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">-->
<main class="mb-5">
<RouterView />
</main>
<nav id="global-nav" class="navbar fixed-bottom navbar-light bg-light row">
<div class="collapse navbar-collapse" id="navbarNav"></div>
<RouterLink to="/" class="col-4 text-center">
<i class="bi bi-house text-dark" style="font-size: 2em"></i>
</RouterLink>
<RouterLink to="/search" class="col-4 text-center">
<i class="bi bi-search text-dark" style="font-size: 2em"></i>
</RouterLink>
<RouterLink :to="'/profile/' + my_id" class="col-4 text-center">
<i class="bi bi-person text-dark" style="font-size: 2em"></i>
</RouterLink>
</nav>
</div>
</div>
</template>
<style>
#global-nav a.router-link-active {
font-size: 1.2em
}
</style>

View file

@ -8,7 +8,8 @@ export default {
user_followed: this.post_followed,
user_banned: this.banned,
myself: this.my_id == this.user_id,
showModal: false,
show_post_form: false,
upload_file: null,
}
},
methods: {
@ -47,9 +48,18 @@ export default {
})
.catch(error => alert(error.toString()));
},
openModal() {
var modal = document.getElementById("exampleModal1");
modal.modal();
load_file(e) {
let files = e.target.files || e.dataTransfer.files;
if (!files.length) return;
this.upload_file = files[0];
},
submit_file() {
this.$axios.post("/users/" + this.my_id + "/photos", this.upload_file)
.then(response => {
this.show_post_form = false
this.$emit('updatePosts')
})
.catch(error => alert(error.toString()));
},
},
created() {
@ -74,21 +84,31 @@ export default {
<div v-if="!myself" class="d-flex">
<button v-if="!user_banned" @click="ban" type="button" class="btn btn-outline-danger me-2">Ban</button>
<button v-if="user_banned" @click="unban" type="button" class="btn btn-danger me-2">Banned</button>
<button v-if="!user_followed" @click="follow" type="button" class="btn btn-outline-primary">Follow</button>
<button v-if="user_followed" @click="unfollow" type="button" class="btn btn-primary">Following</button>
<button v-if="!user_followed" @click="follow" type="button" class="btn btn-primary">Follow</button>
<button v-if="user_followed" @click="unfollow" type="button" class="btn btn-outline-primary">Following</button>
</div>
<div v-if="(myself && !show_new_post)">
<button disabled type="button" class="btn btn-secondary">Yourself</button>
</div>
<div v-if="(myself && show_new_post)" class="d-flex">
<button type="button" class="btn btn-primary" @click="showModal = true">Post</button>
<button v-if="!show_post_form" type="button" class="btn btn-primary" @click="show_post_form = true">Post</button>
</div>
</div>
</div>
</div>
<div class="row" v-if="show_post_form">
<div class="col-9">
<div class="card-body h-100 d-flex align-items-center">
<input @change="load_file" class="form-control form-control-lg" id="formFileLg" type="file" />
</div>
</div>
<div class="col-3">
<div class="card-body d-flex justify-content-end">
<button type="button" class="btn btn-primary btn-lg" @click="submit_file">Publish</button>
</div>
</div>
</div>
</div>
</div>
</template>

View file

@ -56,30 +56,19 @@ export default {
</script>
<template>
<div>
<div
class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Home page</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group me-2">
<button type="button" class="btn btn-sm btn-outline-secondary" @click="refresh">
Refresh
</button>
</div>
<div class="btn-group me-2">
<button type="button" class="btn btn-sm btn-outline-primary" @click="newPost">
New
</button>
</div>
</div>
</div>
<div class="mt-4">
<div class="container">
<div class="row justify-content-md-center">
<div class="col-xl-6 col-lg-9">
<h3 class="card-title border-bottom mb-4 pb-2 text-center">Your daily WASAStream!</h3>
<ErrorMsg v-if="errormsg" :msg="errormsg"></ErrorMsg>
<div v-if="(stream_data.length == 0)" class="alert alert-secondary text-center" role="alert">
There's nothing here 😢
<br />Why don't you start following somebody? 👻
</div>
<div id="main-content" v-for="item of stream_data">
<PostCard :user_id="item.user_id"
:photo_id="item.photo_id"
@ -92,7 +81,7 @@ export default {
</div>
<div v-if="data_ended" class="alert alert-secondary text-center" role="alert">
Hai visualizzato tutti i post. Hooray! 👻
This is the end of your stream. Hooray! 👻
</div>
<LoadingSpinner :loading="loading" /><br />

View file

@ -85,7 +85,8 @@ export default {
:banned = "user_data['banned']"
:my_id = "my_id"
:show_new_post = "true"
@updateInfo = "getMainData" />
@updateInfo = "getMainData"
@updatePosts = "refresh" />
<div class="row text-center mt-2 mb-3">
<div class="col-4" style="border-right: 1px">

View file

@ -32,9 +32,6 @@ export default {
let response = await this.$axios.get("/users?query=" + this.field_username + "&start_index=" + this.start_idx + "&limit=" + this.limit);
if (response.data.length == 0) this.data_ended = true;
else this.stream_data = this.stream_data.concat(response.data);
this.errormsg = this.stream_data; // todo: temoprary
this.loading = false;
} catch (e) {
this.errormsg = e.toString();
@ -59,22 +56,18 @@ export default {
// todo: may not work in 4k screens :/
this.limit = Math.round(window.innerHeight / 72);
this.scroll();
this.loadContent();
}
}
</script>
<template>
<div>
<div
class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Search</h1>
</div>
<div class="mt-4">
<div class="container">
<div class="row justify-content-md-center">
<div class="col-xl-6 col-lg-9">
<h3 class="card-title border-bottom mb-4 pb-2 text-center">WASASearch</h3>
<ErrorMsg v-if="errormsg" :msg="errormsg"></ErrorMsg>
<div class="form-floating mb-4">