Skip to content

Commit

Permalink
Merge pull request #746 from ChicagoWorldcon/development
Browse files Browse the repository at this point in the history
3.0.0-rc2
  • Loading branch information
Gailbear authored Oct 11, 2022
2 parents c5835ac + 88ab207 commit 8793863
Show file tree
Hide file tree
Showing 19 changed files with 494 additions and 201 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: [ "arisia" ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
DEVISE_SECRET: aa77bb734faa9b935c1f8b68846e37aed9096cc9fb746copypastaf856594409a11b1086535e468edb2e5bbc18482b386b6264ada38703dcdefd94a291ab5a95eb5


jobs:
build:

runs-on: ubuntu-20.04
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
with:
cosign-release: 'v1.11.0'


# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: ./
file: ./Dockerfile-prod
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
DEVISE_SECRET-${{ env.DEVISE_SECRET }}
RAILS_ENV=production
NODE_ENV=development
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
COSIGN_EXPERIMENTAL: "true"
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
2 changes: 1 addition & 1 deletion app/javascript/administration/admin_component.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="admin scrollable">
<h1>Admin stuff goes here. <b-icon-minecart-loaded></b-icon-minecart-loaded></h1>
<h1>Admin stuff goes here. <b-icon-minecart-loaded></b-icon-minecart-loaded></h1>
<div class="accordion" role="tablist">
<admin-accordion id="add-user-accordion" title="Add User">
<person-add></person-add>
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/email_addresses_editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<div class="d-flex flex-row w-100">
<div class="w-75 mt-2 mr-3">
<b>Email</b>
<h5>Email</h5>
</div>
<div class="mt-2 pt-1 w-25 ooch-left">
Make Primary
Expand Down
6 changes: 3 additions & 3 deletions app/javascript/components/sidebar_vue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
@hidden="unselect"
no-header
>
<b-nav fill>
<b-navbar-nav class="px-3 py-2">
<b-nav fill class="justify-content-between">
<b-navbar-nav class="px-3 py-2 flex-grow-1">
<b-nav-text>
<slot name="header"></slot>
</b-nav-text>
</b-navbar-nav>
<b-navbar-nav class="ml-auto px-3 py-2">
<b-navbar-nav class="px-3 py-2">
<b-nav-form>
<b-button @click="unselect">
<i class="fas fa-times" @click="unselect"></i>
Expand Down
11 changes: 9 additions & 2 deletions app/javascript/constants/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ module.exports = {
is_local: "Is a local",
willing_to_moderate: "Moderation interest",
languages_fluent_in: "Fluent languages",
contact_email: "Contact email"
contact_email: "Contact email",
},
},
nLines,
Expand Down Expand Up @@ -238,7 +238,9 @@ module.exports = {
name: "Name",
pseudonym: "Pseudonym",
languages_fluent_in: "Languages spoken",
can_share: "Permission to share email with other Participants"
can_share: "Permission to share email with other Participants",
attendance_type: "Will attend convention",
timezone: "Timezone during convention",
},
PERSON_SAVE_SUCCESS: "Profile record saved successfully",
PERSON_NEVER_LOGGED_IN: "Never logged in",
Expand All @@ -254,6 +256,11 @@ module.exports = {
declined: "Declined",
rejected: "Rejected"
},
PERSON_ATTENDANCE_TYPE: {
'in person': "In Person",
hybrid: "In Person AND Virtually",
virtual: "Virtually",
},

SURVEY_REDIRECT: "Unfortunately due to the browser refreshing we have lost any answers you filled in. Please fill the survey out again.",
SURVEY_PUBLIC_NO_EDIT: "You cannot edit a published survey. Close the survey to enable editing.",
Expand Down
16 changes: 8 additions & 8 deletions app/javascript/dashboard/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
To get started, click on <a href="/#/profile">Profile</a>.
</p>
<p>
At this point there are 4 tabs in the profile. You will need to visit all of them.
At this point there are 5 tabs in the profile. You will need to visit all of them.
</p>
<ul>
<li>
Expand All @@ -24,10 +24,14 @@
</li>
</ul>
</li>
</ul>
<ul>
<li>
<b>Availability & Interests</b>
<b>Demographics &amp; Community</b>
<ul>
<li>Fill in your information as needed.</li>
</ul>
</li>
<li>
<b>Availability</b>
<ul>
<li>
Fill in the maximum number of program items you would like to be on.
Expand All @@ -43,8 +47,6 @@
</li>
</ul>
</li>
</ul>
<ul>
<li>
<b>Session Selection</b>
<ul>
Expand All @@ -62,8 +64,6 @@
</li>
</ul>
</li>
</ul>
<ul>
<li>
<b>Session Rankings</b>
<p>
Expand Down
15 changes: 15 additions & 0 deletions app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ import { CustomIconsPlugin } from '../icons';
import AsyncComputed from 'vue-async-computed';
import CKEditor from 'ckeditor4-vue';
import VuePluralize from 'vue-pluralize';
import { configure as validationConfigure, extend as validationExtend} from 'vee-validate';
import { min, max, regex, required } from 'vee-validate/dist/rules';

validationConfigure({
classes: {
valid: 'is-valid',
invalid: 'is-invalid',
dirty: 'is-dirty'
}
})

