Commit e3c93df9 authored by Yechang's avatar Yechang
Browse files

feat: add link to gitlab

parent 67a1ce76
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ default:
build_migration:
  stage: build
  script:
    - docker build -t $DOCKER_MIGRATION_REPOSITORY:$DOCKER_TAG --target migration .
    - docker build -t $DOCKER_MIGRATION_REPOSITORY:$DOCKER_TAG --build-arg COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA --target migration .

push_migration:
  stage: push
@@ -26,7 +26,7 @@ push_migration:
build:
  stage: build
  script:
    - docker build -t $DOCKER_REPOSITORY:$DOCKER_TAG .
    - docker build -t $DOCKER_REPOSITORY:$DOCKER_TAG --build-arg COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA .

push:
  stage: push
+6 −2
Original line number Diff line number Diff line
ARG ORIGIN=https://lms.sustech.cloud
ARG COMMIT_SHORT_SHA=""

FROM node:20-alpine as builder-with-pnpm

ENV NODE_ENV build
@@ -20,7 +23,8 @@ CMD pnpm prisma:deploy

FROM builder as building_stage
ENV NODE_ENV production
ENV ORIGIN https://lms.sustech.cloud
ENV ORIGIN $ORIGIN
ENV PUBLIC_COMMIT_SHORT_SHA $COMMIT_SHORT_SHA
RUN pnpm run build \
    && pnpm prune --production

@@ -31,7 +35,7 @@ RUN echo "Asia/shanghai" > /etc/timezone
USER node
ENV PORT 3000
ENV NODE_ENV production
ENV ORIGIN https://lms.sustech.cloud
ENV ORIGIN $ORIGIN
WORKDIR /home/app

COPY --from=building_stage --chown=node:node /home/node/package*.json ./
+45 −0
Original line number Diff line number Diff line
<script lang="ts">
	import * as Tooltip from '$lib/components/ui/tooltip';
	import { siGitlab } from 'simple-icons';
	import { PUBLIC_COMMIT_SHORT_SHA } from '$env/static/public';
	import { Button } from '../ui/button';
</script>

<Tooltip.Root>
	<Tooltip.Trigger asChild let:builder>
		<Button href="https://mirrors.sustech.edu.cn/git/sustech-lms/web" builders={[builder]} variant="outline" size="icon" class="rounded-full">
			<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 380"
				><defs
					><style>
						.cls-1 {
							fill: #e24329;
						}
						.cls-2 {
							fill: #fc6d26;
						}
						.cls-3 {
							fill: #fca326;
						}
					</style></defs
				><g id="LOGO"
					><path
						class="cls-1"
						d="M282.83,170.73l-.27-.69-26.14-68.22a6.81,6.81,0,0,0-2.69-3.24,7,7,0,0,0-8,.43,7,7,0,0,0-2.32,3.52l-17.65,54H154.29l-17.65-54A6.86,6.86,0,0,0,134.32,99a7,7,0,0,0-8-.43,6.87,6.87,0,0,0-2.69,3.24L97.44,170l-.26.69a48.54,48.54,0,0,0,16.1,56.1l.09.07.24.17,39.82,29.82,19.7,14.91,12,9.06a8.07,8.07,0,0,0,9.76,0l12-9.06,19.7-14.91,40.06-30,.1-.08A48.56,48.56,0,0,0,282.83,170.73Z"
					/><path
						class="cls-2"
						d="M282.83,170.73l-.27-.69a88.3,88.3,0,0,0-35.15,15.8L190,229.25c19.55,14.79,36.57,27.64,36.57,27.64l40.06-30,.1-.08A48.56,48.56,0,0,0,282.83,170.73Z"
					/><path
						class="cls-3"
						d="M153.43,256.89l19.7,14.91,12,9.06a8.07,8.07,0,0,0,9.76,0l12-9.06,19.7-14.91S209.55,244,190,229.25C170.45,244,153.43,256.89,153.43,256.89Z"
					/><path
						class="cls-2"
						d="M132.58,185.84A88.19,88.19,0,0,0,97.44,170l-.26.69a48.54,48.54,0,0,0,16.1,56.1l.09.07.24.17,39.82,29.82s17-12.85,36.57-27.64Z"
					/></g
				></svg
			>
		</Button>
	</Tooltip.Trigger>
	<Tooltip.Content>
		<p>{PUBLIC_COMMIT_SHORT_SHA}</p>
	</Tooltip.Content>
</Tooltip.Root>
+2 −2
Original line number Diff line number Diff line
@@ -13,8 +13,8 @@

<DropdownMenu.Root>
	<DropdownMenu.Trigger asChild let:builder>
		<Button variant="ghost" builders={[builder]} class="relative h-8 w-8 rounded-full">
			<Avatar.Root class="h-8 w-8">
		<Button variant="ghost" builders={[builder]} class="relative h-9 w-9 rounded-full">
			<Avatar.Root class="h-9 w-9">
				<Avatar.Image src={user.imageUrl} alt="@shadcn" />
				<Avatar.Fallback>{user.name.substring(0, 1)}</Avatar.Fallback>
			</Avatar.Root>
+15 −0
Original line number Diff line number Diff line
import { Tooltip as TooltipPrimitive } from "bits-ui";
import Content from "./tooltip-content.svelte";

const Root = TooltipPrimitive.Root;
const Trigger = TooltipPrimitive.Trigger;

export {
	Root,
	Trigger,
	Content,
	//
	Root as Tooltip,
	Content as TooltipContent,
	Trigger as TooltipTrigger,
};
Loading