text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
import { SearchFunction, SearchPreview, SearchResult } from '@ownclouders/web-pkg'
import { Component, unref } from 'vue'
import { Router } from 'vue-router'
import { ResourcePreview } from '@ownclouders/web-pkg'
export const previewSearchLimit = 8
export default class Preview implements SearchPreview {
public read... | owncloud/web/packages/web-app-files/src/search/sdk/preview.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/src/search/sdk/preview.ts",
"repo_id": "owncloud",
"token_count": 235
} | 789 |
<template>
<div class="oc-flex">
<files-view-wrapper>
<app-bar :is-side-bar-open="isSideBarOpen">
<template #navigation>
<SharesNavigation />
</template>
</app-bar>
<app-loading-spinner v-if="areResourcesLoading" />
<template v-else>
<div v-if="shareTypes.... | owncloud/web/packages/web-app-files/src/views/shares/SharedWithOthers.vue/0 | {
"file_path": "owncloud/web/packages/web-app-files/src/views/shares/SharedWithOthers.vue",
"repo_id": "owncloud",
"token_count": 3300
} | 790 |
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Resource Upload Component > file upload > should render component 1`] = `
"<div data-v-4a3fd5f0=""><button data-v-4a3fd5f0="" type="button" class="oc-button oc-rounded oc-button-m oc-button-justify-content-left oc-button-gap-m oc-button-passive oc-... | owncloud/web/packages/web-app-files/tests/unit/components/AppBar/Upload/__snapshots__/ResourceUpload.spec.ts.snap/0 | {
"file_path": "owncloud/web/packages/web-app-files/tests/unit/components/AppBar/Upload/__snapshots__/ResourceUpload.spec.ts.snap",
"repo_id": "owncloud",
"token_count": 599
} | 791 |
import AutocompleteItem from 'web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/AutocompleteItem.vue'
import { ShareTypes } from '@ownclouders/web-client/src/helpers/share'
import { defaultPlugins, shallowMount } from 'web-test-helpers'
describe('AutocompleteItem component', () => {
it.eac... | owncloud/web/packages/web-app-files/tests/unit/components/SideBar/Shares/Collaborators/InviteCollaborator/AutocompleteItem.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/tests/unit/components/SideBar/Shares/Collaborators/InviteCollaborator/AutocompleteItem.spec.ts",
"repo_id": "owncloud",
"token_count": 1248
} | 792 |
import { defaultComponentMocks, mount, defaultPlugins, mockAxiosResolve } from 'web-test-helpers'
import TagsSelect from 'web-app-files/src/components/SideBar/Details/TagsSelect.vue'
import { mock, mockDeep } from 'vitest-mock-extended'
import { Resource } from '@ownclouders/web-client'
import { ClientService, eventBus... | owncloud/web/packages/web-app-files/tests/unit/components/SideBar/TagsSelect.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/tests/unit/components/SideBar/TagsSelect.spec.ts",
"repo_id": "owncloud",
"token_count": 1980
} | 793 |
import SharedWithMe from '../../../../src/views/shares/SharedWithMe.vue'
import { useResourcesViewDefaults } from 'web-app-files/src/composables'
import {
queryItemAsString,
InlineFilterOption,
useSort,
useOpenWithDefaultApp,
ItemFilter
} from '@ownclouders/web-pkg'
import { useResourcesViewDefaultsMock } fro... | owncloud/web/packages/web-app-files/tests/unit/views/shares/SharedWithMe.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/tests/unit/views/shares/SharedWithMe.spec.ts",
"repo_id": "owncloud",
"token_count": 3037
} | 794 |
[main]
host = https://www.transifex.com
[o:owncloud-org:p:owncloud-web:r:ocm]
file_filter = locale/<lang>/LC_MESSAGES/app.po
minimum_perc = 0
source_file = template.pot
source_lang = en
type = PO
| owncloud/web/packages/web-app-ocm/l10n/.tx/config/0 | {
"file_path": "owncloud/web/packages/web-app-ocm/l10n/.tx/config",
"repo_id": "owncloud",
"token_count": 84
} | 795 |
[main]
host = https://www.transifex.com
[o:owncloud-org:p:owncloud-web:r:preview]
file_filter = locale/<lang>/LC_MESSAGES/app.po
minimum_perc = 0
source_file = template.pot
source_lang = en
type = PO
| owncloud/web/packages/web-app-preview/l10n/.tx/config/0 | {
"file_path": "owncloud/web/packages/web-app-preview/l10n/.tx/config",
"repo_id": "owncloud",
"token_count": 84
} | 796 |
<template>
<main id="search" class="oc-flex oc-height-1-1">
<router-view id="search-view" />
</main>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
name: 'Search'
})
</script>
| owncloud/web/packages/web-app-search/src/App.vue/0 | {
"file_path": "owncloud/web/packages/web-app-search/src/App.vue",
"repo_id": "owncloud",
"token_count": 89
} | 797 |
import { Resource } from '../resource'
import { ShareResource, OutgoingShareResource, IncomingShareResource } from './types'
export const isShareResource = (resource: Resource): resource is ShareResource => {
return Object.hasOwn(resource, 'sharedWith')
}
export const isOutgoingShareResource = (resource: Resource):... | owncloud/web/packages/web-client/src/helpers/share/functions.ts/0 | {
"file_path": "owncloud/web/packages/web-client/src/helpers/share/functions.ts",
"repo_id": "owncloud",
"token_count": 145
} | 798 |
export const encodePath = (path: string) => {
return encodeURIComponent(path).split('%2F').join('/')
}
| owncloud/web/packages/web-client/src/utils/encodePath.ts/0 | {
"file_path": "owncloud/web/packages/web-client/src/utils/encodePath.ts",
"repo_id": "owncloud",
"token_count": 36
} | 799 |
import { unref } from 'vue'
import { urlJoin } from '../utils'
import { DAV, buildAuthHeader } from './client'
import { DavProperty } from './constants'
import { WebDavOptions } from './types'
export const GetPathForFileIdFactory = (dav: DAV, { accessToken }: WebDavOptions) => {
return {
async getPathForFileId(i... | owncloud/web/packages/web-client/src/webdav/getPathForFileId.ts/0 | {
"file_path": "owncloud/web/packages/web-client/src/webdav/getPathForFileId.ts",
"repo_id": "owncloud",
"token_count": 234
} | 800 |
import { ShareType, ShareTypes } from '../../../../src/helpers/share'
describe('ShareTypes', () => {
describe('getByValue', () => {
it.each([...ShareTypes.all])(
'finds correct ShareType by numeric value',
(shareType: ShareType) => {
expect(ShareTypes.getByValue(shareType.value)).toBe(shareTy... | owncloud/web/packages/web-client/tests/unit/helpers/share/type.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-client/tests/unit/helpers/share/type.spec.ts",
"repo_id": "owncloud",
"token_count": 1165
} | 801 |
import { useTask } from 'vue-concurrency'
export function useLoadTokenInfo() {
const loadTokenInfoTask = useTask(function* () {
return {}
})
return { loadTokenInfoTask }
}
| owncloud/web/packages/web-pkg/src/cern/composables/useLoadTokenInfo.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/cern/composables/useLoadTokenInfo.ts",
"repo_id": "owncloud",
"token_count": 59
} | 802 |
<template>
<oc-button
:id="`context-menu-trigger-${resourceDomSelector(item)}`"
v-oc-tooltip="contextMenuLabel"
:aria-label="contextMenuLabel"
appearance="raw"
@click.stop.prevent="
$emit('quickActionClicked', {
event: $event,
dropdown: $refs[`context-menu-drop-ref-${resource... | owncloud/web/packages/web-pkg/src/components/ContextActions/ContextMenuQuickAction.vue/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/components/ContextActions/ContextMenuQuickAction.vue",
"repo_id": "owncloud",
"token_count": 615
} | 803 |
export { default as ItemFilterInline } from './ItemFilterInline.vue'
export * from './types'
| owncloud/web/packages/web-pkg/src/components/Filters/index.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/components/Filters/index.ts",
"repo_id": "owncloud",
"token_count": 29
} | 804 |
import { SearchResource } from '@ownclouders/web-client/src/webdav/search'
import { Component } from 'vue'
export interface GenericSearchResultItem {
id: string
name: string
icon?: string
}
export interface SearchResultValue {
id: string
// FIXME: SearchResource is very specific for webdav search
data: Ge... | owncloud/web/packages/web-pkg/src/components/Search/types.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/components/Search/types.ts",
"repo_id": "owncloud",
"token_count": 222
} | 805 |
<template>
<div class="space-quota">
<p class="oc-mb-s oc-mt-rm" v-text="spaceStorageDetailsLabel" />
<oc-progress
:value="quotaUsagePercent"
:max="100"
size="small"
:variation="quotaProgressVariant"
/>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
... | owncloud/web/packages/web-pkg/src/components/SpaceQuota.vue/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/components/SpaceQuota.vue",
"repo_id": "owncloud",
"token_count": 657
} | 806 |
import { computed, unref } from 'vue'
import { useGettext } from 'vue3-gettext'
import { FileAction, FileActionOptions } from '../../actions'
import { useAbility } from '../../ability'
import { useClientService } from '../../clientService'
import { useRouter } from '../../router'
import { isPersonalSpaceResource } fro... | owncloud/web/packages/web-pkg/src/composables/actions/files/useFileActionsCreateSpaceFromResource.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/actions/files/useFileActionsCreateSpaceFromResource.ts",
"repo_id": "owncloud",
"token_count": 1614
} | 807 |
import { isLocationTrashActive } from '../../../router'
import { eventBus } from '../../../services/eventBus'
import { SideBarEventTopics } from '../../sideBar'
import { computed, unref } from 'vue'
import { useIsFilesAppActive } from '../helpers'
import { useRouter } from '../../router'
import { useGettext } from 'vue... | owncloud/web/packages/web-pkg/src/composables/actions/files/useFileActionsShowActions.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/actions/files/useFileActionsShowActions.ts",
"repo_id": "owncloud",
"token_count": 574
} | 808 |
import { computed } from 'vue'
import { SpaceAction } from '../types'
import { useGettext } from 'vue3-gettext'
import { useRouter } from '../../router'
import { SpaceResource } from '@ownclouders/web-client'
import { createLocationTrash } from '../../../router'
import { createFileRouteOptions } from '../../../helpers'... | owncloud/web/packages/web-pkg/src/composables/actions/spaces/useSpaceActionsNavigateToTrash.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/actions/spaces/useSpaceActionsNavigateToTrash.ts",
"repo_id": "owncloud",
"token_count": 544
} | 809 |
import { computed } from 'vue'
import { AppsStore } from '../piniaStores'
interface AppMetaOptions {
appsStore: AppsStore
applicationId: string
}
export function useAppMeta({ appsStore, applicationId }: AppMetaOptions) {
const applicationMeta = computed(() => {
const appInfo = appsStore.apps[applicationId]
... | owncloud/web/packages/web-pkg/src/composables/appDefaults/useAppMeta.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/appDefaults/useAppMeta.ts",
"repo_id": "owncloud",
"token_count": 164
} | 810 |
export * from './useDriveResolver'
export * from './useSpacesLoading'
| owncloud/web/packages/web-pkg/src/composables/driveResolver/index.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/driveResolver/index.ts",
"repo_id": "owncloud",
"token_count": 22
} | 811 |
export * from './useLinkTypes'
export * from './useExpirationRules'
| owncloud/web/packages/web-pkg/src/composables/links/index.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/links/index.ts",
"repo_id": "owncloud",
"token_count": 21
} | 812 |
import { defineStore } from 'pinia'
import { computed, ref, unref } from 'vue'
import merge from 'lodash-es/merge'
import { OptionsConfig, RawConfig } from './types'
import { urlJoin } from '@ownclouders/web-client/src/utils'
import { useAppsStore } from '../apps'
const defaultOptions = {
cernFeatures: false,
conc... | owncloud/web/packages/web-pkg/src/composables/piniaStores/config/config.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/piniaStores/config/config.ts",
"repo_id": "owncloud",
"token_count": 1137
} | 813 |
import { useWormhole } from 'portal-vue'
import { TransportInput } from 'portal-vue/types/types'
import { useEventBus } from '../eventBus'
import { PortalTargetEventTopics } from './eventTopics'
export const usePortalTarget = () => {
const eventBus = useEventBus()
const wormhole = useWormhole()
const registerPo... | owncloud/web/packages/web-pkg/src/composables/portalTarget/usePortalTarget.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/portalTarget/usePortalTarget.ts",
"repo_id": "owncloud",
"token_count": 171
} | 814 |
import { Ref, watch, unref } from 'vue'
import { useRouteQuery } from './useRouteQuery'
import { useLocalStorage } from '../localStorage/useLocalStorage'
import { QueryValue } from './types'
export interface RouteQueryPersistedOptions {
name: string
defaultValue: QueryValue
storagePrefix?: string
}
interface Wa... | owncloud/web/packages/web-pkg/src/composables/router/useRouteQueryPersisted.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/router/useRouteQueryPersisted.ts",
"repo_id": "owncloud",
"token_count": 566
} | 815 |
export abstract class SortConstants {
static readonly sortByQueryName = 'sort-by'
static readonly sortDirQueryName = 'sort-dir'
}
| owncloud/web/packages/web-pkg/src/composables/sort/constants.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/sort/constants.ts",
"repo_id": "owncloud",
"token_count": 40
} | 816 |
export const blobToArrayBuffer: (blob: Blob) => Promise<string | ArrayBuffer> = (blob: Blob) => {
return new Promise((resolve, reject) => {
const reader = new FileReader()
reader.onloadend = () => resolve(reader.result)
reader.onerror = (e) => reject(e)
reader.readAsArrayBuffer(blob)
})
}
export co... | owncloud/web/packages/web-pkg/src/helpers/binary.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/helpers/binary.ts",
"repo_id": "owncloud",
"token_count": 159
} | 817 |
import { join } from 'path'
import { Resource } from '@ownclouders/web-client'
import { ResolveConflict, ResolveStrategy } from '.'
import { useModals } from '../../../composables'
import { SpaceMoveInfoModal, ResourceConflictModal } from '../../../components'
export interface FileConflict {
resource: Resource
str... | owncloud/web/packages/web-pkg/src/helpers/resource/conflictHandling/conflictDialog.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/helpers/resource/conflictHandling/conflictDialog.ts",
"repo_id": "owncloud",
"token_count": 1374
} | 818 |
import { SpaceResource } from '@ownclouders/web-client/src/helpers'
import { createLocationSpaces } from '../../router'
import { createFileRouteOptions } from '../../helpers/router'
import { RouteLocationNamedRaw } from 'vue-router'
import { AncestorMetaDataValue } from '../../types'
export const getSharedAncestorRout... | owncloud/web/packages/web-pkg/src/helpers/share/sharedAncestorRoute.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/helpers/share/sharedAncestorRoute.ts",
"repo_id": "owncloud",
"token_count": 235
} | 819 |
import { RouteComponents } from './router'
import { RouteLocationNamedRaw, RouteRecordRaw } from 'vue-router'
import { createLocation, isLocationActiveDirector, $gettext } from './utils'
type shareTypes =
| 'files-shares'
| 'files-shares-with-me'
| 'files-shares-with-others'
| 'files-shares-via-link'
export c... | owncloud/web/packages/web-pkg/src/router/shares.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/router/shares.ts",
"repo_id": "owncloud",
"token_count": 713
} | 820 |
import isEqual from 'lodash-es/isEqual'
import { stringify } from 'qs'
import { cacheService } from '../cache'
import { ClientService } from '../client'
import { encodePath } from '../../utils'
import { isPublicSpaceResource } from '@ownclouders/web-client/src/helpers'
import { BuildQueryStringOptions, LoadPreviewOptio... | owncloud/web/packages/web-pkg/src/services/preview/previewService.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/services/preview/previewService.ts",
"repo_id": "owncloud",
"token_count": 1878
} | 821 |
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`AppBar component > renders > by default no breadcrumbs, no bulkactions, no sharesnavigation but viewoptions and sidebartoggle 1`] = `
"<div data-v-aba8ddeb="" id="files-app-bar" class="" displayviewmodeswitch="false" hassidebartoggle="true">
<oc-... | owncloud/web/packages/web-pkg/tests/unit/components/AppBar/__snapshots__/AppBar.spec.ts.snap/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/components/AppBar/__snapshots__/AppBar.spec.ts.snap",
"repo_id": "owncloud",
"token_count": 1672
} | 822 |
import { defaultPlugins, mount } from 'web-test-helpers'
import ResourceListItem from '../../../../src/components/FilesList/ResourceListItem.vue'
import { Resource } from '@ownclouders/web-client'
const fileResource = {
name: 'forest.jpg',
path: 'nature/forest.jpg',
thumbnail: 'https://cdn.pixabay.com/photo/2015... | owncloud/web/packages/web-pkg/tests/unit/components/FilesList/ResourceListItem.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/components/FilesList/ResourceListItem.spec.ts",
"repo_id": "owncloud",
"token_count": 1670
} | 823 |
import ResourceConflictModal from '../../../../src/components/Modals/ResourceConflictModal.vue'
import { defaultComponentMocks, defaultPlugins, shallowMount } from 'web-test-helpers'
import { mock } from 'vitest-mock-extended'
import { Resource } from '@ownclouders/web-client'
import { ResolveStrategy } from '../../../... | owncloud/web/packages/web-pkg/tests/unit/components/Modals/ResourceConflictModal.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/components/Modals/ResourceConflictModal.spec.ts",
"repo_id": "owncloud",
"token_count": 1129
} | 824 |
import SpaceDetails from '../../../../../../src/components/SideBar/Spaces/Details/SpaceDetails.vue'
import {
CollaboratorShare,
ShareRole,
GraphShareRoleIdMap
} from '@ownclouders/web-client/src/helpers/share'
import { mock } from 'vitest-mock-extended'
import { defaultPlugins, shallowMount } from 'web-test-helpe... | owncloud/web/packages/web-pkg/tests/unit/components/sidebar/Spaces/Details/SpaceDetails.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/components/sidebar/Spaces/Details/SpaceDetails.spec.ts",
"repo_id": "owncloud",
"token_count": 832
} | 825 |
import { mock, mockDeep } from 'vitest-mock-extended'
import { unref } from 'vue'
import { useFileActionsMove } from '../../../../../src/composables/actions'
import { Resource, SpaceResource } from '@ownclouders/web-client/src'
import { RouteLocation, defaultComponentMocks, getComposableWrapper } from 'web-test-helpers... | owncloud/web/packages/web-pkg/tests/unit/composables/actions/files/useFileActionsMove.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/composables/actions/files/useFileActionsMove.spec.ts",
"repo_id": "owncloud",
"token_count": 780
} | 826 |
import { useSpaceActionsRestore } from '../../../../../src/composables/actions/spaces'
import { buildSpace, SpaceResource } from '@ownclouders/web-client/src/helpers'
import { mock } from 'vitest-mock-extended'
import {
defaultComponentMocks,
mockAxiosResolve,
RouteLocation,
getComposableWrapper
} from 'web-tes... | owncloud/web/packages/web-pkg/tests/unit/composables/actions/spaces/useSpaceActionsRestore.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/composables/actions/spaces/useSpaceActionsRestore.spec.ts",
"repo_id": "owncloud",
"token_count": 2153
} | 827 |
import { createTestingPinia, getComposableWrapper } from 'web-test-helpers'
import {
AddLinkOptions,
AddShareOptions,
DeleteLinkOptions,
DeleteShareOptions,
UpdateLinkOptions,
UpdateShareOptions,
useSharesStore,
useUserStore
} from '../../../../src/composables/piniaStores'
import { mock, mockDeep } from... | owncloud/web/packages/web-pkg/tests/unit/composables/piniaStores/shares.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/composables/piniaStores/shares.spec.ts",
"repo_id": "owncloud",
"token_count": 2711
} | 828 |
import { getLocaleFromLanguage } from '../../../src/helpers'
describe('getLocaleFromLanguage', () => {
describe('returns empty string for invalid input', () => {
it.each([
[null, ''],
[undefined, ''],
['', '']
])('invalid input "%s"', (input: string, expected: string) => {
expect(getL... | owncloud/web/packages/web-pkg/tests/unit/helpers/locale.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/helpers/locale.spec.ts",
"repo_id": "owncloud",
"token_count": 243
} | 829 |
import { HttpClient } from '../../../src/http'
import { ClientService, useAuthStore, useConfigStore, useUserStore } from '../../../src/'
import { Language } from 'vue3-gettext'
import { Graph, OCS, client as _client } from '@ownclouders/web-client'
import { createTestingPinia, writable } from 'web-test-helpers'
import ... | owncloud/web/packages/web-pkg/tests/unit/services/client.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/services/client.spec.ts",
"repo_id": "owncloud",
"token_count": 2051
} | 830 |
<template>
<component :is="type" :aria-hidden="true">
<oc-spinner
v-if="loading"
key="avatar-loading"
:style="`width: ${width}px; height: ${width}px;`"
/>
<oc-avatar
v-else
key="avatar-loaded"
:width="width"
:src="avatarSource"
:user-name="userName"
/>
... | owncloud/web/packages/web-runtime/src/components/Avatar.vue/0 | {
"file_path": "owncloud/web/packages/web-runtime/src/components/Avatar.vue",
"repo_id": "owncloud",
"token_count": 1379
} | 831 |
<template>
<div v-if="showInfo" id="upload-info" class="oc-rounded oc-box-shadow-medium">
<div
class="upload-info-title oc-flex oc-flex-between oc-flex-middle oc-px-m oc-py-s oc-rounded-top"
>
<p v-oc-tooltip="uploadDetails" class="oc-my-xs" v-text="uploadInfoTitle" />
<oc-button
v-i... | owncloud/web/packages/web-runtime/src/components/UploadInfo.vue/0 | {
"file_path": "owncloud/web/packages/web-runtime/src/components/UploadInfo.vue",
"repo_id": "owncloud",
"token_count": 10296
} | 832 |
import merge from 'lodash-es/merge'
import App from '../App.vue'
import missingOrInvalidConfigPage from '../pages/missingOrInvalidConfig.vue'
import { coreTranslations, clientTranslations, pkgTranslations, odsTranslations } from './json'
// fontawesome-free attributions console message
import '@fortawesome/fontawesome... | owncloud/web/packages/web-runtime/src/defaults/index.ts/0 | {
"file_path": "owncloud/web/packages/web-runtime/src/defaults/index.ts",
"repo_id": "owncloud",
"token_count": 181
} | 833 |
<template>
<div class="oc-height-viewport oc-flex oc-flex-column oc-flex-center oc-flex-middle">
<div class="oc-login-card">
<img class="oc-login-logo" :src="logoImg" alt="" :aria-hidden="true" />
<div class="oc-login-card-body oc-width-medium">
<h2 class="oc-login-card-title" v-text="cardTitl... | owncloud/web/packages/web-runtime/src/pages/accessDenied.vue/0 | {
"file_path": "owncloud/web/packages/web-runtime/src/pages/accessDenied.vue",
"repo_id": "owncloud",
"token_count": 1347
} | 834 |
import {
Log,
WebStorageStateStore,
UserManager as OidcUserManager,
UserManagerSettings,
User,
ErrorResponse
} from 'oidc-client-ts'
import { buildUrl } from '@ownclouders/web-pkg/src/helpers/router/buildUrl'
import { getAbilities } from './abilities'
import { AuthStore, UserStore, CapabilityStore, ConfigSt... | owncloud/web/packages/web-runtime/src/services/auth/userManager.ts/0 | {
"file_path": "owncloud/web/packages/web-runtime/src/services/auth/userManager.ts",
"repo_id": "owncloud",
"token_count": 3610
} | 835 |
import NotificationBell from 'web-runtime/src/components/Topbar/NotificationBell.vue'
import { defaultComponentMocks, defaultPlugins, mount } from 'web-test-helpers/src'
describe('NotificationBell', () => {
it('should match snapshot', () => {
const { wrapper } = getWrapper()
expect(wrapper.html()).toMatchSna... | owncloud/web/packages/web-runtime/tests/unit/components/Topbar/NotificationBell.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-runtime/tests/unit/components/Topbar/NotificationBell.spec.ts",
"repo_id": "owncloud",
"token_count": 628
} | 836 |
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`access denied page > renders component 1`] = `
"<div class="oc-height-viewport oc-flex oc-flex-column oc-flex-center oc-flex-middle">
<div class="oc-login-card"><img class="oc-login-logo" src="themes/owncloud/assets/logo.svg" alt="" aria-hidden="... | owncloud/web/packages/web-runtime/tests/unit/pages/__snapshots__/accessDenied.spec.ts.snap/0 | {
"file_path": "owncloud/web/packages/web-runtime/tests/unit/pages/__snapshots__/accessDenied.spec.ts.snap",
"repo_id": "owncloud",
"token_count": 385
} | 837 |
{
"common": {
"name": "ownCloud",
"slogan": "ownCloud – A safe home for all your data",
"logo": "themes/owncloud/assets/logo.svg",
"urls": {
"accessDeniedHelp": "",
"imprint": "",
"privacy": ""
}
},
"clients": {
"android": {},
"desktop": {},
"ios": {},
"web": ... | owncloud/web/packages/web-runtime/themes/owncloud/theme.json/0 | {
"file_path": "owncloud/web/packages/web-runtime/themes/owncloud/theme.json",
"repo_id": "owncloud",
"token_count": 4438
} | 838 |
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
overrides:
'@uppy/companion-client': https://github.com/owncloud/uppy/releases/download/v3.12.13-owncloud/uppy-companion-client.tgz
'@uppy/core': https://github.com/owncloud/uppy/releases/download/v3.12.13-owncloud/uppy-co... | owncloud/web/pnpm-lock.yaml/0 | {
"file_path": "owncloud/web/pnpm-lock.yaml",
"repo_id": "owncloud",
"token_count": 388537
} | 839 |
/**
* try to use waitForElementEnabled() instead of this
* @returns {exports}
*/
exports.command = function () {
// till we have a better idea how to detect that an animation is finished
console.log('waiting for 500ms ...')
this.pause(500)
return this
}
| owncloud/web/tests/acceptance/customCommands/waitForAnimationToFinish.js/0 | {
"file_path": "owncloud/web/tests/acceptance/customCommands/waitForAnimationToFinish.js",
"repo_id": "owncloud",
"token_count": 79
} | 840 |
Feature: Renaming files inside a folder with problematic name
As a user
I want to rename a file
So that I can recognize my file easily
Background:
Given user "Alice" has been created with default attributes and without skeleton files in the server
Scenario Outline: Rename the existing file inside a pro... | owncloud/web/tests/acceptance/features/webUIRenameFiles/renameFilesInsideProblematicFolderName.feature/0 | {
"file_path": "owncloud/web/tests/acceptance/features/webUIRenameFiles/renameFilesInsideProblematicFolderName.feature",
"repo_id": "owncloud",
"token_count": 529
} | 841 |
@files_trashbin-app-required @issue-ocis-web-118
Feature: files and folders can be deleted from the trashbin
As a user
I want to delete files and folders from the trashbin
So that I can control my trashbin space and which files are kept in that space
Background:
Given user "Alice" has been created with def... | owncloud/web/tests/acceptance/features/webUITrashbinDelete/trashbinDelete.feature/0 | {
"file_path": "owncloud/web/tests/acceptance/features/webUITrashbinDelete/trashbinDelete.feature",
"repo_id": "owncloud",
"token_count": 1587
} | 842 |
const { client } = require('nightwatch-api')
module.exports = {
parseTimeout: function (timeout) {
if (timeout === null) {
return client.globals.waitForConditionTimeout
} else {
return parseInt(timeout, 10)
}
}
}
| owncloud/web/tests/acceptance/helpers/timeoutHelper.js/0 | {
"file_path": "owncloud/web/tests/acceptance/helpers/timeoutHelper.js",
"repo_id": "owncloud",
"token_count": 90
} | 843 |
const util = require('util')
const _ = require('lodash')
const { COLLABORATOR_PERMISSION_ARRAY, calculateDate } = require('../../helpers/sharingHelper')
const { client } = require('nightwatch-api')
const userSettings = require('../../helpers/userSettings')
const timeoutHelper = require('../../helpers/timeoutHelper')
co... | owncloud/web/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js/0 | {
"file_path": "owncloud/web/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js",
"repo_id": "owncloud",
"token_count": 9732
} | 844 |
const { join } = require('../helpers/path')
module.exports = {
url: function () {
return join(this.api.launchUrl, '/files/shares/with-others/')
},
commands: {
/**
* like build-in navigate() but also waits till for the progressbar to appear and disappear
* @returns {*}
*/
navigateAndWai... | owncloud/web/tests/acceptance/pageObjects/sharedWithOthersPage.js/0 | {
"file_path": "owncloud/web/tests/acceptance/pageObjects/sharedWithOthersPage.js",
"repo_id": "owncloud",
"token_count": 751
} | 845 |
const { client } = require('nightwatch-api')
const { When } = require('@cucumber/cucumber')
const webdav = require('../helpers/webdavHelper')
When(
'the user copies the private link of the file/folder/resource {string} using the webUI',
async function (resource) {
await client.page.FilesPageElement.filesList()... | owncloud/web/tests/acceptance/stepDefinitions/privateLinksContext.js/0 | {
"file_path": "owncloud/web/tests/acceptance/stepDefinitions/privateLinksContext.js",
"repo_id": "owncloud",
"token_count": 501
} | 846 |
import {
Before,
BeforeAll,
setDefaultTimeout,
setWorldConstructor,
ITestCaseHookParameter,
AfterAll,
After,
Status
} from '@cucumber/cucumber'
import pino from 'pino'
import { Browser, chromium, firefox, webkit } from '@playwright/test'
import { config } from '../../config'
import { api, environment }... | owncloud/web/tests/e2e/cucumber/environment/index.ts/0 | {
"file_path": "owncloud/web/tests/e2e/cucumber/environment/index.ts",
"repo_id": "owncloud",
"token_count": 1821
} | 847 |
Feature: internal link share
Scenario: share a link with internal role
Given "Admin" creates following users using API
| id |
| Alice |
| Brian |
And "Alice" logs in
And "Alice" creates the following folder in personal space using API
| name |
| myfolder |
And "A... | owncloud/web/tests/e2e/cucumber/features/shares/internalLink.feature/0 | {
"file_path": "owncloud/web/tests/e2e/cucumber/features/shares/internalLink.feature",
"repo_id": "owncloud",
"token_count": 457
} | 848 |
Feature: Tiles
As a user
I want to view and navigate resources displayed as tiles
So that I can identify them better
Scenario: Users can navigate web via tiles
Given "Admin" creates following user using API
| id |
| Alice |
And "Alice" logs in
And "Alice" opens the "files" app
An... | owncloud/web/tests/e2e/cucumber/features/smoke/tiles.feature/0 | {
"file_path": "owncloud/web/tests/e2e/cucumber/features/smoke/tiles.feature",
"repo_id": "owncloud",
"token_count": 251
} | 849 |
import { DataTable, Then, When } from '@cucumber/cucumber'
import { World } from '../../environment'
import { objects } from '../../../support'
import { expect } from '@playwright/test'
import { shareRoles } from '../../../support/objects/app-files/share/collaborator'
Then(
/^"([^"]*)" (should|should not) see the fo... | owncloud/web/tests/e2e/cucumber/steps/ui/adminSettings.ts/0 | {
"file_path": "owncloud/web/tests/e2e/cucumber/steps/ui/adminSettings.ts",
"repo_id": "owncloud",
"token_count": 6334
} | 850 |
{
"dependencies": {
"luxon": "3.2.1"
},
"devDependencies": {
"xml-js": "^1.6.11"
}
}
| owncloud/web/tests/e2e/package.json/0 | {
"file_path": "owncloud/web/tests/e2e/package.json",
"repo_id": "owncloud",
"token_count": 58
} | 851 |
import { User } from '../../types'
import {
createUser as graphCreateUser,
deleteUser as graphDeleteUser,
assignRole as graphAssignRole,
getUserId
} from '../graph'
import {
createUser as keycloakCreateUser,
deleteUser as keycloakDeleteUser,
assignRole as keycloakAssignRole
} from '../keycloak'
import { c... | owncloud/web/tests/e2e/support/api/provision/user.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/api/provision/user.ts",
"repo_id": "owncloud",
"token_count": 404
} | 852 |
import { Page } from '@playwright/test'
import util from 'util'
const accountMenuButton = '.oc-topbar-avatar'
const quotaValue = '.storage-wrapper-quota'
const accountManageButton = '#oc-topbar-account-manage'
const infoValue = '.account-page-info-%s dd'
const requestExportButton = '[data-testid="request-export-btn"]'... | owncloud/web/tests/e2e/support/objects/account/actions.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/objects/account/actions.ts",
"repo_id": "owncloud",
"token_count": 1321
} | 853 |
export * as page from './page'
export { Link } from './link'
export { Resource } from './resource'
export { Share } from './share'
export { Spaces } from './spaces'
export { Trashbin } from './trashbin'
export { Search } from './search'
| owncloud/web/tests/e2e/support/objects/app-files/index.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/objects/app-files/index.ts",
"repo_id": "owncloud",
"token_count": 74
} | 854 |
import { Page } from '@playwright/test'
import { startCase } from 'lodash'
import util from 'util'
import { Group, User } from '../../../types'
import { getActualExpiryDate } from '../../../utils/datePicker'
export interface ICollaborator {
collaborator: User | Group
role?: string
type?: CollaboratorType
resou... | owncloud/web/tests/e2e/support/objects/app-files/share/collaborator.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/objects/app-files/share/collaborator.ts",
"repo_id": "owncloud",
"token_count": 4744
} | 855 |
import { Page } from '@playwright/test'
import * as po from './actions'
export class URLNavigation {
#page: Page
constructor({ page }: { page: Page }) {
this.#page = page
}
async navigateToDetailsPanelOfResource(
args: Omit<po.navigateToDetailsPanelOfResourceArgs, 'page'>
): Promise<void> {
awa... | owncloud/web/tests/e2e/support/objects/url-navigation/index.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/objects/url-navigation/index.ts",
"repo_id": "owncloud",
"token_count": 240
} | 856 |
import { Browser } from '@playwright/test'
import { Session } from '../objects/runtime/session'
import { TokenProviderType } from '../environment'
import { UsersEnvironment } from '../environment'
import { config } from '../../config'
export const getTokenFromLogin = async ({
browser,
url = config.frontendUrl,
u... | owncloud/web/tests/e2e/support/utils/tokenHelper.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/utils/tokenHelper.ts",
"repo_id": "owncloud",
"token_count": 277
} | 857 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
* */
include_once 'inc/config.inc.php';
include "header.php";
$html="";
try
{
mysqli_connect(DBHOST,DBUSER,DBPW,DBNAME);
}
catch(Exception $e)
{
$html.=
"<p >
<a href='install.php' style='color:red;'>
提示:欢迎使用,pi... | zhuifengshaonianhanlu/pikachu/index.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/index.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 2575
} | 858 |
<?php
error_reporting(0);
include_once '../inc/config.inc.php';
include_once '../inc/mysql.inc.php';
$link=connect();
if(!empty($_GET['username']) && !empty($_GET['password'])){
$username=$_GET['username'];
$password=$_GET['password'];
$referer="";
$referer.=$_SERVER['HTTP_REFERER'];
$time=date(... | zhuifengshaonianhanlu/pikachu/pkxss/xfish/xfish.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/pkxss/xfish/xfish.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 208
} | 859 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
*/
$SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
if ($SELF_PAGE = "csrf_post_edit.php"){
$ACTIVE = array('','','','','','','','','','','','','','','','','','','','','','','','','','active open','','','','ac... | zhuifengshaonianhanlu/pikachu/vul/csrf/csrfpost/csrf_post_edit.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/csrf/csrfpost/csrf_post_edit.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 1901
} | 860 |
<?php
$html.=<<<A
<img class=player src="include/tmac.png" />
<p class=nabname>
Tracy McGrady had seven all-star team, won the NBA scoring champion.On December 9, 2004 rockets home magic reversal the SAN Antonio spurs, McGrady in the final moments, had 13 points in 35 seconds, the game, go down in history forever.Incre... | zhuifengshaonianhanlu/pikachu/vul/fileinclude/include/file4.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/fileinclude/include/file4.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 128
} | 861 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
*/
$SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
if ($SELF_PAGE = "op2_user.php"){
$ACTIVE = array('','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''... | zhuifengshaonianhanlu/pikachu/vul/overpermission/op2/op2_user.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/overpermission/op2/op2_user.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 1746
} | 862 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
*/
$SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
if ($SELF_PAGE = "sqli_str.php"){
$ACTIVE = array('','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','a... | zhuifengshaonianhanlu/pikachu/vul/sqli/sqli_str.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/sqli/sqli_str.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 1428
} | 863 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
*/
$SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
if ($SELF_PAGE = "xss.php"){
$ACTIVE = array('','','','','','','','active open','active','','','','','','','','','','','','','','','','','','','','','','',''... | zhuifengshaonianhanlu/pikachu/vul/xss/xss.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/xss/xss.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 2038
} | 864 |
div.cardplace {
z-index: 10;
position: absolute;
top: 5%;
width: 100%;
height: 15%;
}
div.card {
margin: auto;
width: 90%;
height: 100%;
padding: 10px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
text-align: center;
background-color: white;
color: #7611B7;
... | 8thwall/web/examples/camerapipeline/qrcode/index.css/0 | {
"file_path": "8thwall/web/examples/camerapipeline/qrcode/index.css",
"repo_id": "8thwall",
"token_count": 271
} | 0 |
/*
Ported to JavaScript by Lazar Laszlo 2011
lazarsoft@gmail.com, www.lazarsoft.info
*/
/*
*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* ... | 8thwall/web/examples/camerapipeline/qrcode/jsqrcode/src/gf256.js/0 | {
"file_path": "8thwall/web/examples/camerapipeline/qrcode/jsqrcode/src/gf256.js",
"repo_id": "8thwall",
"token_count": 1047
} | 1 |
# Custom Three.js pipeline module
8th Wall Web provides a built-in pipeline module that interfaces with the three.js environment and lifecycle.
For advanced users who would like to customize their three.js configuration, the example `customThreejsPipelineModule.js` more-or-less replicates what `XR8.Threejs.pipelineMo... | 8thwall/web/examples/threejs/custom-pipeline-module/README.md/0 | {
"file_path": "8thwall/web/examples/threejs/custom-pipeline-module/README.md",
"repo_id": "8thwall",
"token_count": 959
} | 2 |
# Getting Started with 8th Wall
Use your own development workflow with 8th Wall self-hosting.
## Clone and run sample projects
Follow the getting started guide by cloning self-hosted sample projects from this repository.
To develop locally you need Node.js and npm installed. If you don't already have Node.js and np... | 8thwall/web/gettingstarted/README.md/0 | {
"file_path": "8thwall/web/gettingstarted/README.md",
"repo_id": "8thwall",
"token_count": 1167
} | 3 |
/*jshint esversion: 6, asi: true, laxbreak: true*/
// taprecenter.js: Defines a PlayCanvas script that re-centers the AR scene when the screen is
// tapped.
var taprecenter = pc.createScript('taprecenter')
// Fire a 'recenter' event to move the camera back to its starting location in the scene.
taprecenter.prototype... | 8thwall/web/gettingstarted/playcanvas/scripts/taprecenter.js/0 | {
"file_path": "8thwall/web/gettingstarted/playcanvas/scripts/taprecenter.js",
"repo_id": "8thwall",
"token_count": 165
} | 4 |
import type {ComponentDefinition} from 'aframe'
import {SessionReconfigureFactory} from '../../sessionreconfiguremodule/session-reconfigure-module'
declare const XR8: any
type SessionReconfigureParameters = {
skipCameraSession: boolean
}
const defaultParameters: SessionReconfigureParameters = {
skipCameraSessio... | 8thwall/web/xrextras/src/aframe/components/session-reconfigure-components.ts/0 | {
"file_path": "8thwall/web/xrextras/src/aframe/components/session-reconfigure-components.ts",
"repo_id": "8thwall",
"token_count": 317
} | 5 |
<div id="loadingContainer" class="absolute-fill">
<!--Loading screen-->
<div id="loadBackground" class="absolute-fill">
<div id="loadImageContainer" class="absolute-fill">
<img src="//cdn.8thwall.com/web/img/loading/v2/load-grad.png" id="loadImage" class="spin" />
<img class='foreground-image powere... | 8thwall/web/xrextras/src/loadingmodule/loading-module.html/0 | {
"file_path": "8thwall/web/xrextras/src/loadingmodule/loading-module.html",
"repo_id": "8thwall",
"token_count": 3422
} | 6 |
.pwa-installer-root {
position: fixed;
z-index: 1300;
right: 0;
bottom: 0;
top: 0;
left: 0;
font-family: Nunito,Roboto,Arial,sans-serif;
font-size: 14px;
line-height: 1.43;
}
.pwa-installer-root .backdrop {
right: 0;
bottom: 0;
top: 0;
left: 0;
display: flex;
z-index: -1;
position: fixe... | 8thwall/web/xrextras/src/pwainstallermodule/pwa-installer-module.css/0 | {
"file_path": "8thwall/web/xrextras/src/pwainstallermodule/pwa-installer-module.css",
"repo_id": "8thwall",
"token_count": 1593
} | 7 |
## 一、兼容代码
### 1、封装 innerText 和 TextContent
```javascript
// 设置任意标签的文本内容为任意内容
function setText(element, text) {
(typeof element.TextContent === "undefined") ? (element.innerText = text) : (element.textContent = text);
}
// 获取任意标签的文本内容
function getText(element) {
return (typeof element.TextContent === "undefine... | Daotin/Web/03-JavaScript/02-DOM/03-自定义属性,获取元素属性.md/0 | {
"file_path": "Daotin/Web/03-JavaScript/02-DOM/03-自定义属性,获取元素属性.md",
"repo_id": "Daotin",
"token_count": 2376
} | 8 |
类的创建一般有三种方式:
### 方式一
```js
var Box = (function () {
// 构造函数
// ES5中没有类名,构造函数的名称就是类名
function Box() {}
Box.prototype = {}
Box.prototype.constructor = Box;
return Box;
})();
// Box都是构造函数,new出来才是对象。
var box = new Box();
```
### 方式二
```js
// ES5 中的类创建方法
(function (win) {
function Box() {}
... | Daotin/Web/03-JavaScript/04-JavaScript高级知识/06-类的创建.md/0 | {
"file_path": "Daotin/Web/03-JavaScript/04-JavaScript高级知识/06-类的创建.md",
"repo_id": "Daotin",
"token_count": 1011
} | 9 |
## 一、事件冒泡与阻止事件冒泡
**事件冒泡:**当一个元素触发某个事件的时候,会把这个事件传播到其父元素,一直到顶层元素。
**阻止事件冒泡:**在被触发事件的子元素中添加 `return false;` 即可。
## 二、事件的触发
之前讲的绑定事件是事件触发后的事件处理过程,并且上面的事件触发是被动的事件触发,怎么可以主动触发事件呢?
文本框的获取焦点事件的触发:
```js
// 方式一
文本框元素.focus();
// 方式二
文本框元素.trigger("focus");
// 方式三
文本框元素.triggerHandler("focus");
```
> PS:方式一和方式二,都可以获取... | Daotin/Web/04-jQuery/07-事件冒泡,事件参数对象,链式编程原理.md/0 | {
"file_path": "Daotin/Web/04-jQuery/07-事件冒泡,事件参数对象,链式编程原理.md",
"repo_id": "Daotin",
"token_count": 2438
} | 10 |
## 一、Ajax 概述
Ajax 全称:Asynchronous JavaScript and XML(异步 JavaScript 和 XML)。它不是一种新的编程语言,而是一种用于创建更好更快以及交互性更强的Web应用程序的技术。它可以在无需重新加载整个网页的情况下,能够更新部分网页的技术。而传统的网页(不使用 AJAX)如果需要更新内容,必需重载整个网页面。
还有为什么叫异步呢?
因为在加载的时候,页面的其他部分还是可以自由操作的,没有出现卡死的状态,所以是异步。
有很多使用 AJAX 的应用程序案例:新浪微博、Google 地图、开心网等等。
在此之前,我们可以通过以下几种方式让浏览器发出对服务端的请求,获... | Daotin/Web/06-Ajax/05-Ajax概述,快速上手.md/0 | {
"file_path": "Daotin/Web/06-Ajax/05-Ajax概述,快速上手.md",
"repo_id": "Daotin",
"token_count": 5857
} | 11 |
## 一、案例:JD移动端网页
相关源码已放置 Github:https://github.com/Daotin/Web/tree/master/Code/src/11/jd.zip
html 源码:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content=... | Daotin/Web/07-移动Web开发/02-JD移动端网页,移动触屏事件.md/0 | {
"file_path": "Daotin/Web/07-移动Web开发/02-JD移动端网页,移动触屏事件.md",
"repo_id": "Daotin",
"token_count": 16119
} | 12 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="./css/base.css">
<link rel="styleshe... | Daotin/Web/07-移动Web开发/案例源码/02-仿JD移动端/index.html/0 | {
"file_path": "Daotin/Web/07-移动Web开发/案例源码/02-仿JD移动端/index.html",
"repo_id": "Daotin",
"token_count": 5848
} | 13 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>微金所</title>
<link href="./lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- 在线字体图标文件 --... | Daotin/Web/07-移动Web开发/案例源码/03-微金所/index.html/0 | {
"file_path": "Daotin/Web/07-移动Web开发/案例源码/03-微金所/index.html",
"repo_id": "Daotin",
"token_count": 18831
} | 14 |
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under the MIT license
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((v... | Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/bootstrap/js/bootstrap.js/0 | {
"file_path": "Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/bootstrap/js/bootstrap.js",
"repo_id": "Daotin",
"token_count": 26375
} | 15 |
/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
@import "variables.less";
@import "mixins.less";
@import "path.less";
@import "core.less";
@import "larger.less";
@import "fixed-width.less";
@import "li... | Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/font-awesome-4.7.0/less/font-awesome.less/0 | {
"file_path": "Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/font-awesome-4.7.0/less/font-awesome.less",
"repo_id": "Daotin",
"token_count": 185
} | 16 |
// List Icons
// -------------------------
.#{$fa-css-prefix}-ul {
padding-left: 0;
margin-left: $fa-li-width;
list-style-type: none;
> li { position: relative; }
}
.#{$fa-css-prefix}-li {
position: absolute;
left: -$fa-li-width;
width: $fa-li-width;
top: (2em / 14);
text-align: center;
&.#{$fa-css... | Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/font-awesome-4.7.0/scss/_list.scss/0 | {
"file_path": "Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/font-awesome-4.7.0/scss/_list.scss",
"repo_id": "Daotin",
"token_count": 168
} | 17 |
/*!
* jQuery JavaScript Library v2.1.4
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2015-04-28T16:01Z
*/
(function( global, factory ) {
if (... | Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/jquery/jquery.js/0 | {
"file_path": "Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/jquery/jquery.js",
"repo_id": "Daotin",
"token_count": 94221
} | 18 |
## JS模块化
* 模块化的理解
* 什么是模块?
* 将一个复杂的程序依据一定的规则(规范)封装成几个块(文件), 并进行组合在一起
* 块的内部数据/实现是私有的, 只是向外部暴露一些接口(方法)与外部其它模块通信
* 一个模块的组成
* 数据--->内部的属性
* 操作数据的行为--->内部的函数
* 模块化
* 编码时是按照模块一个一个编码的, 整个项目就是一个模块化的项目
* 模块化的进化过程
* 全局function模式 :
* 编码: 全局变量/函数
* 问题: 污染全局命名空间, 容易引起命名冲突/数据不安全
* namespace模式 :
* 编码: 将数据... | Daotin/Web/09-模块化规范/07-模块化总结.md/0 | {
"file_path": "Daotin/Web/09-模块化规范/07-模块化总结.md",
"repo_id": "Daotin",
"token_count": 3006
} | 19 |
示例文件接到 **Vue的组件**
---
## 一、Vue路由
### 1、什么是路由?
**后端路由:**对于普通的网站,所有的超链接都是URL地址,所有的URL地址都对应服务器上对应的资源;
**前端路由:**对于单页面应用程序来说,主要通过URL中的hash(#号)来实现不同页面之间的切换,并不会向后端发送请求。同时,hash有一个特点:HTTP请求中不会包含hash相关的内容;所以,单页面程序中的页面跳转主要用hash实现;
在单页面应用程序中,这种**通过hash改变来切换页面**的方式,称作前端路由(区别于后端路由);
承接到**Vue的组件**的示例文件:👇
现在有Home,Goods和Us... | Daotin/Web/12-Vue/06-路由.md/0 | {
"file_path": "Daotin/Web/12-Vue/06-路由.md",
"repo_id": "Daotin",
"token_count": 11684
} | 20 |
插件通常用来为 Vue 添加**全局功能**。
## 使用插件
通过全局方法 `Vue.use()` 使用插件。它需要在你调用 `new Vue()` 启动应用之前完成:
```js
// 调用 `MyPlugin.install(Vue)`
Vue.use(MyPlugin)
new Vue({
// ...组件选项
})
```
也可以传入一个可选的选项对象:
```js
Vue.use(MyPlugin, { someOption: true })
```
`Vue.use` 会自动阻止多次注册相同插件,届时即使多次调用也只会注册一次该插件。
## 开发插件
Vue.js 的插件应该暴露一个 `i... | Daotin/Web/12-Vue/插件.md/0 | {
"file_path": "Daotin/Web/12-Vue/插件.md",
"repo_id": "Daotin",
"token_count": 766
} | 21 |
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex ch... | Daotin/Web/CODE_OF_CONDUCT.md/0 | {
"file_path": "Daotin/Web/CODE_OF_CONDUCT.md",
"repo_id": "Daotin",
"token_count": 693
} | 22 |
# web 此分支开箱即用
个人网站项目,前台包括博客、代码库、文件下载、留言、登录注册等功能,后台包括上传文件、博客、代码,编辑、删除文章,查看、修改个人资料及邮箱、头像等功能。
交流答疑QQ群:951623031。
[点击加入:Java全栈开发学习交流](//shang.qq.com/wpa/qunwpa?idkey=41068b9adb14521cab1ebfea385e3e4aabf466115ba5278ca4d41a605506c096)
------------
## [点击跳转至postgresql分支开箱即用版](https://github.com/CrazyHusen/web/tree/web-psq... | Humsen/web/README.md/0 | {
"file_path": "Humsen/web/README.md",
"repo_id": "Humsen",
"token_count": 1326
} | 23 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.