validationExtend('min', min);
validationExtend('max', max);
validationExtend('regex', regex);
validationExtend('required', required);

Vue.config.errorHandler = (err, vm, info) => {
console.error(err);
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/people/people_admin_tab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<div class="col-12 col-sm-6 col-lg-4">
<dt>Status</dt>
<dd class="font-italic ml-2">{{PERSON_CON_STATE[selected.con_state || 'not_set']}}</dd>
<dt>Registered</dt>
<dd class="font-italic ml-2">{{selected.registered ? 'Yes' : 'No'}}</dd>
<dt>Registration ID</dt>
<dd class="font-italic ml-2">{{selected.registration_number || 'Unknown'}}</dd>
</div>
<div class="col-12 col-sm-6 col-lg-4">
<dt>Convention Class</dt>
Expand Down
53 changes: 43 additions & 10 deletions app/javascript/people/people_sidebar.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
<template>
<sidebar-vue :model="model">
<template #header v-if="selected">
<h1>
{{selected.name}}
</h1>
<person-summary :readOnly="true"></person-summary>
</template>

<template #content v-if="selected">
<div class="float-right d-flex justify-content-end">
<b-button title="Edit Person" variant="primary" :to="editLink"><b-icon-pencil variant="white"></b-icon-pencil></b-button>
</div>
<b-tabs content-class="mt-3" nav-class="border-0" nav-wrapper-class="border-bottom">
<b-tab title="Summary">
<detail :model="model"></detail>
<b-tab title="General" active lazy>
<person-details :readOnly="true"></person-details>
</b-tab>
<b-tab title="Demographics" lazy>
<person-demographics :readOnly="true"></person-demographics>
</b-tab>
<b-tab title="Availability" lazy>
<div class="container-fluid">
<div class="row">
<div class="col-12">
See Edit view
</div>
</div>
</div>
</b-tab>
<b-tab :title="liveScheduleTitle" lazy v-if="currentUserIsAdmin || currentUserIsStaff || firmSchedule">
<person-live-schedule :noSidebar="true"></person-live-schedule>
</b-tab>
<b-tab title="Draft Schedule" lazy v-if="displayDraftSchedule">
<person-draft-schedule :noSidebar="true"></person-draft-schedule>
</b-tab>
<b-tab title="Emails" lazy v-if="currentUserIsAdmin || currentUserIsStaff">
<people-email-tab></people-email-tab>
</b-tab>
<b-tab title="Admin" v-if="currentUserIsAdmin || currentUserIsStaff">
<people-admin-tab></people-admin-tab>
Expand All @@ -28,23 +47,37 @@
</template>

<script>
import SidebarVue from '../components/sidebar_vue';
import SidebarVue from '../components/sidebar_vue.vue';
import {personSessionMixin, modelMixin} from '@/mixins';
import Detail from './detail.vue';
import PeopleAdminTab from './people_admin_tab';
import PeopleSurveysTab from './people_surveys_tab';
import PeopleAdminTab from './people_admin_tab.vue';
import PeopleSurveysTab from './people_surveys_tab.vue';
import { scheduleWorkflowMixin } from '@/store/schedule_workflow';
import PersonDemographics from '@/profile/person_demographics.vue';
import PersonEmailTab from '@/profile/person_email_tab.vue';
import PersonDetails from '@/profile/person_details.vue';
import PersonLiveSchedule from '@/profile/person_live_schedule.vue';
import PersonDraftSchedule from '@/profile/person_draft_schedule.vue';
import PersonSummary from '@/profile/person_summary.vue';
export default {
name: 'PeopleSidebar',
components: {
SidebarVue,
Detail,
PeopleAdminTab,
PeopleSurveysTab,
PersonDemographics,
PersonEmailTab,
PersonDetails,
PersonLiveSchedule,
PersonDraftSchedule,
PeopleSurveysTab,
PersonSummary
},
mixins: [
modelMixin,
personSessionMixin
personSessionMixin,
scheduleWorkflowMixin
],
computed: {
editLink() {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/people/person_tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<person-demographics></person-demographics>
</b-tab>
<!-- Can not make this lazy otherwise we have lock issues with the notes -->
<b-tab title="Availability &amp; Interests" :active="tab === 'availability'">
<b-tab title="Availability" :active="tab === 'availability'">
<availability-and-interests
v-if="person"
v-model="person"
Expand Down
8 changes: 4 additions & 4 deletions app/javascript/profile/dl_person.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
</slot>
</dt>
<dd :key="'dd-' + i" class="ml-2">
<slot :name="field + '-val'" :slot-scope="{value: selected[field]}">
<slot :name="field + '-val'" :value="selected[field]">
<span v-if="selected[field] === undefined" class="text-muted font-italic">Restricted</span>
<span v-else-if="selected[field] === true">Yes</span>
<span v-else-if="selected[field] === false">No</span>
<span v-else-if="selected[field] === true" class="font-italic">Yes</span>
<span v-else-if="selected[field] === false" class="font-italic">No</span>
<span v-else-if="selected[field] === null || selected[field].trim().length === 0" class="text-muted font-italic">Not Specified</span>
<span v-else class="keep-format">{{selected[field]}}</span>
<span v-else class="keep-format font-italic">{{selected[field]}}</span>
</slot>
</dd>
</template>
Expand Down
Loading

0 comments on commit 8793863

Please sign in to comment.