1
0
This commit is contained in:
syui 2024-04-02 22:32:52 +09:00
parent 9e68683bf0
commit 9798c33252
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
4 changed files with 129 additions and 39 deletions

View File

@ -8,9 +8,10 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"axios": "^0.25.0", "axios": "^1.6.8",
"core-js": "^3.6.4", "core-js": "^3.6.4",
"hooper": "^0.3.4", "hooper": "^0.3.4",
"moment": "^2.30.1",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-meta": "^2.4.0", "vue-meta": "^2.4.0",
"vue-template-compiler": "^2.6.14" "vue-template-compiler": "^2.6.14"

View File

@ -52,13 +52,23 @@
</div> </div>
</div> </div>
<div class="page_title">
<div class="page_data"> <div class="bsky_comment">
<table> <span v-for="i in api_json.data" class="comment">
<thead> <p class="comment-body">
<tr> <img :src="i.avatar" v-if="i.avatar" class="comment"/> <span class="comment-time" v-if="i.handle">{{ moment(i.updated_at) }}</span> <span class="comment-handle" v-if="i.handle"><a :href="i.bsky_url">@{{ i.handle }}</a></span>
<th scope="col"><span class="icon-ai"></span></th> <span class="comment-text">{{ i.text }}</span>
<th scope="col">title</th> </p>
</span>
</div>
<div class="page_title">
<div class="page_data">
<table>
<thead>
<tr>
<th scope="col"><span class="icon-ai"></span></th>
<th scope="col">title</th>
<th scope="col">body</th> <th scope="col">body</th>
<th scope="col">author</th> <th scope="col">author</th>
</tr> </tr>
@ -90,6 +100,8 @@ import {
} from 'hooper'; } from 'hooper';
import 'hooper/dist/hooper.css'; import 'hooper/dist/hooper.css';
import axios from 'axios'
import moment from "moment";
var page = 21; var page = 21;
var loc = window.location.pathname.split('/').slice(-1)[0]; var loc = window.location.pathname.split('/').slice(-1)[0];
@ -106,6 +118,13 @@ export default {
}, },
data() { data() {
return { return {
bsky_pds: "https://bsky.social/xrpc",
bsky_handle: "yui.syui.ai",
bsky_cursor: null,
bsky_cid: "",
bsky_json: null,
api_url: null,
api_json: null,
loading: true, loading: true,
url: "/", url: "/",
s_a: 0, s_a: 0,
@ -122,6 +141,9 @@ export default {
}; };
}, },
methods: { methods: {
moment(date) {
return moment.utc(date).format("YYYY.MM.DD");
},
page_run(s) { page_run(s) {
this.loc = s; this.loc = s;
this.hooperSettings.initialSlide = s; this.hooperSettings.initialSlide = s;
@ -129,6 +151,29 @@ export default {
load() { load() {
this.loading = false; this.loading = false;
} }
},
mounted() {
if (window.location.host === "localhost:8080") {
this.api_url = "/api/";
} else if (window.location.host === "192.168.11.12:8080"){
this.api_url = "/api/";
} else {
if (location.protocol !== "https:") {
location.replace("https:" + location.href.substring(location.protocol.length));
}
this.api_url = "https://api.syui.ai";
}
// com.atproto.repo.describeRepo
// com.atproto.repo.listRecords
// com.atproto.repo.getRecord
//let url = this.bsky_pds + "/com.atproto.repo.listRecords?repo=" + this.bsky_handle + "&collection=app.bsky.feed.post";
//axios
// .get(url,{ crossdomain: true })
// .then(response => (this.bsky_json = response));
let url = this.api_url + "/users/2/ma?itemsPerPage=4000";
axios
.get(url,{ crossdomain: true })
.then(response => (this.api_json = response));
} }
}; };
</script> </script>
@ -241,6 +286,40 @@ footer {
margin-top:100px; margin-top:100px;
} }
span.comment-time {
float: right;
padding: 0 5px 0 5px;
color: #999;
}
span.comment-handle {
padding: 0 5px 0 5px;
position: absolute;
}
span.comment-handle a {
color: rgb(16, 131, 254);
}
img.comment {
width:60px;
}
p.comment-body {
padding: 5px 70px 5px 70px;
border-bottom: solid 1px #eee;
}
span.comment-text {
padding:10px;
}
span.comment {
}
.bsky_comment {
}
@media screen and (max-width:1000px) { @media screen and (max-width:1000px) {
img{ width:100%; } img{ width:100%; }
.page_title a img { .page_title a img {

View File

@ -1,4 +1,12 @@
module.exports = { module.exports = {
devServer: {
proxy: {
"^/api*": {
target: "https://api.syui.ai",
pathRewrite: { "^/api": "" },
}
}
},
publicPath: "/", publicPath: "/",
configureWebpack: { configureWebpack: {
output: { output: {

View File

@ -37,30 +37,6 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.4.tgz#a770e98fd785c231af9d93f6459d36770993fb32" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.4.tgz#a770e98fd785c231af9d93f6459d36770993fb32"
integrity sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA== integrity sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==
"@fortawesome/fontawesome-common-types@6.5.1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.5.1.tgz#fdb1ec4952b689f5f7aa0bffe46180bb35490032"
integrity sha512-GkWzv+L6d2bI5f/Vk6ikJ9xtl7dfXtoRu3YGE6nq0p/FFqA1ebMOAWg3XgRyb0I6LYyYkiAo+3/KrwuBp8xG7A==
"@fortawesome/fontawesome-svg-core@^6.5.1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.5.1.tgz#9d56d46bddad78a7ebb2043a97957039fcebcf0a"
integrity sha512-MfRCYlQPXoLlpem+egxjfkEuP9UQswTrlCOsknus/NcMoblTH2g0jPrapbcIb04KGA7E2GZxbAccGZfWoYgsrQ==
dependencies:
"@fortawesome/fontawesome-common-types" "6.5.1"
"@fortawesome/free-solid-svg-icons@^6.5.1":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.5.1.tgz#737b8d787debe88b400ab7528f47be333031274a"
integrity sha512-S1PPfU3mIJa59biTtXJz1oI0+KAXW6bkAb31XKhxdxtuXDiUIFsih4JR1v5BbxY7hVHsD1RKq+jRkVRaf773NQ==
dependencies:
"@fortawesome/fontawesome-common-types" "6.5.1"
"@fortawesome/vue-fontawesome@^3.0.6":
version "3.0.6"
resolved "https://registry.yarnpkg.com/@fortawesome/vue-fontawesome/-/vue-fontawesome-3.0.6.tgz#c5e627475c10869a091280610c96411d18206f3a"
integrity sha512-akrL7lTroyNpPkoHtvK2UpsMzJr6jXdHaQ0YdcwqDsB8jdwlpNHZYijpOUd9KJsARr+VB3WXY4EyObepqJ4ytQ==
"@hapi/address@2.x.x": "@hapi/address@2.x.x":
version "2.1.4" version "2.1.4"
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
@ -879,12 +855,14 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3"
integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==
axios@^0.25.0: axios@^1.6.8:
version "0.25.0" version "1.6.8"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.25.0.tgz#349cfbb31331a9b4453190791760a8d35b093e0a" resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66"
integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g== integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==
dependencies: dependencies:
follow-redirects "^1.14.7" follow-redirects "^1.15.6"
form-data "^4.0.0"
proxy-from-env "^1.1.0"
balanced-match@^1.0.0: balanced-match@^1.0.0:
version "1.0.2" version "1.0.2"
@ -1498,7 +1476,7 @@ color@^3.0.0:
color-convert "^1.9.3" color-convert "^1.9.3"
color-string "^1.6.0" color-string "^1.6.0"
combined-stream@^1.0.6, combined-stream@~1.0.6: combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
version "1.0.8" version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
@ -2700,11 +2678,16 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3" inherits "^2.0.3"
readable-stream "^2.3.6" readable-stream "^2.3.6"
follow-redirects@^1.0.0, follow-redirects@^1.14.7: follow-redirects@^1.0.0:
version "1.15.2" version "1.15.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13"
integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==
follow-redirects@^1.15.6:
version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
for-each@^0.3.3: for-each@^0.3.3:
version "0.3.3" version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
@ -2722,6 +2705,15 @@ forever-agent@~0.6.1:
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==
form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
form-data@~2.3.2: form-data@~2.3.2:
version "2.3.3" version "2.3.3"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
@ -4251,6 +4243,11 @@ mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.6, mkdirp@~0.5.1:
dependencies: dependencies:
minimist "^1.2.6" minimist "^1.2.6"
moment@^2.30.1:
version "2.30.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==
move-concurrently@^1.0.1: move-concurrently@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
@ -5275,6 +5272,11 @@ proxy-addr@~2.0.7:
forwarded "0.2.0" forwarded "0.2.0"
ipaddr.js "1.9.1" ipaddr.js "1.9.1"
proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
prr@~1.0.1: prr@~1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"