Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐤🎣 ↝ Claiming of anomalies introduced along with Unity build and flask wrapper (via submodule) #48

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c2ba82c
🌰❄️ ↝ Merge pull request #17 from Signal-K/wb3-10-implement-off-chain…
Gizmotronn Feb 2, 2023
7070c3f
🥎🤖 ↝ Merge pull request #19 from Signal-K/wb3-11-migrate-offchain-aut…
Gizmotronn Feb 11, 2023
462681c
🩸🚀 ↝ Merge pull request #21 from Signal-K/wb3-12-add-lens-graphql-cli…
Gizmotronn Feb 20, 2023
ce99f3a
🐟🐓 ↝ Merge pull request #43 from Signal-K/wb3-15-add-voting-mechanism…
Gizmotronn Apr 20, 2023
89efbba
=🫀🦾 ↝ Updating layout & order of operations for planet user classific…
Gizmotronn Apr 16, 2023
075a602
🪃💋 ↝ Adding dedicated post form to planet, will update it with automa…
Gizmotronn Apr 17, 2023
2ff1602
🪐🧬 ↝ static images now being added
Gizmotronn Apr 17, 2023
7df6134
🫔🦔 ↝ Can now create posts that tag planets (experiencing data type is…
Gizmotronn Apr 19, 2023
2fa2410
☔️🍏 ↝ Posts that tag a planet now show up in the user/planet's feed
Gizmotronn Apr 22, 2023
bfcd4bd
🐲💋 ↝ Working (and failing) to filter posts correctly on per-planet basis
Gizmotronn Apr 22, 2023
22020b4
🤖🐓 ↝ Updating base components to call server less and remove demo con…
Gizmotronn Apr 26, 2023
4c0eb04
🐕‍🦺 ↝ Deploying images metadata function
Gizmotronn Apr 28, 2023
473eaae
🫔☔️ ↝ Experimenting with UI sorting
Gizmotronn Apr 30, 2023
827b7b6
🦔🍏 ↝ New tailwind components to remove some frontend UI bugs and impr…
Gizmotronn May 1, 2023
b255479
🦔🍏 ↝ New tailwind components to remove some frontend UI bugs and impr…
Gizmotronn May 1, 2023
faf0761
🥗🍩 ↝ Fix for full_name schema error
Gizmotronn May 1, 2023
4e2ce3a
😅✂️ ↝ Remove demo index content
Gizmotronn May 1, 2023
94824b4
🐲🐟 ↝ Updating planet post field
Gizmotronn May 2, 2023
27ece13
🐛 Fix profiles on planet posts
zaq42 May 2, 2023
37646d3
✨🌌 ↝ May the 4️⃣ be with you & <0001f994>, we've added more profile i…
Gizmotronn May 4, 2023
6d8f688
🦔🦉 ↝ Fixing merges in #44, pt 1
Gizmotronn May 4, 2023
ff12754
☔️👽 ↝ Adding some content (planet editor) to planet page and updating…
Gizmotronn May 5, 2023
ccf6702
🥗🐕‍🦺 ↝ Planet editor loads if you've claimed it now. Fixing some merg…
Gizmotronn May 6, 2023
f10ef12
🏉4️⃣ ↝ Beginning process of cleaning up social graph components
Gizmotronn May 6, 2023
8b2a3f3
🎰🏅 ↝ Creating fresh directory for planets to determine cause of undef…
Gizmotronn May 15, 2023
453f043
🪻🪵 ↝ SocialGraphHomeNoSidebar for planet posts on fresh planet config…
Gizmotronn May 12, 2023
e539e86
🐠🪷 ↝ Planet build
Gizmotronn May 16, 2023
328cb77
🍩🚒 ↝ Build data for lod generation from Unity
Gizmotronn May 15, 2023
0d9a1a8
⛑🗿 ↝ Working LOD build, just discovered a trned in post card content …
Gizmotronn May 16, 2023
139d12a
🦭👒 ↝ Adding two new lod builds - water world (based on rocky core) an…
Gizmotronn May 15, 2023
e224998
💼🦌 ↝ Stupid merge conflict for node package derivatives
Gizmotronn May 16, 2023
d53de57
🦂🍆 ↝ Adding and adjusting changed files in #45
Gizmotronn May 17, 2023
878a44d
🐠🍅 ↝ Narrowing in on cause of post load issue in #45
Gizmotronn May 18, 2023
19e19ad
🗿⚽ ↝ Base LOD models for procedural generation of iron-based & water …
Gizmotronn May 18, 2023
680f03b
🚒🦄 ↝ Creating some tests due to icloud lag 😜; identified issue with l…
Gizmotronn May 21, 2023
902e67e
😵‍💫🧶 ↝ Organising build files into correct pathing
Gizmotronn May 19, 2023
b10a40e
🚦🪵 ↝ Setting earth-rocky as heavy object in planet page, drawing, pul…
Gizmotronn May 20, 2023
30a0443
🎲🍡 ↝ Test scaffolding due to unity-webgl client + vercel issues
Gizmotronn May 21, 2023
c9a04c0
🪻🦑 ↝ GP-1 Add planet generator build (component 1) ---- https://skine…
Gizmotronn May 21, 2023
35f3822
🧠🪐 ↝ Working webgl build, high res planet
Gizmotronn May 22, 2023
dc33f5b
🎩🦺 ↝ Successfully configured webgl + unity urp to work with react-uni…
Gizmotronn May 23, 2023
5d4801b
Merge branch 'sta-36-claim-anomalies-have-posts-be-generated' into st…
Gizmotronn Jun 11, 2023
c18a41c
🧠🐝 ↝ Merge pull request #45 from Signal-K/sta-36-merge
Gizmotronn Jun 11, 2023
a09b028
🧉🌵 ↝ Merge pull request #46 from Signal-K/sta-36-claim-anomalies-have…
Gizmotronn Jun 11, 2023
d68321a
🧛🏻‍♂️🐦 ↝ Fixing merge conflicts in #47
Gizmotronn Jun 2, 2023
acc5ed1
🐤🥠 ↝ Merge pull request #47 from Signal-K/sta-36-45
Gizmotronn Jun 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file modified .DS_Store
Binary file not shown.
42 changes: 42 additions & 0 deletions .github/workflows/supabaseStorage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: SupaStorage-backup
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: '0 8,20 * * *'

jobs:
backup:
runs-on: ubuntu-latest
env:
SUPABASE_URL: https://qwbufbmxkjfaikoloudl.supabase.co
SUPABASE_SERVICE_ROLE: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InF3YnVmYm14a2pmYWlrb2xvdWRsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2Njk5NDE3NTksImV4cCI6MTk4NTUxNzc1OX0.RNz5bvsVwLvfYpZtUjy0vBPcho53_VS2AIVzT8Fm-lk
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ gtihub.head_ref }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies and perform backup
run: |
pip install supabase
[[ -d supabase_storage_backup ]] | mkdir supabase_storage_backup
cd supabase_storage_backup
wget https://raw.githubusercontent.com/signal-k/client/main/storage-backup.py
chmod +x storage-backup.py
python storage-backup.py
rm storage-backup.py
shell: bash

- name: Set current date as env variable
run: echo "NOW=$(date + '%Y -%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- uses:
120 changes: 117 additions & 3 deletions components/AccountAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ export default function AccountAvatar ({
export function PostCardAvatar ({
url,
size,
//onUpload
//uid,
//onUpload,
}: {
url: Profiles['avatar_url']
size: number
//onUpload: (url: string) => void
size: number,
//onUpload: (url: string) => void,
//uid: string
}) {
let width = 'w-12';
//width = 'w-24 md:w-36';
Expand All @@ -100,6 +102,33 @@ export function PostCardAvatar ({
if (url) downloadImage(url);
}, [url]);

/*const uploadAvatar: React.ChangeEventHandler<HTMLInputElement> = async (event) => {
try {
setUploading(true);
if (!event.target.files || event.target.files.length === 0) { // If there is no file selected
throw new Error('You must select an image to upload');
};

const file = event.target.files[0];
const fileExt = file.name.split('.').pop();
const fileName = `${uid}.${fileExt}`;
const filePath = `${fileName}`;
let { error: uploadError } = await supabase.storage
.from('avatars')
.upload(filePath, file, { upsert: true })
if (uploadError) {
throw uploadError;
};

onUpload(filePath);
} catch (error) {
alert('Error uploading avatar, check console');
console.log(error);
} finally {
setUploading(false);
}
}*/

async function downloadImage(path: string) { // Get the avatar url from Supabase for the user (if it exists)
try {
const { data, error } = await supabase.storage.from('avatars').download(path);
Expand Down Expand Up @@ -187,6 +216,91 @@ export function AccountAvatarV1 ({
}
}

return (
<div>
{avatarUrl ? (
<img
src={avatarUrl}
alt='Avatar'
className="avatar image"
style={{ height: size, width: size }}
/>
) : (
<div className="avatar no-image" style={{ height: size, width: size }} />
)}
<div style={{ width: size }}>
<label className="button primary block" htmlFor='single'>
{uploading ? 'Uploading ...': 'Upload new avatar'}
</label>
<input
style={{
visibility: 'hidden',
position: 'absolute',
}}
type='file'
id='single'
accept='image/*'
onChange={uploadAvatar}
disabled={uploading} // Disabled once upload button/process clicked/initiated
/>
</div>
</div>
);
}

export function AccountAvatarV2 ({
uid,
url,
size,
onUpload
}) {
const supabase = useSupabaseClient<Database>();
const [avatarUrl, setAvatarUrl] = useState<Profiles['avatar_url']>(null);
const [uploading, setUploading] = useState(false);
useEffect(() => {
if (url) downloadImage(url);
}, [url]);

async function downloadImage(path: string) { // Get the avatar url from Supabase for the user (if it exists)
try {
const { data, error } = await supabase.storage.from('avatars').download(path);
if (error) {
throw error;
};
const url = URL.createObjectURL(data);
setAvatarUrl(url);
} catch (error) {
console.log('Error downloading image: ', error)
}
}

const uploadAvatar: React.ChangeEventHandler<HTMLInputElement> = async (event) => {
try {
setUploading(true);
if (!event.target.files || event.target.files.length === 0) { // If there is no file selected
throw new Error('You must select an image to upload');
};

const file = event.target.files[0];
const fileExt = file.name.split('.').pop();
const fileName = `${uid}.${fileExt}`;
const filePath = `${fileName}`;
let { error: uploadError } = await supabase.storage
.from('avatars')
.upload(filePath, file, { upsert: true })
if (uploadError) {
throw uploadError;
};

onUpload(filePath);
} catch (error) {
alert('Error uploading avatar, check console');
console.log(error);
} finally {
setUploading(false);
}
}

return (
<div>
{avatarUrl ? (
Expand Down
Loading