1
0
This commit is contained in:
syui 2024-04-12 04:29:51 +09:00
parent 601fbf9f28
commit 792f153f56
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

View File

@ -112,6 +112,7 @@
</div> </div>
<div class="glb" v-if="glb_status == true"> <div class="glb" v-if="glb_status == true">
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
<model-viewer v-if="glb_next !== 0" class="ar" :src="'/obj/card_' + glb_next + '.glb'" ar-modes="scene-viewer webxr quick-look" auto-rotate autoplay ar camera-controls></model-viewer> <model-viewer v-if="glb_next !== 0" class="ar" :src="'/obj/card_' + glb_next + '.glb'" ar-modes="scene-viewer webxr quick-look" auto-rotate autoplay ar camera-controls></model-viewer>
<model-viewer v-else class="ar" :src="'/obj/card_' + cards.data.filter((v) => v.skill == '3d' && (v.card >= 1 && v.card <= 14 || v.card == 64))[0].card + '.glb'" ar-modes="scene-viewer webxr quick-look" auto-rotate autoplay ar camera-controls></model-viewer> <model-viewer v-else class="ar" :src="'/obj/card_' + cards.data.filter((v) => v.skill == '3d' && (v.card >= 1 && v.card <= 14 || v.card == 64))[0].card + '.glb'" ar-modes="scene-viewer webxr quick-look" auto-rotate autoplay ar camera-controls></model-viewer>
<span v-for="(ii, index) in cards.data.filter((v) => v.skill == '3d' && (v.card >= 1 && v.card <= 14 || v.card == 64))" class="glb"> <span v-for="(ii, index) in cards.data.filter((v) => v.skill == '3d' && (v.card >= 1 && v.card <= 14 || v.card == 64))" class="glb">
@ -307,7 +308,7 @@
<div v-if="loc.length == 0"> <div v-if="loc.length == 0">
<div v-if="cards" class="bluesky-card"> <div v-if="cards" class="bluesky-card">
<p>user : <a :href='"/" + user.data.username'><code>{{ user.data.username }}</code></a></p> <p>user : <a :href='"/" + user.data.username'><code v-if="user.data.username">{{ user.data.username }}</code></a></p>
<p>id : <code>{{ user.data.id }}</code></p> <p>id : <code>{{ user.data.id }}</code></p>
<p>did : <code>{{ user.data.did }}</code></p> <p>did : <code>{{ user.data.did }}</code></p>
<p>aiten : <code>{{ user.data.aiten }}</code></p> <p>aiten : <code>{{ user.data.aiten }}</code></p>
@ -330,7 +331,7 @@
<li v-for="i in record.data"> <li v-for="i in record.data">
<p v-if="i.delete === false"><span class="menu-right-top"> <p v-if="i.delete === false"><span class="menu-right-top">
<button v-if="i.model === true"><i class="fa-solid fa-cube"></i></button> <button v-if="i.fav != '0'">✧</button> <a :href="'https://git.syui.ai/' + i.username" target="_blank"><button v-if="i.username == 'ai'"><i class="fa-brands fa-git-alt"></i></button></a> <button>ID {{ i.id }}</button></span></p> <button v-if="i.model === true"><i class="fa-solid fa-cube"></i></button> <button v-if="i.fav != '0'">✧</button> <a :href="'https://git.syui.ai/' + i.username" target="_blank"><button v-if="i.username == 'ai'"><i class="fa-brands fa-git-alt"></i></button></a> <button>ID {{ i.id }}</button></span></p>
<p v-if="i.delete === false"><span class="text"><a :href="'/' + i.username">{{ i.username }}</a></span></p> <p v-if="i.delete === false"><span class="text"><a :href="'/' + i.username" v-if="i.username">{{ i.username }}</a></span></p>
<span class="menu-right-did" v-if="i.delete === false && did_enable === true && i.did.includes('did:') === true"> <span class="menu-right-did" v-if="i.delete === false && did_enable === true && i.did.includes('did:') === true">
<button><a :href="'https://plc.directory/' + i.did + '/log'" target="_blank">{{ i.did }}</a></button> <button><a :href="'https://plc.directory/' + i.did + '/log'" target="_blank">{{ i.did }}</a></button>
</span> </span>
@ -559,9 +560,8 @@
<p>集めた人は<a href="https://bsky.app/profile/syui.ai">@syui</a>まで連絡してみて</p> <p>集めた人は<a href="https://bsky.app/profile/syui.ai">@syui</a>まで連絡してみて</p>
<p>ただしリアルカードに変わるのはこちらの<a href="/owner">所有者</a>がいないカードに限られます</p> <p>ただしリアルカードに変わるのはこちらの<a href="/owner">所有者</a>がいないカードに限られます</p>
<h3>link</h3> <h3>link</h3>
<p><a class="menu-link" href="/fa">fanart</a> <a class="menu-link" href="/ph">photo</a> <a class="menu-link" href="/te">aiten</a> <a class="menu-link" href="/pr">fav</a> <a class="menu-link" href="/vr">model</a></p> <p><a class="menu-link" href="/fa">fanart</a> <a class="menu-link" href="/te">aiten</a> <a class="menu-link" href="/vr">model</a></p>
</div> </div>
<div v-if="loc === 'en'" class="text-content"> <div v-if="loc === 'en'" class="text-content">
@ -851,6 +851,7 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import moment from "moment"; import moment from "moment";
var loc = window.location.pathname.split('/').slice(-1)[0]; var loc = window.location.pathname.split('/').slice(-1)[0];
export default { export default {
@ -877,65 +878,70 @@ export default {
data () { data () {
return { return {
host: window.location.host, host: window.location.host,
all: null, all: "",
badge_aiten: null, badge_aiten: "",
card: null, card: "",
cards: null, cards: "",
loc: window.location.pathname.split('/').slice(-1)[0], loc: window.location.pathname.split('/').slice(-1)[0],
username: null, username: "ai",
id: null, id: "",
model: null, model: "",
record: null, record: "",
url: null, url: "",
user: null, user: "",
userid: null, userid: "",
ucard: null, ucard: "",
status: null, status: "",
premium: false, premium: false,
premium_text: null, premium_text: "",
rcards: null, rcards: "",
fanarts: null, fanarts: "",
photos: null, photos: "",
info: false, info: false,
time: null, time: "",
aiten: null, aiten: "",
fav: null, fav: "",
card_fav: null, card_fav: "",
user_fav: null, user_fav: "",
book_user: null, book_user: "",
glb_status: false, glb_status: false,
glb_next: 0, glb_next: 0,
moji_status: false, moji_status: false,
did_enable: null, did_enable: "",
chara_user: null, chara_user: "",
card_sed: false, card_sed: false,
card_status: null, card_status: "",
card_skill: null, card_skill: "",
model_attack: null, model_attack: "",
model_critical: null, model_critical: "",
model_critical_d: null, model_critical_d: "",
sevens: null, sevens: "",
game: null, game: "",
game_lv: null, game_lv: "",
api_url: null, api_url: "",
bsky_mode: false, bsky_mode: false,
did: null, did: "",
card_origin_status: false, card_origin_status: false,
useragent: window.navigator.userAgent.toLowerCase(), useragent: window.navigator.userAgent.toLowerCase(),
iframe_status: false, iframe_status: false,
term_status: false, term_status: false,
sort_key: null, sort_key: "",
mount_google_md: false,
} }
}, },
components: {
},
filters: { filters: {
moment: function(date) { moment: function(date) {
return moment.unix(date).format("YYYY.MM.DD"); return moment.unix(date).format("YYYY.MM.DD");
}, },
}, },
computed: {
loadComponent() {
return () => import('@google/model-viewer');
}
},
mounted() { mounted() {
this.loadComponent(); this.username = "ai";
this.mount_google_md = false;
if (window.location.host === "localhost:8080") { if (window.location.host === "localhost:8080") {
this.api_url = "/api/"; this.api_url = "/api/";
} else if (window.location.host === "192.168.11.12:8080"){ } else if (window.location.host === "192.168.11.12:8080"){
@ -947,28 +953,27 @@ export default {
this.api_url = "https://api.syui.ai/"; this.api_url = "https://api.syui.ai/";
} }
if (loc === 'owner' || loc === 'te' || loc === 'c'){ if (loc === 'owner' || loc === 'te' || loc === 'c'){
this.rcards = "";
axios axios
.get("/json/card.json") .get("/json/card.json")
.then(response => (this.rcards = response)); .then(response => (this.rcards = response));
if (loc.length > 1){
axios
.get(url,{ crossdomain: true })
.then(response => (this.cards = response));
}
} else if (loc === 'fa'){
axios
.get("/json/fanart.json")
.then(response => (this.fanarts = response));
} else if (loc === 'svn'){ } else if (loc === 'svn'){
this.cards = "";
let url = this.api_url + "sevs?itemsPerPage=4000"; let url = this.api_url + "sevs?itemsPerPage=4000";
axios axios
.get(url) .get(url)
.then(response => (this.sevens = response)); .then(response => (this.sevens = response));
} else if (loc === 'ph'){ } else if (loc === null || loc === undefined || loc === ''){
axios let url = this.api_url + "users?itemsPerPage=3000";
.get("/json/photo.json") axios.get(url,{ crossdomain: true })
.then(response => (this.photos = response)); .then(response => {
this.record = response;
})
} else { } else {
if (this.mount_google_md === false) {
//this.loadComponent();
this.mount_google_md = true;
}
let url = this.api_url + "users?itemsPerPage=3000"; let url = this.api_url + "users?itemsPerPage=3000";
axios.get(url,{ crossdomain: true }) axios.get(url,{ crossdomain: true })
.then(response => { .then(response => {
@ -988,38 +993,32 @@ export default {
this.user_room = this.record.data.find((v) => v.username == loc).room; this.user_room = this.record.data.find((v) => v.username == loc).room;
let url = this.api_url + "users/" + this.id + "/card?itemsPerPage=4000"; let url = this.api_url + "users/" + this.id + "/card?itemsPerPage=4000";
axios axios
.get("/json/card.json") .get("/json/card.json")
.then(response => (this.rcards = response)); .then(response => (this.rcards = response));
if (loc.length > 1){ if (loc.length > 1){
axios axios
.get(url,{ crossdomain: true }) .get(url,{ crossdomain: true })
.then(response => { this.cards = response .then(response => { this.cards = response
for (let i = 1; i <= 14; i++) { for (let i = 1; i <= 14; i++) {
this.all = this.cards.data.some( this.all = this.cards.data.some(
b => b.card === i, b => b.card === i,
); );
if (this.all === false) { if (this.all === false) {
break; break;
} }
} }
for (let i = 65; i <= 67; i++) { for (let i = 65; i <= 67; i++) {
this.badge_aiten = this.cards.data.some( this.badge_aiten = this.cards.data.some(
b => b.card === i, b => b.card === i,
); );
if (this.badge_aiten === false) { if (this.badge_aiten === false) {
break; break;
} }
} }
}); });
} }
}) })
.catch(error => console.log(error));
}}, }},
computed: {
loadComponent() {
return () => import('@google/model-viewer');
}
},
methods: { methods: {
submit() { submit() {
let url = this.api_url + "users/" + this.id + "/card?itemsPerPage=3000"; let url = this.api_url + "users/" + this.id + "/card?itemsPerPage=3000";
@ -1066,7 +1065,7 @@ export default {
}); });
}, },
cardinfo(){ cardinfo(){
this.cards = {}; this.cards = "";
let url = this.api_url + "users/" + this.id + "/card?itemsPerPage=4000"; let url = this.api_url + "users/" + this.id + "/card?itemsPerPage=4000";
axios axios
.get(url,{ crossdomain: true }) .get(url,{ crossdomain: true })
@ -1125,6 +1124,9 @@ body{
background-color: #f1f1f1; background-color: #f1f1f1;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 18px; font-size: 18px;
overflow-wrap: anywhere;
word-break: normal;
line-break: strict;
} }
a { a {
@ -1173,9 +1175,7 @@ span.text {
footer#footer { footer#footer {
text-align: center; text-align: center;
} }
span.text {
word-break: break-all;
}
p.tl-avatar img { p.tl-avatar img {
width: 20px; width: 20px;
} }
@ -1664,9 +1664,6 @@ button.unity i#vrm_button:hover {
.bluesky-record p{padding:0 20px 0} .bluesky-record p{padding:0 20px 0}
.bluesky-record{border-radius:10px;margin:0px 0px 0 0} .bluesky-record{border-radius:10px;margin:0px 0px 0 0}
footer#footer{text-align:center} footer#footer{text-align:center}
span.text {
word-break: break-all;
}
code { code {
padding: 10px; padding: 10px;
background-color: #fff; background-color: #fff;
@ -1758,7 +1755,6 @@ span.glb {
.menu-right code { .menu-right code {
padding: 0; padding: 0;
word-break: break-all;
} }
blockquote.did { blockquote.did {