mirror of
https://github.com/diced/zipline.git
synced 2025-05-10 18:05:54 +02:00
feat: v4 changes
This commit is contained in:
parent
a6807a681c
commit
477aca289a
7 changed files with 171 additions and 45 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -2,9 +2,9 @@ name: 'Build'
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [v4]
|
||||
branches: [v4, trunk]
|
||||
pull_request:
|
||||
branches: [v4]
|
||||
branches: [v4, trunk]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
87
.github/workflows/docker-release.yml
vendored
Normal file
87
.github/workflows/docker-release.yml
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
name: 'Push Release Docker Images'
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v4.*.*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
push:
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [amd64, arm64]
|
||||
|
||||
name: push release
|
||||
runs-on: ubuntu-24.04${{ matrix.arch == 'arm64' && '-arm' || '' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: |
|
||||
echo "zipline_version=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get commit sha
|
||||
id: sha
|
||||
run: |
|
||||
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
provenance: false
|
||||
tags: |
|
||||
ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}-${{ matrix.arch }}
|
||||
ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}-${{ steps.sha.outputs.short_sha }}-${{ matrix.arch }}
|
||||
|
||||
amend-builds:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: push
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: |
|
||||
echo "zipline_version=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get commit sha
|
||||
id: sha
|
||||
run: |
|
||||
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: pull images
|
||||
run: |
|
||||
docker pull --platform=linux/amd64 ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}-amd64
|
||||
docker pull --platform=linux/arm64 ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}-arm64
|
||||
|
||||
- name: create manifests
|
||||
run: |
|
||||
docker manifest create ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }} \
|
||||
--amend ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}-amd64 \
|
||||
--amend ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}-arm64 && \
|
||||
docker manifest create ghcr.io/diced/zipline:latest \
|
||||
--amend ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}-amd64 \
|
||||
--amend ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}-arm64
|
||||
|
||||
- name: push manifests
|
||||
run: |
|
||||
docker manifest push ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }} && \
|
||||
docker manifest push ghcr.io/diced/zipline:latest
|
22
.github/workflows/docker.yml
vendored
22
.github/workflows/docker.yml
vendored
|
@ -2,7 +2,7 @@ name: 'Push Docker Images'
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [v4]
|
||||
branches: [v4, trunk]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
@ -36,10 +36,10 @@ jobs:
|
|||
cache-to: type=gha,mode=max
|
||||
provenance: false
|
||||
tags: |
|
||||
ghcr.io/diced/zipline:v4-${{ matrix.arch }}
|
||||
ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-${{ matrix.arch }}
|
||||
ghcr.io/diced/zipline:trunk-${{ matrix.arch }}
|
||||
ghcr.io/diced/zipline:trunk-${{ steps.sha.outputs.short_sha }}-${{ matrix.arch }}
|
||||
|
||||
ammend-builds:
|
||||
amend-builds:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: push
|
||||
steps:
|
||||
|
@ -57,19 +57,23 @@ jobs:
|
|||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: pull images
|
||||
run: |
|
||||
docker pull --platform=linux/amd64 ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-amd64
|
||||
docker pull --platform=linux/arm64 ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-arm64
|
||||
docker pull --platform=linux/amd64 ghcr.io/diced/zipline:trunk-${{ steps.sha.outputs.short_sha }}-amd64
|
||||
docker pull --platform=linux/arm64 ghcr.io/diced/zipline:trunk-${{ steps.sha.outputs.short_sha }}-arm64
|
||||
|
||||
- name: create manifests
|
||||
run: |
|
||||
docker manifest create ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }} \
|
||||
docker manifest create ghcr.io/diced/zipline:trunk-${{ steps.sha.outputs.short_sha }} \
|
||||
--amend ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-amd64 \
|
||||
--amend ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-arm64 && \
|
||||
docker manifest create ghcr.io/diced/zipline:trunk \
|
||||
--amend ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-amd64 \
|
||||
--amend ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-arm64
|
||||
docker manifest create ghcr.io/diced/zipline:v4 \
|
||||
--amend ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-amd64 \
|
||||
--amend ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-arm64
|
||||
|
||||
- name: push manifests
|
||||
run: |
|
||||
docker manifest push ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }} && \
|
||||
docker manifest push ghcr.io/diced/zipline:v4
|
||||
docker manifest push ghcr.io/diced/zipline:trunk-${{ steps.sha.outputs.short_sha }} && \
|
||||
docker manifest push ghcr.io/diced/zipline:trunk && \
|
||||
docker manifest push ghcr.io/diced/zipline:v4 && \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/diced/zipline/v4/public/zipline_small.png"/>
|
||||
<img src="https://raw.githubusercontent.com/diced/zipline/trunk/public/zipline_small.png"/>
|
||||
|
||||
The next generation ShareX / File upload server
|
||||
|
||||
|
@ -10,7 +10,7 @@ The next generation ShareX / File upload server
|
|||
|
||||

|
||||
|
||||
[v4.zipline.diced.sh](https://v4.zipline.diced.sh) | [v3.zipline.diced.sh](https://v3.zipline.diced.sh)
|
||||
[zipline.diced.sh](https://zipline.diced.sh) | [old v3.zipline.diced.sh](https://v3.zipline.diced.sh)
|
||||
|
||||
<!-- TODO: change these links and image branch -->
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import { Config } from '@/lib/config/validate';
|
|||
import { useSettingsStore } from '@/lib/store/settings';
|
||||
import { useUserStore } from '@/lib/store/user';
|
||||
import { ZiplineTheme, findTheme, themeComponents } from '@/lib/theme';
|
||||
import dark_blue from '@/lib/theme/builtins/dark_blue';
|
||||
import { MantineProvider, createTheme } from '@mantine/core';
|
||||
import { useColorScheme } from '@mantine/hooks';
|
||||
import { createContext, useContext } from 'react';
|
||||
|
@ -48,14 +49,7 @@ export default function Theming({
|
|||
}
|
||||
|
||||
if (!theme) {
|
||||
theme =
|
||||
findTheme('builtin:dark_blue') ??
|
||||
({
|
||||
id: 'builtin:dark_gray',
|
||||
name: 'Dark Gray',
|
||||
colorScheme: 'dark',
|
||||
primaryColor: 'gray',
|
||||
} as unknown as ZiplineTheme); // back up theme if all else fails lol
|
||||
theme = findTheme('builtin:dark_blue') ?? (dark_blue as unknown as ZiplineTheme); // back up theme if all else fails lol
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
35
src/lib/theme/builtins/dark_blue.ts
Normal file
35
src/lib/theme/builtins/dark_blue.ts
Normal file
|
@ -0,0 +1,35 @@
|
|||
const dark_blue = {
|
||||
name: 'Dark Blue',
|
||||
id: 'builtin:dark_blue',
|
||||
colorScheme: 'dark',
|
||||
colors: {
|
||||
blue: [
|
||||
'#FFFFFF',
|
||||
'#7C7DC2',
|
||||
'#7778C0',
|
||||
'#6C6FBC',
|
||||
'#575DB5',
|
||||
'#4D54B2',
|
||||
'#424BAE',
|
||||
'#3742AA',
|
||||
'#323EA8',
|
||||
'#2C39A6',
|
||||
],
|
||||
dark: [
|
||||
'#FFFFFF',
|
||||
'#293747',
|
||||
'#6C7A8D',
|
||||
'#2d3e5a',
|
||||
'#222c47',
|
||||
'#171F35',
|
||||
'#181c28',
|
||||
'#0c101c',
|
||||
'#060824',
|
||||
'#00001E',
|
||||
],
|
||||
},
|
||||
primaryColor: 'blue',
|
||||
mainBackgroundColor: 'color-mix(in srgb, var(--mantine-color-dark-9), black 45%)',
|
||||
};
|
||||
|
||||
export default dark_blue;
|
|
@ -25,10 +25,21 @@ import { useRouter } from 'next/router';
|
|||
import { useState } from 'react';
|
||||
import { mutate } from 'swr';
|
||||
|
||||
function LinkToDoc({ href, title, children }: { href: string; title: string; children: React.ReactNode }) {
|
||||
return (
|
||||
<Text>
|
||||
<Anchor href={href} target='_blank' rel='noopener noreferrer'>
|
||||
{title}
|
||||
</Anchor>{' '}
|
||||
{children}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Setup() {
|
||||
const router = useRouter();
|
||||
|
||||
const [active, setActive] = useState(1);
|
||||
const [active, setActive] = useState(0);
|
||||
const nextStep = () => setActive((current) => (current < 3 ? current + 1 : current));
|
||||
const prevStep = () => setActive((current) => (current > 0 ? current - 1 : current));
|
||||
|
||||
|
@ -107,39 +118,34 @@ export default function Setup() {
|
|||
<SimpleGrid spacing='md' cols={{ base: 1, sm: 1 }}>
|
||||
<Paper withBorder p='sm' my='sm' h='100%'>
|
||||
<Title order={2}>Documentation</Title>
|
||||
<Text>Here are a couple of useful documentation links to get you started with Zipline.</Text>
|
||||
<Text>Here are a couple of useful documentation links to get you started with Zipline:</Text>
|
||||
|
||||
{/* TODO: change these to actual links.. */}
|
||||
<Text c='dimmed'>
|
||||
<Anchor>[name]</Anchor>: desc
|
||||
</Text>
|
||||
<Stack mt='xs'>
|
||||
<LinkToDoc href='https://zipline.diced.sh/docs/config' title='Configuration'>
|
||||
Configuring Zipline to your needs
|
||||
</LinkToDoc>
|
||||
|
||||
<Text c='dimmed'>
|
||||
<Anchor>[name]</Anchor>: desc
|
||||
</Text>
|
||||
<Text c='dimmed'>
|
||||
<Anchor>[name]</Anchor>: desc
|
||||
</Text>
|
||||
<Text c='dimmed'>
|
||||
<Anchor>[name]</Anchor>: desc
|
||||
</Text>
|
||||
<Text c='dimmed'>
|
||||
<Anchor>[name]</Anchor>: desc
|
||||
</Text>
|
||||
<LinkToDoc href='https://zipline.diced.sh/docs/migrate' title='Migrate from v3 to v4'>
|
||||
Upgrading from a previous version of Zipline
|
||||
</LinkToDoc>
|
||||
</Stack>
|
||||
</Paper>
|
||||
|
||||
<Paper withBorder p='sm' my='sm' h='100%'>
|
||||
<Title order={2}>Configuration</Title>
|
||||
|
||||
<Text>
|
||||
Zipline's configuration is managed by environment variables. Zipline makes this easy by
|
||||
providing support for using a <Code>.env</Code> file. When using <b>Docker Compose</b> all
|
||||
the environment variables are found in the <Code>docker-compose.yml</Code> file.
|
||||
Most of Zipline's configuration is now managed through the dashboard. Once you login as
|
||||
a super-admin, you can click on your username in the top right corner and select
|
||||
"Server Settings" to configure your instance. The only exception to this is a few
|
||||
sensitive environment variables that must be set in order for Zipline to run. To change
|
||||
this, depending on the setup, you can either edit the <Code>.env</Code> or{' '}
|
||||
<Code>docker-compose.yml</Code> file.
|
||||
</Text>
|
||||
|
||||
<Text>
|
||||
To see all of the available environment variables, please refer to the documentation{' '}
|
||||
<Anchor component={Link} href='https://zipl.vercel.app/docs/config'>
|
||||
<Anchor component={Link} href='https://zipline.diced.sh/docs/config'>
|
||||
here.
|
||||
</Anchor>
|
||||
</Text>
|
||||
|
@ -199,8 +205,8 @@ export default function Setup() {
|
|||
<Title order={2}>Setup complete!</Title>
|
||||
|
||||
<Text>
|
||||
Clicking "continue" below will create your super-admin account and log you in. You
|
||||
will be redirected to the dashboard shortly after that.
|
||||
Clicking "Finish" below will create your super-admin account and log you in. You will
|
||||
be redirected to the dashboard shortly after that.
|
||||
</Text>
|
||||
<Group justify='space-between' my='lg'>
|
||||
<Button
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue